Skip to content

Suppress chat tips in terminal/editor inline chat#295170

Merged
meganrogge merged 3 commits intomainfrom
copilot/fix-terminal-inline-chat-tip
Feb 13, 2026
Merged

Suppress chat tips in terminal/editor inline chat#295170
meganrogge merged 3 commits intomainfrom
copilot/fix-terminal-inline-chat-tip

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

ChatTipService was showing tips in terminal inline chat and editor inline chat, where they're irrelevant (e.g., "Select a code block in the editor and right-click…").

  • Add _isChatLocation() helper to check ChatContextKeys.location — used in both getNextTip() and getWelcomeTip() to return undefined for any location other than ChatAgentLocation.Chat
  • Add tests for terminal and editor inline chat suppression
Original prompt

This section details on the original issue you should resolve

<issue_title>terminal inline chat is showing chat tip and shouldn't be</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

… inline)

Chat tips were being shown in terminal inline chat and editor inline chat
where they are not relevant. Add location check in ChatTipService to only
show tips when the chat location is the main panel.

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix terminal inline chat displaying chat tip Suppress chat tips in terminal/editor inline chat Feb 13, 2026
Copilot AI requested a review from meganrogge February 13, 2026 14:03
}

// Only show tips in the main chat panel, not in terminal/editor inline chat
const location = contextKeyService.getContextKeyValue<ChatAgentLocation>(ChatContextKeys.location.key);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot this is used elswhere, should it be a helper function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extracted it into a _isChatLocation() helper in a3e2bec.

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 13, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • redirector.gvt1.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --crashpad-handler-pid=7799 --enable-crash-reporter=5ccd2e3d-a53b-4b62-b66d-d0d79ef69a73,no_channel --user-data-dir=/tmp/vscode-tests-1770991897068 --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8086131692122337619,10212704158986610494,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --trace-process-track-uuid=3190708989122997041 tsconfig.json node_modules/.bin/node alse --sourceMapsh .json n/node sh (dns block)
    • Triggering command: .build/electron/code-oss .build/electron/code-oss test/unit/electron/index.js --crash-reporter-directory=/home/REDACTED/work/vscode/vscode/.build/crashes --grep ChatTipService ript-language-fefalse -conflict/tsconf--sourceMap 0/x64/bin/sh (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@meganrogge meganrogge marked this pull request as ready for review February 13, 2026 14:14
Copilot AI review requested due to automatic review settings February 13, 2026 14:14
@meganrogge meganrogge enabled auto-merge (squash) February 13, 2026 14:14
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 13, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where chat tips were incorrectly appearing in terminal inline chat and editor inline chat contexts, where they are not relevant. The fix adds location-based filtering to ChatTipService to ensure tips only appear in the main chat panel.

Changes:

  • Added _isChatLocation() helper method to check if the current context is ChatAgentLocation.Chat
  • Applied location filtering to both getNextTip() and getWelcomeTip() methods
  • Added test cases to verify tips are suppressed in Terminal and EditorInline locations

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/vs/workbench/contrib/chat/browser/chatTipService.ts Added _isChatLocation() helper and integrated location checks into getNextTip() and getWelcomeTip() to suppress tips in non-Chat locations
src/vs/workbench/contrib/chat/test/browser/chatTipService.test.ts Added test cases for Terminal and EditorInline location suppression
Comments suppressed due to low confidence (1)

src/vs/workbench/contrib/chat/test/browser/chatTipService.test.ts:165

  • Consider adding location check tests for getWelcomeTip() as well, since it also has the location filter implemented. The current tests only verify location filtering for getNextTip(), but getWelcomeTip() at line 702-704 also checks location and should suppress tips in terminal/editor inline chat contexts.
	test('returns undefined when location is editor inline', () => {
		const service = createService();
		const now = Date.now();

		const editorContextKeyService = new MockContextKeyServiceWithRulesMatching();
		editorContextKeyService.createKey(ChatContextKeys.location.key, ChatAgentLocation.EditorInline);

		const tip = service.getNextTip('request-1', now + 1000, editorContextKeyService);
		assert.strictEqual(tip, undefined, 'Should not return a tip in editor inline chat');
	});

@meganrogge meganrogge merged commit 60bf105 into main Feb 13, 2026
24 checks passed
@meganrogge meganrogge deleted the copilot/fix-terminal-inline-chat-tip branch February 13, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

terminal inline chat is showing chat tip and shouldn't be

3 participants