From 82ec84982e2af3c755502865e11f7325bf0ea208 Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Fri, 23 Jan 2026 05:01:10 -0600 Subject: [PATCH] Reapply "wip(app): line selection" This reverts commit df7b6792cdfb8988c62e3d2ed8e8d8b702bb2bba. --- packages/app/src/components/prompt-input.tsx | 22 ++------------------ 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx index 24a96d1b4..72bc927fa 100644 --- a/packages/app/src/components/prompt-input.tsx +++ b/packages/app/src/components/prompt-input.tsx @@ -162,18 +162,6 @@ export const PromptInput: Component = (props) => { const tabs = createMemo(() => layout.tabs(sessionKey())) const view = createMemo(() => layout.view(sessionKey())) - const selectionPreview = (path: string, selection: FileSelection | undefined, preview: string | undefined) => { - if (preview) return preview - if (!selection) return undefined - const content = files.get(path)?.content?.content - if (!content) return undefined - const start = Math.max(1, Math.min(selection.startLine, selection.endLine)) - const end = Math.max(selection.startLine, selection.endLine) - const lines = content.split("\n").slice(start - 1, end) - if (lines.length === 0) return undefined - return lines.slice(0, 2).join("\n") - } - const recent = createMemo(() => { const all = tabs().all() const active = tabs().active() @@ -1288,6 +1276,7 @@ export const PromptInput: Component = (props) => { id: string type: "text" text: string + synthetic?: boolean } | { id: string @@ -1325,6 +1314,7 @@ export const PromptInput: Component = (props) => { id: Identifier.ascending("part"), type: "text", text: commentNote(input.path, input.selection, comment), + synthetic: true, }) } @@ -1572,7 +1562,6 @@ export const PromptInput: Component = (props) => {
{(item) => { - const preview = createMemo(() => selectionPreview(item.path, item.selection, item.preview)) return (
= (props) => { {(comment) =>
{comment()}
}
- - {(content) => ( -
-                          {content()}
-                        
- )} -
) }}