You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rfds/session-config-options.mdx
+26-24Lines changed: 26 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,20 +56,21 @@ Something like an `InitializeResponse` that looks like:
56
56
"id": 1,
57
57
"result": {
58
58
"sessionId": "sess_abc123def456",
59
-
"config_options": [
59
+
"configOptions": [
60
60
{
61
61
"id": "mode", // this is the unique `key` for communication about which option is being used
62
62
"name": "Session Mode", // Human-readable label for the option
63
63
"description": "Optional description for the Client to display to the user."
64
-
"currentId": "ask",
64
+
"type": "select",
65
+
"currentValue": "ask",
65
66
"options": [
66
67
{
67
-
"id": "ask",
68
+
"value": "ask",
68
69
"name": "Ask",
69
70
"description": "Request permission before making any changes"
70
71
},
71
72
{
72
-
"id": "code",
73
+
"value": "code",
73
74
"name": "Code",
74
75
"description": "Write and modify code with full tool access"
75
76
}
@@ -78,15 +79,16 @@ Something like an `InitializeResponse` that looks like:
78
79
{
79
80
"id": "models",
80
81
"name": "Model",
81
-
"currentId": "ask",
82
+
"type": "select",
83
+
"currentValue": "ask",
82
84
"options": [
83
85
{
84
-
"id": "model-1",
86
+
"value": "model-1",
85
87
"name": "Model 1",
86
88
"description": "The fastest model"
87
89
},
88
90
{
89
-
"id": "model-2",
91
+
"value": "model-2",
90
92
"name": "Model 2",
91
93
"description": "The most powerful model"
92
94
}
@@ -103,13 +105,14 @@ When we introduce this, we could also allow for grouped options, in case there a
103
105
{
104
106
"id": "models",
105
107
"name": "Model",
106
-
"currentId": "ask",
108
+
"currentValue": "ask",
109
+
"type": "select",
107
110
"options": [
108
111
{
109
112
"group": "Provider A",
110
113
"options": [
111
114
{
112
-
"id": "model-1",
115
+
"value": "model-1",
113
116
"name": "Model 1",
114
117
"description": "The fastest model"
115
118
}
@@ -119,7 +122,7 @@ When we introduce this, we could also allow for grouped options, in case there a
119
122
"group": "Provider B",
120
123
"options": [
121
124
{
122
-
"id": "model-2",
125
+
"value": "model-2",
123
126
"name": "Model 2",
124
127
"description": "The most powerful model"
125
128
}
@@ -143,7 +146,7 @@ For updating the value from the client and agent, it would follow the same patte
143
146
"params": {
144
147
"sessionId": "sess_abc123def456",
145
148
"configId": "mode",
146
-
"optionId": "code"
149
+
"value": "code"
147
150
}
148
151
}
149
152
```
@@ -155,17 +158,19 @@ And the response to this request would return the full list of config options wi
155
158
"jsonrpc": "2.0",
156
159
"id": 2,
157
160
"result": {
158
-
"config_options": [
161
+
"configOptions": [
159
162
{
160
163
"id": "mode",
161
164
"name": "Session Mode",
162
-
"currentId": "ask",
165
+
"type": "select",
166
+
"currentValue": "ask",
163
167
"options": [..]
164
168
},
165
169
{
166
170
"id": "models",
167
171
"name": "Model",
168
-
"currentId": "ask",
172
+
"type": "select",
173
+
"currentValue": "ask",
169
174
"options": [..]
170
175
}
171
176
]
@@ -183,17 +188,19 @@ The notification would return the full list of config options with current value
183
188
"sessionId": "sess_abc123def456",
184
189
"update": {
185
190
"sessionUpdate": "config_option_update",
186
-
"config_options": [
191
+
"configOptions": [
187
192
{
188
193
"id": "mode",
189
194
"name": "Session Mode",
190
-
"currentId": "ask",
195
+
"type": "select",
196
+
"currentValue": "ask",
191
197
"options": [..]
192
198
},
193
199
{
194
200
"id": "models",
195
201
"name": "Model",
196
-
"currentId": "ask",
202
+
"type": "select",
203
+
"currentValue": "ask",
197
204
"options": [..]
198
205
}
199
206
]
@@ -204,14 +211,9 @@ The notification would return the full list of config options with current value
204
211
205
212
We would also likely move session modes to be `@deprecated` in favor of this approach. Until it is removed, we may want Agents to support both fields, and then the Client, if it uses the new config options, should only use the config options supplied and not the `modes` field to avoid duplication.
206
213
207
-
Open questions at the moment are:
214
+
The config options would also take a `type` field to specify different forms of input for the Client to display. If a client receives an option it doesn't recognize, it should ignore it. Since the Agent is required to have a default value, it can gracefully degrade and ignore the option and the Agent should handle it regardless. The Client should also treat the list of options as prioritized by the Agent. So, if for some reason the Agent provides more options than the Client can reasonably display, the Client should show as many as possible, starting at the beginning of the list.
208
215
209
-
- What types of values do we support initially? Single select? Multiselect? Checkbox?
210
-
- Push back: Multiselect could theoretically be helpful in some cases, but not utilized by any agents at the moment (could change). A checkbox could be represented by a select as well.
211
-
- Does the Client express capabilities of which types of inputs it supports? And the Agent adjusts the options accordingly?
212
-
- Or, does the Client ignore settings options it doesn't support and the User just doesn't see them?
213
-
- Should we instead move to a more HTML form inspired approach where we use the terms `label`, and `value`?
214
-
- How do we handle the Agent providing more options than the Client can reasonably display?
216
+
We will start with just supporting `select` for now, and expand to other types as needed.
0 commit comments