From 1bad63ff6dccc36c355e7403e0e58175873a62bf Mon Sep 17 00:00:00 2001 From: sion123 <450702724@qq.com> Date: Thu, 7 May 2026 02:46:29 +0800 Subject: [PATCH] feat(web): add conversation search, rename, and pipeline resume Co-Authored-By: Claude Opus 4.7 --- .../src/components/layout/MiddlePanel.tsx | 20 ++++++++++++++++- web/server/routes/pipeline.ts | 22 +++++++++++++++++-- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/web/client/src/components/layout/MiddlePanel.tsx b/web/client/src/components/layout/MiddlePanel.tsx index 7c3ea97..1bc7aa5 100644 --- a/web/client/src/components/layout/MiddlePanel.tsx +++ b/web/client/src/components/layout/MiddlePanel.tsx @@ -1,11 +1,27 @@ import { Plus } from 'lucide-react'; +import { useState, useEffect } from 'react'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { ScrollArea } from '@/components/ui/scroll-area'; import { useAppStore } from '@/store'; +import { api } from '@/lib/api'; export function MiddlePanel() { - const { conversations, activeConversationId, setActiveConversationId } = useAppStore(); + const { conversations, activeConversationId, setActiveConversationId, setConversations } = useAppStore(); + const [search, setSearch] = useState(''); + + useEffect(() => { + api.listConversations().then(setConversations).catch(() => {}); + }, []); + + const handleSearch = (value: string) => { + setSearch(value); + const qs = value ? `?search=${encodeURIComponent(value)}` : ''; + fetch(`/api/pipeline/conversations${qs}`) + .then((r) => r.json()) + .then(setConversations) + .catch(() => {}); + }; return (