Skip to content

Commit

Permalink
Chat: Fix chat panel titles (#2345)
Browse files Browse the repository at this point in the history
## Description

closes #2260

Fixes the title of reopened chat panels.

We were using the `chatId` by accident before, due to a mistake when
calling this function

> [!NOTE]  
> We could just not pass the `chatId` but we have two implementations of
the ChatPanelProvider right now. One relies on the `chatId` and one
doesn't. Will start a thread on Slack to discuss this as it can be quite
confusing to debug!

### Before

<img width="340" alt="image"
src="https://github.com/sourcegraph/cody/assets/9516420/3fbab1d9-1514-4f71-961c-ce7a617b06da">

### After

<img width="346" alt="image"
src="https://github.com/sourcegraph/cody/assets/9516420/5cb40b39-644e-4043-bf59-30c1f3f27fb4">


## Test plan

1. Create a chat and ask a question
2. Close the chat
3. Reopen the chat by selecting it from the chat history in the sidebar
4. Inspect the title

<!-- Required. See
https://docs.sourcegraph.com/dev/background-information/testing_principles.
-->
  • Loading branch information
umpox committed Dec 13, 2023
1 parent af9c9dc commit e96fcfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This is a log of all notable changes to Cody for VS Code. [Unreleased] changes a
- Autocomplete: Don't show loading indicator when a user is rate limited. [pull/2314](https://github.com/sourcegraph/cody/pull/2314)
- Fixes an issue where the wrong rate limit count was shown. [pull/2312](https://github.com/sourcegraph/cody/pull/2312)
- Chat: Fix icon rendering on the null state. [pull/2336](https://github.com/sourcegraph/cody/pull/2336)
- Chat: Reopened chat panels now use the correct chat title. [pull/2345](https://github.com/sourcegraph/cody/pull/2345)

### Changed

Expand Down
1 change: 1 addition & 0 deletions vscode/src/chat/chat-view/SimpleChatPanelProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ export class SimpleChatPanelProvider implements vscode.Disposable, IChatPanelPro
*/
public async createWebviewPanel(
activePanelViewColumn?: vscode.ViewColumn,
_chatId?: string,
lastQuestion?: string
): Promise<vscode.WebviewPanel> {
// Checks if the webview panel already exists and is visible.
Expand Down

0 comments on commit e96fcfa

Please sign in to comment.