Skip to content

Commit 5877e70

Browse files
committed
Address PR feedback
1 parent 2163089 commit 5877e70

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

docs/rfds/session-config-options.mdx

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,21 @@ Something like an `InitializeResponse` that looks like:
5656
"id": 1,
5757
"result": {
5858
"sessionId": "sess_abc123def456",
59-
"config_options": [
59+
"configOptions": [
6060
{
6161
"id": "mode", // this is the unique `key` for communication about which option is being used
6262
"name": "Session Mode", // Human-readable label for the option
6363
"description": "Optional description for the Client to display to the user."
64-
"currentId": "ask",
64+
"type": "select",
65+
"currentValue": "ask",
6566
"options": [
6667
{
67-
"id": "ask",
68+
"value": "ask",
6869
"name": "Ask",
6970
"description": "Request permission before making any changes"
7071
},
7172
{
72-
"id": "code",
73+
"value": "code",
7374
"name": "Code",
7475
"description": "Write and modify code with full tool access"
7576
}
@@ -78,15 +79,16 @@ Something like an `InitializeResponse` that looks like:
7879
{
7980
"id": "models",
8081
"name": "Model",
81-
"currentId": "ask",
82+
"type": "select",
83+
"currentValue": "ask",
8284
"options": [
8385
{
84-
"id": "model-1",
86+
"value": "model-1",
8587
"name": "Model 1",
8688
"description": "The fastest model"
8789
},
8890
{
89-
"id": "model-2",
91+
"value": "model-2",
9092
"name": "Model 2",
9193
"description": "The most powerful model"
9294
}
@@ -103,13 +105,14 @@ When we introduce this, we could also allow for grouped options, in case there a
103105
{
104106
"id": "models",
105107
"name": "Model",
106-
"currentId": "ask",
108+
"currentValue": "ask",
109+
"type": "select",
107110
"options": [
108111
{
109112
"group": "Provider A",
110113
"options": [
111114
{
112-
"id": "model-1",
115+
"value": "model-1",
113116
"name": "Model 1",
114117
"description": "The fastest model"
115118
}
@@ -119,7 +122,7 @@ When we introduce this, we could also allow for grouped options, in case there a
119122
"group": "Provider B",
120123
"options": [
121124
{
122-
"id": "model-2",
125+
"value": "model-2",
123126
"name": "Model 2",
124127
"description": "The most powerful model"
125128
}
@@ -143,7 +146,7 @@ For updating the value from the client and agent, it would follow the same patte
143146
"params": {
144147
"sessionId": "sess_abc123def456",
145148
"configId": "mode",
146-
"optionId": "code"
149+
"value": "code"
147150
}
148151
}
149152
```
@@ -155,17 +158,19 @@ And the response to this request would return the full list of config options wi
155158
"jsonrpc": "2.0",
156159
"id": 2,
157160
"result": {
158-
"config_options": [
161+
"configOptions": [
159162
{
160163
"id": "mode",
161164
"name": "Session Mode",
162-
"currentId": "ask",
165+
"type": "select",
166+
"currentValue": "ask",
163167
"options": [..]
164168
},
165169
{
166170
"id": "models",
167171
"name": "Model",
168-
"currentId": "ask",
172+
"type": "select",
173+
"currentValue": "ask",
169174
"options": [..]
170175
}
171176
]
@@ -183,17 +188,19 @@ The notification would return the full list of config options with current value
183188
"sessionId": "sess_abc123def456",
184189
"update": {
185190
"sessionUpdate": "config_option_update",
186-
"config_options": [
191+
"configOptions": [
187192
{
188193
"id": "mode",
189194
"name": "Session Mode",
190-
"currentId": "ask",
195+
"type": "select",
196+
"currentValue": "ask",
191197
"options": [..]
192198
},
193199
{
194200
"id": "models",
195201
"name": "Model",
196-
"currentId": "ask",
202+
"type": "select",
203+
"currentValue": "ask",
197204
"options": [..]
198205
}
199206
]
@@ -204,14 +211,9 @@ The notification would return the full list of config options with current value
204211

205212
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.
206213

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.
208215

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.
215217

216218
## Frequently asked questions
217219

0 commit comments

Comments
 (0)