diff options
Diffstat (limited to 'packages/app/src/components/prompt-input.tsx')
| -rw-r--r-- | packages/app/src/components/prompt-input.tsx | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx index c736ef0f1..1bd7aa4eb 100644 --- a/packages/app/src/components/prompt-input.tsx +++ b/packages/app/src/components/prompt-input.tsx @@ -171,7 +171,6 @@ export const PromptInput: Component<PromptInputProps> = (props) => { const sessionKey = createMemo(() => `${params.dir}${params.id ? "/" + params.id : ""}`) const tabs = createMemo(() => layout.tabs(sessionKey)) - const view = createMemo(() => layout.view(sessionKey)) const commentInReview = (path: string) => { const sessionID = params.id @@ -187,20 +186,15 @@ export const PromptInput: Component<PromptInputProps> = (props) => { const focus = { file: item.path, id: item.commentID } comments.setActive(focus) - view().reviewPanel.open() - if (item.commentOrigin === "review") { - tabs().open("review") - requestAnimationFrame(() => comments.setFocus(focus)) - return - } - - if (item.commentOrigin !== "file" && commentInReview(item.path)) { - tabs().open("review") + const wantsReview = item.commentOrigin === "review" || (item.commentOrigin !== "file" && commentInReview(item.path)) + if (wantsReview) { + layout.fileTree.setTab("changes") requestAnimationFrame(() => comments.setFocus(focus)) return } + layout.fileTree.setTab("all") const tab = files.tab(item.path) tabs().open(tab) files.load(item.path) |
