@@ -127,16 +127,35 @@ export class ChatAccessibilityProvider implements IListAccessibilityProvider<Cha
127
127
fileTreeCountHint = localize ( 'multiFileTreeHint' , "{0} file trees " , fileTreeCount ) ;
128
128
break ;
129
129
}
130
+
131
+ const elicitationCount = element . response . value . filter ( v => v . kind === 'elicitation' ) . length ?? 0 ;
132
+ let elicitationCountHint = '' ;
133
+ switch ( elicitationCount ) {
134
+ case 0 :
135
+ break ;
136
+ case 1 :
137
+ elicitationCountHint = localize ( 'singleElicitationHint' , "1 user input request " ) ;
138
+ break ;
139
+ default :
140
+ elicitationCountHint = localize ( 'multiElicitationHint' , "{0} user input requests " , elicitationCount ) ;
141
+ break ;
142
+ }
130
143
const codeBlockCount = marked . lexer ( element . response . toString ( ) ) . filter ( token => token . type === 'code' ) ?. length ?? 0 ;
131
144
switch ( codeBlockCount ) {
132
145
case 0 :
133
- label = accessibleViewHint ? localize ( 'noCodeBlocksHint' , "{0}{1}{2}{3} {4}" , toolInvocationHint , fileTreeCountHint , tableCountHint , element . response . toString ( ) , accessibleViewHint ) : localize ( 'noCodeBlocks' , "{0} {1}" , fileTreeCountHint , element . response . toString ( ) ) ;
146
+ label = accessibleViewHint
147
+ ? localize ( 'noCodeBlocksHint' , "{0}{1}{2}{3}{4} {5}" , toolInvocationHint , fileTreeCountHint , elicitationCountHint , tableCountHint , element . response . toString ( ) , accessibleViewHint )
148
+ : localize ( 'noCodeBlocks' , "{0}{1}{2} {3}" , fileTreeCountHint , elicitationCountHint , tableCountHint , element . response . toString ( ) ) ;
134
149
break ;
135
150
case 1 :
136
- label = accessibleViewHint ? localize ( 'singleCodeBlockHint' , "{0}{1}1 code block: {2} {3}{4}" , toolInvocationHint , fileTreeCountHint , tableCountHint , element . response . toString ( ) , accessibleViewHint ) : localize ( 'singleCodeBlock' , "{0} 1 code block: {1}" , fileTreeCountHint , element . response . toString ( ) ) ;
151
+ label = accessibleViewHint
152
+ ? localize ( 'singleCodeBlockHint' , "{0}{1}{2}1 code block: {3} {4}{5}" , toolInvocationHint , fileTreeCountHint , elicitationCountHint , tableCountHint , element . response . toString ( ) , accessibleViewHint )
153
+ : localize ( 'singleCodeBlock' , "{0}{1}1 code block: {2} {3}" , fileTreeCountHint , elicitationCountHint , tableCountHint , element . response . toString ( ) ) ;
137
154
break ;
138
155
default :
139
- label = accessibleViewHint ? localize ( 'multiCodeBlockHint' , "{0}{1}{2} code blocks: {3}{4}" , toolInvocationHint , fileTreeCountHint , tableCountHint , codeBlockCount , element . response . toString ( ) , accessibleViewHint ) : localize ( 'multiCodeBlock' , "{0} {1} code blocks" , fileTreeCountHint , codeBlockCount , element . response . toString ( ) ) ;
156
+ label = accessibleViewHint
157
+ ? localize ( 'multiCodeBlockHint' , "{0}{1}{2}{3} code blocks: {4}{5} {6}" , toolInvocationHint , fileTreeCountHint , elicitationCountHint , tableCountHint , codeBlockCount , element . response . toString ( ) , accessibleViewHint )
158
+ : localize ( 'multiCodeBlock' , "{0}{1}{2} code blocks: {3} {4}" , fileTreeCountHint , elicitationCountHint , codeBlockCount , tableCountHint , element . response . toString ( ) ) ;
140
159
break ;
141
160
}
142
161
return label ;
0 commit comments