summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/components
diff options
context:
space:
mode:
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>