@@ -38,7 +38,7 @@ export interface IFixtureMessage {
3838 | { kind : 'markdown' ; text : string }
3939 | { kind : 'progress' ; text : string }
4040 | { kind : 'terminalConfirmation' ; command : string ; title ?: string ; disclaimer ?: string ; requestUnsandboxedExecution ?: boolean ; requestUnsandboxedExecutionReason ?: string ; riskAssessment ?: { risk : ToolRiskLevel ; explanation : string } ; riskLoading ?: boolean }
41- | { kind : 'elicitation' ; title : string ; message : string ; riskAssessment ?: { risk : ToolRiskLevel ; explanation : string } ; riskLoading ?: boolean }
41+ | { kind : 'elicitation' ; title : string ; message : string ; confirmation ?: { commandLine : string ; cwdLabel ?: string ; cdPrefix ?: string } ; riskAssessment ?: { risk : ToolRiskLevel ; explanation : string } ; riskLoading ?: boolean }
4242 > ;
4343 readonly responseComplete ?: boolean ;
4444}
@@ -180,6 +180,7 @@ export async function renderChatWidget(context: ComponentFixtureContext, options
180180 language : 'pwsh' ,
181181 requestUnsandboxedExecution : part . requestUnsandboxedExecution ,
182182 requestUnsandboxedExecutionReason : part . requestUnsandboxedExecutionReason ,
183+ confirmation : part . confirmation ,
183184 } ,
184185 } ,
185186 fixtureToolData ,
@@ -321,6 +322,26 @@ const PENDING_TOOL_APPROVAL: IFixtureMessage[] = [
321322 } ,
322323] ;
323324
325+ // https://github.com/microsoft/vscode/issues/309796
326+ const ISSUE_309796_MISSING_BACKSLASH : IFixtureMessage [ ] = [
327+ {
328+ user : 'install dependencies in the server directory' ,
329+ assistant : [
330+ {
331+ kind : 'terminalConfirmation' ,
332+ command : 'cd packages\\server && npm install' ,
333+ title : 'Run `pwsh` command within `packages\\server`?' ,
334+ confirmation : {
335+ commandLine : 'npm install' ,
336+ cwdLabel : 'packages\\server' ,
337+ cdPrefix : 'cd packages\\server && ' ,
338+ } ,
339+ } ,
340+ ] ,
341+ responseComplete : false ,
342+ } ,
343+ ] ;
344+
324345const STREAMING : IFixtureMessage [ ] = [
325346 {
326347 user : 'Search the workspace for TODO comments' ,
@@ -356,5 +377,8 @@ export default defineThemedFixtureGroup({ path: 'chat/widget/' }, {
356377 SimpleQA : defineComponentFixture ( { render : ctx => renderChatWidget ( ctx , { messages : SIMPLE_QA } ) } ) ,
357378 Streaming : defineComponentFixture ( { labels : { kind : 'animated' } , render : ctx => renderChatWidget ( ctx , { messages : STREAMING } ) } ) ,
358379 PendingToolApproval : defineComponentFixture ( { render : ctx => renderChatWidget ( ctx , { messages : PENDING_TOOL_APPROVAL } ) } ) ,
380+ bugs : defineThemedFixtureGroup ( {
381+ 'issue-309796-missing-backslash' : defineComponentFixture ( { render : ctx => renderChatWidget ( ctx , { messages : ISSUE_309796_MISSING_BACKSLASH } ) } ) ,
382+ } ) as unknown as ReturnType < typeof defineComponentFixture > ,
359383 MultiTurn : defineComponentFixture ( { render : ctx => renderChatWidget ( ctx , { messages : MULTI_TURN } ) } ) ,
360384} ) ;
0 commit comments