summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/components
diff options
context:
space:
mode:
authorAdam <[email protected]>2026-01-21 13:31:06 -0600
committerAdam <[email protected]>2026-01-22 22:12:12 -0600
commit1e1872aada10fc39126e13675560e692e80258d0 (patch)
tree0953f5260711ad2232af9f5d3ba5c3fe031f93ab /packages/app/src/components
parentcb481d9ac861813d4ff091ed33bcac9e882da1a1 (diff)
downloadopencode-1e1872aada10fc39126e13675560e692e80258d0.tar.gz
opencode-1e1872aada10fc39126e13675560e692e80258d0.zip
wip(app): line selection
Diffstat (limited to 'packages/app/src/components')
-rw-r--r--packages/app/src/components/prompt-input.tsx24
1 files changed, 0 insertions, 24 deletions
diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx
index b2c8cccca..10af351cb 100644
--- a/packages/app/src/components/prompt-input.tsx
+++ b/packages/app/src/components/prompt-input.tsx
@@ -167,18 +167,6 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
return files.pathFromTab(tab)
})
- const selectionPreview = (path: string, selection?: FileSelection, preview?: string) => {
- 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 activeFileSelection = createMemo(() => {
const path = activeFile()
if (!path) return
@@ -186,11 +174,6 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
if (!range) return
return selectionFromLines(range)
})
- const activeSelectionPreview = createMemo(() => {
- const path = activeFile()
- if (!path) return
- return selectionPreview(path, activeFileSelection())
- })
const info = createMemo(() => (params.id ? sync.session.get(params.id) : undefined))
const status = createMemo(
() =>
@@ -1534,13 +1517,6 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
aria-label={language.t("prompt.context.removeActiveFile")}
/>
</div>
- <Show when={activeSelectionPreview()}>
- {(preview) => (
- <pre class="text-10-regular text-text-weak font-mono whitespace-pre-wrap leading-4">
- {preview()}
- </pre>
- )}
- </Show>
</div>
)}
</Show>