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 = (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 = (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 = (props) => { aria-label={language.t("prompt.context.removeActiveFile")} /> - - {(preview) => ( -
-                        {preview()}
-                      
- )} -
)} diff --git a/packages/app/src/pages/session.tsx b/packages/app/src/pages/session.tsx index b2d9747c7..dea9c3d44 100644 --- a/packages/app/src/pages/session.tsx +++ b/packages/app/src/pages/session.tsx @@ -2074,13 +2074,14 @@ export default function Page() { >