@@ -100,7 +100,7 @@ declare module 'vscode' {
100100 readonly command ?: string ;
101101 } ;
102102
103- readonly sessionOptions : ReadonlyArray < { optionId : string ; value : ChatSessionProviderOptionItem } > ;
103+ readonly sessionOptions : ReadonlyArray < { optionId : string ; value : string | ChatSessionProviderOptionItem } > ;
104104 }
105105
106106 /**
@@ -116,7 +116,7 @@ declare module 'vscode' {
116116 *
117117 * @param sessionResource The resource of the chat session being forked.
118118 * @param request The request turn that marks the fork point. The forked session includes all turns
119- * upto this request turn and includes this request turn itself. If undefined, fork the full session.
119+ * upto this request turn and excludes this request turn itself. If undefined, fork the full session.
120120 * @param token A cancellation token.
121121 * @returns The forked session item.
122122 */
@@ -396,9 +396,12 @@ declare module 'vscode' {
396396 /**
397397 * Options configured for this session as key-value pairs.
398398 * Keys correspond to option group IDs (e.g., 'models', 'subagents').
399+ * Values can be either:
400+ * - A string (the option item ID) for backwards compatibility
401+ * - A ChatSessionProviderOptionItem object to include metadata like locked state
399402 * TODO: Strongly type the keys
400403 */
401- readonly options ?: Record < string , ChatSessionProviderOptionItem > ;
404+ readonly options ?: Record < string , string | ChatSessionProviderOptionItem > ;
402405
403406 /**
404407 * Callback invoked by the editor for a currently running response. This allows the session to push items for the
@@ -429,7 +432,7 @@ declare module 'vscode' {
429432 *
430433 * @param sessionResource The resource of the chat session being forked.
431434 * @param request The request turn that marks the fork point. The forked session includes all turns
432- * until this request turn and includes this request turn itself. If undefined, fork the full session.
435+ * upto this request turn and excludes this request turn itself. If undefined, fork the full session.
433436 * @param token A cancellation token.
434437 * @returns The forked session item.
435438 */
@@ -456,7 +459,7 @@ declare module 'vscode' {
456459 /**
457460 * The new value assigned to the option. When `undefined`, the option is cleared.
458461 */
459- readonly value : ChatSessionProviderOptionItem ;
462+ readonly value : string | ChatSessionProviderOptionItem ;
460463 } > ;
461464 }
462465
@@ -489,7 +492,7 @@ declare module 'vscode' {
489492 * @return The {@link ChatSession chat session} associated with the given URI.
490493 */
491494 provideChatSessionContent ( resource : Uri , token : CancellationToken , context : {
492- readonly sessionOptions : ReadonlyArray < { optionId : string ; value : ChatSessionProviderOptionItem } > ;
495+ readonly sessionOptions : ReadonlyArray < { optionId : string ; value : string | ChatSessionProviderOptionItem } > ;
493496 } ) : Thenable < ChatSession > | ChatSession ;
494497
495498 /**
@@ -514,7 +517,7 @@ declare module 'vscode' {
514517 /**
515518 * The new value assigned to the option. When `undefined`, the option is cleared.
516519 */
517- readonly value : ChatSessionProviderOptionItem | undefined ;
520+ readonly value : string | undefined ;
518521 }
519522
520523 export namespace chat {
@@ -544,7 +547,7 @@ declare module 'vscode' {
544547 * The initial option selections for the session, provided with the first request.
545548 * Contains the options the user selected (or defaults) before the session was created.
546549 */
547- readonly initialSessionOptions ?: ReadonlyArray < { optionId : string ; value : ChatSessionProviderOptionItem } > ;
550+ readonly initialSessionOptions ?: ReadonlyArray < { optionId : string ; value : string | ChatSessionProviderOptionItem } > ;
548551 }
549552
550553 export interface ChatSessionCapabilities {
@@ -667,6 +670,6 @@ declare module 'vscode' {
667670 *
668671 * Keys correspond to option group IDs (e.g., 'models', 'subagents').
669672 */
670- readonly newSessionOptions ?: Record < string , ChatSessionProviderOptionItem > ;
673+ readonly newSessionOptions ?: Record < string , string | ChatSessionProviderOptionItem > ;
671674 }
672675}
0 commit comments