|
4 | 4 | *--------------------------------------------------------------------------------------------*/ |
5 | 5 |
|
6 | 6 | import { MarkdownString } from '../../../../../../base/common/htmlContent.js'; |
| 7 | +import { matchesScheme, Schemas } from '../../../../../../base/common/network.js'; |
7 | 8 | import { MarkdownRenderer } from '../../../../../../editor/browser/widget/markdownRenderer/browser/markdownRenderer.js'; |
8 | 9 | import { ConfigurationTarget } from '../../../../../../platform/configuration/common/configuration.js'; |
9 | 10 | import { IInstantiationService } from '../../../../../../platform/instantiation/common/instantiation.js'; |
| 11 | +import { IOpenerService } from '../../../../../../platform/opener/common/opener.js'; |
10 | 12 | import { IPreferencesService, type IOpenSettingsOptions } from '../../../../../services/preferences/common/preferences.js'; |
11 | 13 | import { TerminalContribSettingId } from '../../../../terminal/terminalContribExports.js'; |
12 | 14 | import { migrateLegacyTerminalToolSpecificData } from '../../../common/chat.js'; |
@@ -37,6 +39,7 @@ export class ChatTerminalToolProgressPart extends BaseChatToolInvocationSubPart |
37 | 39 | codeBlockStartIndex: number, |
38 | 40 | codeBlockModelCollection: CodeBlockModelCollection, |
39 | 41 | @IInstantiationService instantiationService: IInstantiationService, |
| 42 | + @IOpenerService openerService: IOpenerService, |
40 | 43 | @IPreferencesService preferencesService: IPreferencesService, |
41 | 44 | ) { |
42 | 45 | super(toolInvocation); |
@@ -65,6 +68,10 @@ export class ChatTerminalToolProgressPart extends BaseChatToolInvocationSubPart |
65 | 68 | }; |
66 | 69 | this.markdownPart = this._register(instantiationService.createInstance(ChatMarkdownContentPart, chatMarkdownContent, context, editorPool, false, codeBlockStartIndex, renderer, { |
67 | 70 | actionHandler: (content) => { |
| 71 | + if (matchesScheme(content, Schemas.https)) { |
| 72 | + openerService.open(content); |
| 73 | + return; |
| 74 | + } |
68 | 75 | const [type, scopeRaw] = content.split('_'); |
69 | 76 | switch (type) { |
70 | 77 | case 'settings': { |
|
0 commit comments