feat(frontend): remove IngestPanel from LTT page (sub-phase 2.1)
Remove redundant upload panel from LTT page. Upload functionality lives on the RAG Database page. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
d49756f374
commit
0ba8ff2e24
|
|
@ -1,10 +1,9 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { Film } from 'lucide-react'
|
import { Film } from 'lucide-react'
|
||||||
import { useQueryDocument, useIngestDocument } from '../lib/queries'
|
import { useQueryDocument } from '../lib/queries'
|
||||||
import { QueryInput } from '../components/QueryInput'
|
import { QueryInput } from '../components/QueryInput'
|
||||||
import { KeywordsDisplay } from '../components/KeywordsDisplay'
|
import { KeywordsDisplay } from '../components/KeywordsDisplay'
|
||||||
import { ResponsePanel } from '../components/ResponsePanel'
|
import { ResponsePanel } from '../components/ResponsePanel'
|
||||||
import { IngestPanel } from '../components/IngestPanel'
|
|
||||||
|
|
||||||
const VideoPlaceholder: React.FC = () => {
|
const VideoPlaceholder: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
|
|
@ -19,16 +18,11 @@ const VideoPlaceholder: React.FC = () => {
|
||||||
|
|
||||||
export const LTTPage: React.FC = () => {
|
export const LTTPage: React.FC = () => {
|
||||||
const queryMutation = useQueryDocument()
|
const queryMutation = useQueryDocument()
|
||||||
const ingestMutation = useIngestDocument()
|
|
||||||
|
|
||||||
const handleQuerySubmit = (question: string): void => {
|
const handleQuerySubmit = (question: string): void => {
|
||||||
queryMutation.mutate({ question })
|
queryMutation.mutate({ question })
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleFileUpload = (file: File): void => {
|
|
||||||
ingestMutation.mutate(file)
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-full grid grid-rows-[30%_1fr] grid-cols-2 bg-gray-50">
|
<div className="h-full grid grid-rows-[30%_1fr] grid-cols-2 bg-gray-50">
|
||||||
<div className="border-r border-b border-gray-200 p-4 min-h-0 overflow-hidden">
|
<div className="border-r border-b border-gray-200 p-4 min-h-0 overflow-hidden">
|
||||||
|
|
@ -37,12 +31,6 @@ export const LTTPage: React.FC = () => {
|
||||||
<div className="border-b border-gray-200 p-6 flex flex-col gap-4 overflow-y-auto min-h-0">
|
<div className="border-b border-gray-200 p-6 flex flex-col gap-4 overflow-y-auto min-h-0">
|
||||||
<QueryInput onSubmit={handleQuerySubmit} isLoading={queryMutation.isPending} />
|
<QueryInput onSubmit={handleQuerySubmit} isLoading={queryMutation.isPending} />
|
||||||
<KeywordsDisplay keywords={queryMutation.data?.keywords} isLoading={queryMutation.isPending} />
|
<KeywordsDisplay keywords={queryMutation.data?.keywords} isLoading={queryMutation.isPending} />
|
||||||
<IngestPanel
|
|
||||||
onUpload={handleFileUpload}
|
|
||||||
isLoading={ingestMutation.isPending}
|
|
||||||
success={ingestMutation.isSuccess ? ingestMutation.data?.filename ?? null : null}
|
|
||||||
error={ingestMutation.isError ? (ingestMutation.error instanceof Error ? ingestMutation.error.message : 'Upload failed') : null}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="col-span-2 p-6 border-t border-gray-200 overflow-y-auto min-h-0">
|
<div className="col-span-2 p-6 border-t border-gray-200 overflow-y-auto min-h-0">
|
||||||
<ResponsePanel
|
<ResponsePanel
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue