Skip to content

Commit

Permalink
🐛 fix bug when clicking on file context item
Browse files Browse the repository at this point in the history
  • Loading branch information
sestinj committed Feb 1, 2024
1 parent 3c65109 commit 98fdcea
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions core/config/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const defaultConfig: SerializedContinueConfig = {
},
{ name: "terminal", params: {} },
{ name: "problems", params: {} },
{ name: "codebase", params: {} },
],
};

Expand Down
4 changes: 2 additions & 2 deletions extensions/vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 10 additions & 6 deletions gui/src/components/mainInput/ContextItemsPeek.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,16 @@ const ContextItemsPeek = (props: ContextItemsPeekProps) => {
contextItem.description.startsWith("/") ||
contextItem.description.startsWith("\\")
) {
const rif = contextItemToRangeInFileWithContents(contextItem);
new ExtensionIde().showLines(
rif.filepath,
rif.range.start.line,
rif.range.end.line
);
if (contextItem.name.includes(" (") && contextItem.name.endsWith(")")) {
const rif = contextItemToRangeInFileWithContents(contextItem);
new ExtensionIde().showLines(
rif.filepath,
rif.range.start.line,
rif.range.end.line
);
} else {
new ExtensionIde().openFile(contextItem.description);
}
} else {
new ExtensionIde().showVirtualFile(contextItem.name, contextItem.content);
}
Expand Down

0 comments on commit 98fdcea

Please sign in to comment.