Skip to content

Commit

Permalink
Cody Inline Chat: Add "Collapse All Comments" (#54675)
Browse files Browse the repository at this point in the history
  • Loading branch information
umpox authored and nelsonjr committed Jul 10, 2023
1 parent b4a303d commit b0b761e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
3 changes: 2 additions & 1 deletion client/cody/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ Starting from `0.2.0`, Cody is using `major.EVEN_NUMBER.patch` for release versi
- Added support for server-side token limits to Chat. [pull/54488](https://github.com/sourcegraph/sourcegraph/pull/54488)
- Add "Find code smells" recipe to editor context menu and command pallette [pull/54432](https://github.com/sourcegraph/sourcegraph/pull/54432)
- Add a typewriter effect to Cody's responses to mimic typing in characters rather than varying chunks [pull/54522](https://github.com/sourcegraph/sourcegraph/pull/54522)
- Add suggested recipes to the new chat welcome message. (pull/54277)(https://github.com/sourcegraph/sourcegraph/pull/54277)
- Add suggested recipes to the new chat welcome message. [pull/54277](https://github.com/sourcegraph/sourcegraph/pull/54277)
- Added the option to collapse all inline chats from within the inline chat window. [pull/54675](https://github.com/sourcegraph/sourcegraph/pull/54675)

### Fixed

Expand Down
19 changes: 18 additions & 1 deletion client/cody/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
},
{
"command": "cody.comment.delete",
"title": "Remove Comment",
"title": "Remove Inline Chat",
"category": "Cody Inline Chat",
"when": "cody.activated && config.cody.inlineChat.enabled",
"enablement": "!commentThreadIsEmpty",
Expand All @@ -383,6 +383,14 @@
"enablement": "!commentThreadIsEmpty",
"icon": "$(sync~spin)"
},
{
"command": "cody.comment.collapse-all",
"title": "Collapse All Inline Chats",
"category": "Cody Inline Chat",
"when": "cody.activated && config.cody.inlineChat.enabled",
"enablement": "!commentThreadIsEmpty",
"icon": "$(collapse-all)"
},
{
"command": "cody.inline.new",
"title": "Start a new Thread (Ctrl+Shift+C)",
Expand Down Expand Up @@ -556,6 +564,10 @@
"command": "cody.comment.load",
"when": "false"
},
{
"command": "cody.comment.collapse-all",
"when": "false"
},
{
"command": "cody.fixup.apply",
"when": "false"
Expand Down Expand Up @@ -743,6 +755,11 @@
"command": "cody.comment.load",
"group": "inline@2",
"when": "cody.activated && commentController =~ /^cody-inline/ && cody.reply.pending && config.cody.inlineChat.enabled"
},
{
"command": "cody.comment.collapse-all",
"group": "inline@3",
"when": "cody.activated && commentController =~ /^cody-inline/ && config.cody.inlineChat.enabled"
}
],
"view/item/context": [
Expand Down
3 changes: 3 additions & 0 deletions client/cody/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ const register = async (
vscode.commands.registerCommand('cody.comment.delete', (thread: vscode.CommentThread) => {
commentController.delete(thread)
}),
vscode.commands.registerCommand('cody.comment.collapse-all', () =>
vscode.commands.executeCommand('workbench.action.collapseAllComments')
),
vscode.commands.registerCommand('cody.inline.new', () =>
vscode.commands.executeCommand('workbench.action.addComment')
),
Expand Down

0 comments on commit b0b761e

Please sign in to comment.