Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Jan 2, 2025
1 parent 3729d66 commit 73a5a83
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
17 changes: 8 additions & 9 deletions clients/vscode/src/lsp/CodeLensMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,9 @@ export class CodeLensMiddleware implements VscodeLspCodeLensMiddleware {
}

this.removeDecorations(editor);
const result =
codeLenses
.map((codeLens) => this.handleCodeLens(codeLens, editor))
.filter((codeLens): codeLens is CodeLens => codeLens !== null);
const result = codeLenses
.map((codeLens) => this.handleCodeLens(codeLens, editor))
.filter((codeLens): codeLens is CodeLens => codeLens !== null);
this.purgeDecorationMap();
return result;
}
Expand Down Expand Up @@ -113,16 +112,16 @@ export class CodeLensMiddleware implements VscodeLspCodeLensMiddleware {
return null;
}

private addShortcut(codeLens: CodeLens) {
private addShortcut(codeLens: CodeLens) {
if (codeLens.command?.arguments?.[0].action === "accept") {
// TODO: read keybinds from LSP client, then send to LSP server to avoid hardcode.
const acceptShortcut = isBrowser ? '' : ` (${process.platform === 'darwin' ? 'cmd+enter' : 'ctrl+enter'})`;
const acceptShortcut = isBrowser ? "" : ` (${process.platform === "darwin" ? "cmd+enter" : "ctrl+enter"})`;

codeLens.command.title += (acceptShortcut);
codeLens.command.title += acceptShortcut;
} else if (codeLens.command?.arguments?.[0].action === "discard") {
const discardShortcut = isBrowser ? '' : ` (esc)`;
const discardShortcut = isBrowser ? "" : ` (esc)`;

codeLens.command.title += (discardShortcut);
codeLens.command.title += discardShortcut;
}
}

Expand Down
4 changes: 4 additions & 0 deletions ee/tabby-ui/app/files/components/chat-side-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ export const ChatSideBar: React.FC<ChatSideBarProps> = ({
},
readWorkspaceGitRepositories: async () => {
return readWorkspaceGitRepositories.current?.()
},
getActiveEditorSelection: async () => {
// FIXME(@jueliang) implement
return null
}
})

Expand Down

0 comments on commit 73a5a83

Please sign in to comment.