@@ -7,6 +7,7 @@ import { CancellationToken } from '../../../../base/common/cancellation.js';
77import { Codicon } from '../../../../base/common/codicons.js' ;
88import { Emitter , Event } from '../../../../base/common/event.js' ;
99import { Disposable , DisposableStore , IDisposable } from '../../../../base/common/lifecycle.js' ;
10+ import { MarkdownString } from '../../../../base/common/htmlContent.js' ;
1011import { localize } from '../../../../nls.js' ;
1112import { ContextKeyExpr , IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js' ;
1213import { InstantiationType , registerSingleton } from '../../../../platform/instantiation/common/extensions.js' ;
@@ -26,6 +27,8 @@ import { ChatSession, IChatSessionContentProvider, IChatSessionItem, IChatSessio
2627import { ChatSessionUri } from '../common/chatUri.js' ;
2728import { ChatAgentLocation , ChatModeKind } from '../common/constants.js' ;
2829
30+ const CODING_AGENT_DOCS = 'https://code.visualstudio.com/docs/copilot/copilot-coding-agent' ;
31+
2932const extensionPoint = ExtensionsRegistry . registerExtensionPoint < IChatSessionsExtensionPoint [ ] > ( {
3033 extensionPoint : 'chatSessions' ,
3134 jsonSchema : {
@@ -275,7 +278,7 @@ export class ChatSessionsService extends Disposable implements IChatSessionsServ
275278 isDynamic : true ,
276279 isCodingAgent : true , // TODO: Influences chat UI (eg: locks chat to participant, hides UX elements, etc...)
277280 slashCommands : [ ] ,
278- locations : [ ChatAgentLocation . Panel ] , // TODO: This doesn't appear to be respected
281+ locations : [ ChatAgentLocation . Panel ] ,
279282 modes : [ ChatModeKind . Agent , ChatModeKind . Ask ] , // TODO: These are no longer respected
280283 disambiguation : [ ] ,
281284 metadata : {
@@ -482,6 +485,17 @@ class CodingAgentChatImplementation extends Disposable implements IChatAgentImpl
482485
483486 if ( chatSession ?. requestHandler ) {
484487 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+ ) ;
485499 }
486500
487501 return { } ;
0 commit comments