@@ -7,6 +7,7 @@ import { CancellationToken } from '../../../../base/common/cancellation.js';
7
7
import { Codicon } from '../../../../base/common/codicons.js' ;
8
8
import { Emitter , Event } from '../../../../base/common/event.js' ;
9
9
import { Disposable , DisposableStore , IDisposable } from '../../../../base/common/lifecycle.js' ;
10
+ import { MarkdownString } from '../../../../base/common/htmlContent.js' ;
10
11
import { localize } from '../../../../nls.js' ;
11
12
import { ContextKeyExpr , IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js' ;
12
13
import { InstantiationType , registerSingleton } from '../../../../platform/instantiation/common/extensions.js' ;
@@ -26,6 +27,8 @@ import { ChatSession, IChatSessionContentProvider, IChatSessionItem, IChatSessio
26
27
import { ChatSessionUri } from '../common/chatUri.js' ;
27
28
import { ChatAgentLocation , ChatModeKind } from '../common/constants.js' ;
28
29
30
+ const CODING_AGENT_DOCS = 'https://code.visualstudio.com/docs/copilot/copilot-coding-agent' ;
31
+
29
32
const extensionPoint = ExtensionsRegistry . registerExtensionPoint < IChatSessionsExtensionPoint [ ] > ( {
30
33
extensionPoint : 'chatSessions' ,
31
34
jsonSchema : {
@@ -275,7 +278,7 @@ export class ChatSessionsService extends Disposable implements IChatSessionsServ
275
278
isDynamic : true ,
276
279
isCodingAgent : true , // TODO: Influences chat UI (eg: locks chat to participant, hides UX elements, etc...)
277
280
slashCommands : [ ] ,
278
- locations : [ ChatAgentLocation . Panel ] , // TODO: This doesn't appear to be respected
281
+ locations : [ ChatAgentLocation . Panel ] ,
279
282
modes : [ ChatModeKind . Agent , ChatModeKind . Ask ] , // TODO: These are no longer respected
280
283
disambiguation : [ ] ,
281
284
metadata : {
@@ -482,6 +485,17 @@ class CodingAgentChatImplementation extends Disposable implements IChatAgentImpl
482
485
483
486
if ( chatSession ?. requestHandler ) {
484
487
await chatSession . requestHandler ( request , progress , [ ] , token ) ;
488
+ } else {
489
+ // TODO(jospicer): Temporary while we work on API for dynamic agent to trigger a session
490
+ const content = new MarkdownString (
491
+ localize ( 'chatSessionNotFound' , "Use `#copilotCodingAgent` to begin a new [coding agent session]({0})." , CODING_AGENT_DOCS ) ,
492
+ ) ;
493
+ progress (
494
+ [ {
495
+ kind : 'markdownContent' ,
496
+ content,
497
+ } ]
498
+ ) ;
485
499
}
486
500
487
501
return { } ;
0 commit comments