@tablestore/tablestore-agent-cli 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/kb/create.d.ts.map +1 -1
- package/dist/commands/kb/create.js +9 -0
- package/dist/commands/kb/create.js.map +1 -1
- package/dist/commands/kb/retrieve.d.ts.map +1 -1
- package/dist/commands/kb/retrieve.js +40 -3
- package/dist/commands/kb/retrieve.js.map +1 -1
- package/dist/dashboard-runtime/dashboard/.next/BUILD_ID +1 -1
- package/dist/dashboard-runtime/dashboard/.next/build-manifest.json +3 -3
- package/dist/dashboard-runtime/dashboard/.next/prerender-manifest.json +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/documents/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/documents/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/qa/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/qa/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/retrieval/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/retrieval/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/settings/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/settings/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/create/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/create/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/[id]/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/[id]/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/new/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/new/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/messages/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/messages/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/requests/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/requests/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/search/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/search/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/settings/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/settings/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/create/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/create/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/status/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/token/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/token/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/use/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/chunks/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/upload/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/retrieve/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/chat/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/models/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/test/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/requests/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/search/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/[memoryId]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.rsc +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_full.segment.rsc +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_head.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_index.segment.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/onboarding.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0n~ec7s.js +6 -6
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0b1r_app_(dashboard)_knowledge-base_[name]_documents_documents-client_tsx_0g2uxmt._.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0e95_src_app_(dashboard)_knowledge-base_[name]_settings_settings-client_tsx_13312zk._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__08faq-z._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0c94d.y._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0jb9ccl._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__00uh_im._.js → [root-of-the-server]__0lgg04c._.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_01-2v37._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_01ag-vl._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0atzifq._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0f4u0.1._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0gbt~hy._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0gl7kh7._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0j-q~ro._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0jghj2_._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0jlyg05._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0n4gd_6._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{_0l~-9i0._.js → _0tdjkbc._.js} +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0tej2s.._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_10u~-xc._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_12r9c8h._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0.glq39._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_00ofp7q._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_05.qn9h._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_065m1.j._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0xf3ffa._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0y49vhd._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_10dsqx~._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_knowledge-base_create_page_tsx_0916~g-._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_units_page_tsx_0.6xnei._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_0ls1exu._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_0ugdjlb._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/middleware-build-manifest.js +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/pages/404.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/pages/500.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/00wmf85833643.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/02tj1_rhgobzv.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0mea2ylxe.umh.js → 02zf3qddfaw~u.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/039i70t10axdd.css +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/04bfame9rk.3d.js +5 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07ygw8215kyvc.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0b5hr027rat4w.js +138 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0__g1ogrdh412.js → 0bkm-5yza5~d2.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0lrw.bnws62y9.js → 0d7d.b.v9noym.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0cto67_iw~p9z.js → 0fdofp-3kkc4g.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{18d_i28~jrf91.js → 0i8hdbek9j-fu.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ioivx4pbmayb.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0lp2g_27uyhuz.js → 0je7fmsrz2vok.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jukioxtp1mn3.js +138 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0klidr2i6cd.g.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k~bkh1586r2i.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0nakvv2p1kjnf.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0un~rqes29pcr.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v.u57bsjppd_.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x3w~yxvm1xsq.js +4 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x5gol39unrgb.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/12s59v_sk0q-z.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{06uuhz24tvdt..js → 14~eqof4660i3.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/16y3764x-fh1n.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/17mcnyr~1j7ih.js +1 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/documents/documents-client.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/layout-client.tsx +62 -26
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/messages/page.tsx +8 -4
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/requests/page.tsx +6 -2
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/requests/request-detail-dialog.tsx +9 -9
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/requests/requests-table.tsx +2 -2
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/search/page.tsx +5 -1
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/units/page.tsx +11 -7
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/create/page.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/page.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/route.ts +124 -13
- package/dist/dashboard-runtime/dashboard/src/app/globals.css +23 -0
- package/dist/dashboard-runtime/dashboard/src/components/chat/chat-config-context.tsx +39 -17
- package/dist/dashboard-runtime/dashboard/src/components/chat/chat-mount-config.tsx +1 -0
- package/dist/dashboard-runtime/dashboard/src/components/chat/memory-bind-section.tsx +15 -15
- package/dist/dashboard-runtime/dashboard/src/components/chat/mount-retrieval-dialog.tsx +360 -0
- package/dist/dashboard-runtime/dashboard/src/components/chat/mount-row.tsx +49 -5
- package/dist/dashboard-runtime/dashboard/src/components/chat/unified-retrieval-section.tsx +61 -26
- package/dist/dashboard-runtime/dashboard/src/components/documents/doc-chunks-dialog.tsx +72 -20
- package/dist/dashboard-runtime/dashboard/src/components/instance/connect-instance-form.tsx +5 -0
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/embedding-config-form.tsx +16 -2
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-card.tsx +37 -24
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-create-form.tsx +173 -86
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-settings-form.tsx +319 -280
- package/dist/dashboard-runtime/dashboard/src/components/layout/detail-sidebar.tsx +47 -18
- package/dist/dashboard-runtime/dashboard/src/components/layout/sidebar-instance-card.tsx +2 -2
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-add-dialog.tsx +2 -2
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-edit-dialog.tsx +2 -2
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-messages-table.tsx +3 -3
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-requests-table.tsx +12 -12
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-scope-bar.tsx +20 -11
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-search-form.tsx +7 -7
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-search-results.tsx +6 -6
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-store-card.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-store-list.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-unit-detail-panel.tsx +4 -4
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-unit-table.tsx +2 -2
- package/dist/dashboard-runtime/dashboard/src/components/qa/qa-message.tsx +104 -7
- package/dist/dashboard-runtime/dashboard/src/components/retrieval/retrieval-form.tsx +241 -24
- package/dist/dashboard-runtime/dashboard/src/components/retrieval/retrieval-rerank-fields.tsx +1 -0
- package/dist/dashboard-runtime/dashboard/src/components/retrieval/retrieval-result-card.tsx +52 -4
- package/dist/dashboard-runtime/dashboard/src/components/shared/status-badge.tsx +10 -5
- package/dist/dashboard-runtime/dashboard/src/components/ui/nav-tab-bar.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-chat-history.ts +9 -5
- package/dist/dashboard-runtime/dashboard/src/lib/constants.ts +8 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/llm-client.ts +19 -1
- package/dist/dashboard-runtime/dashboard/src/schemas/knowledge-base.ts +6 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/retrieval.ts +46 -27
- package/dist/dashboard-runtime/dashboard/src/types/knowledge-base.ts +10 -0
- package/dist/dashboard-runtime/dashboard/src/types/retrieval.ts +9 -4
- package/dist/dashboard-runtime/dashboard/tailwind.config.ts +4 -0
- package/dist/dashboard-runtime/dashboard/vitest.config.mjs +5 -2
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/types.d.ts +21 -5
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/types.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/types.d.ts +21 -5
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/types.d.ts.map +1 -1
- package/dist/utils/read-image-input.d.ts +47 -0
- package/dist/utils/read-image-input.d.ts.map +1 -0
- package/dist/utils/read-image-input.js +89 -0
- package/dist/utils/read-image-input.js.map +1 -0
- package/package.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0hozzu6._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0tr8-3u._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0uu1sjh._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0vasoy6._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_12~3vfk._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_13_lb.o._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0ejgygh._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_ui_0-tuf-h._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0535h0pr4~.-1.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/062k9jbtd9.lv.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/06aj_c5rwvkut.js +0 -4
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07t_2t_-s9aq_.js +0 -5
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0bs_w1~xt92db.js +0 -138
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0d29.l~3ip181.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0gjg-rd.ybcga.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jc31diex030o.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0m6zpy2h1p2vp.js +0 -138
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0rm8~7jovs879.css +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0t0yqi68~eil6.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0th7u6qvdy3x2.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0tmwptel_4y0o.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u6_s-0w8.yr..js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v9d5wl9nsva3.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/14.dp0-y_mhjo.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/15bzqpm440jvz.js +0 -1
- /package/dist/dashboard-runtime/dashboard/.next/static/{Vhp9IA5UJNqZzEyFxakjw → EIbKHHti0Z1ephKfJzCKH}/_buildManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{Vhp9IA5UJNqZzEyFxakjw → EIbKHHti0Z1ephKfJzCKH}/_clientMiddlewareManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{Vhp9IA5UJNqZzEyFxakjw → EIbKHHti0Z1ephKfJzCKH}/_ssgManifest.js +0 -0
|
@@ -111,6 +111,10 @@ interface DetailSidebarHeaderProps
|
|
|
111
111
|
typeLabel?: React.ReactNode;
|
|
112
112
|
description?: React.ReactNode;
|
|
113
113
|
actions?: React.ReactNode;
|
|
114
|
+
/** Status pills (multimodal / subspace / etc.) rendered as their own
|
|
115
|
+
* row directly below the icon — kept separate from `name` so they
|
|
116
|
+
* get their own line and don't crowd the title row. */
|
|
117
|
+
pills?: React.ReactNode;
|
|
114
118
|
/** Tags / chips / dates / extra info. Wrapped in a flex container with
|
|
115
119
|
* small text already applied. */
|
|
116
120
|
extra?: React.ReactNode;
|
|
@@ -123,21 +127,53 @@ export function DetailSidebarHeader({
|
|
|
123
127
|
typeLabel,
|
|
124
128
|
description,
|
|
125
129
|
actions,
|
|
130
|
+
pills,
|
|
126
131
|
extra,
|
|
127
132
|
}: DetailSidebarHeaderProps) {
|
|
128
133
|
const { toggle } = useDetailSidebarCollapsed();
|
|
129
134
|
return (
|
|
130
135
|
<header className="flex flex-col gap-2 border-b border-[hsl(var(--border-light))] px-4 pb-4 pt-4">
|
|
131
|
-
|
|
132
|
-
|
|
136
|
+
{/*
|
|
137
|
+
Identity row: accent icon on the left, the name + optional type
|
|
138
|
+
label in the middle (truncates with ellipsis when too long), and
|
|
139
|
+
consumer actions plus the built-in "collapse sidebar" button on
|
|
140
|
+
the right. Status pills sit on their own row underneath so they
|
|
141
|
+
can wrap freely without squeezing the title.
|
|
142
|
+
*/}
|
|
143
|
+
<div className="flex items-center gap-3">
|
|
144
|
+
<div className={cn(detailIconAccent({ accent }), "shrink-0")}>
|
|
145
|
+
{icon}
|
|
146
|
+
</div>
|
|
147
|
+
<div className="min-w-0 flex-1 space-y-0.5">
|
|
148
|
+
{typeof name === "string" ? (
|
|
149
|
+
<TooltipProvider delayDuration={200}>
|
|
150
|
+
<Tooltip>
|
|
151
|
+
<TooltipTrigger asChild>
|
|
152
|
+
<div className="truncate text-sm font-semibold leading-tight text-[hsl(var(--foreground))]">
|
|
153
|
+
{name}
|
|
154
|
+
</div>
|
|
155
|
+
</TooltipTrigger>
|
|
156
|
+
<TooltipContent side="bottom" sideOffset={4}>
|
|
157
|
+
{name}
|
|
158
|
+
</TooltipContent>
|
|
159
|
+
</Tooltip>
|
|
160
|
+
</TooltipProvider>
|
|
161
|
+
) : (
|
|
162
|
+
<div className="truncate text-sm font-semibold leading-tight text-[hsl(var(--foreground))]">
|
|
163
|
+
{name}
|
|
164
|
+
</div>
|
|
165
|
+
)}
|
|
166
|
+
{typeLabel ? (
|
|
167
|
+
<div className="truncate text-[11px] font-semibold uppercase tracking-wider text-[hsl(var(--muted-foreground))]">
|
|
168
|
+
{typeLabel}
|
|
169
|
+
</div>
|
|
170
|
+
) : null}
|
|
171
|
+
</div>
|
|
133
172
|
{/*
|
|
134
|
-
Right-side controls:
|
|
135
|
-
|
|
136
|
-
baked in so every detail page gets it for free; it sits to the
|
|
137
|
-
right of consumer actions so it always lands at the far edge —
|
|
138
|
-
the visual anchor users learn to reach for.
|
|
173
|
+
Right-side controls: consumer actions (delete, etc.) plus a
|
|
174
|
+
built-in "collapse sidebar" button anchored at the far edge.
|
|
139
175
|
*/}
|
|
140
|
-
<div className="-
|
|
176
|
+
<div className="-mr-1 flex shrink-0 items-center gap-0.5">
|
|
141
177
|
{actions}
|
|
142
178
|
<TooltipProvider delayDuration={200}>
|
|
143
179
|
<Tooltip>
|
|
@@ -158,16 +194,9 @@ export function DetailSidebarHeader({
|
|
|
158
194
|
</TooltipProvider>
|
|
159
195
|
</div>
|
|
160
196
|
</div>
|
|
161
|
-
|
|
162
|
-
<div className="
|
|
163
|
-
|
|
164
|
-
</div>
|
|
165
|
-
{typeLabel ? (
|
|
166
|
-
<div className="text-[11px] font-semibold uppercase tracking-wider text-[hsl(var(--muted-foreground))]">
|
|
167
|
-
{typeLabel}
|
|
168
|
-
</div>
|
|
169
|
-
) : null}
|
|
170
|
-
</div>
|
|
197
|
+
{pills ? (
|
|
198
|
+
<div className="flex flex-wrap gap-2">{pills}</div>
|
|
199
|
+
) : null}
|
|
171
200
|
{description ? (
|
|
172
201
|
<p className="line-clamp-3 text-[13px] leading-snug text-[hsl(var(--muted-foreground))]">
|
|
173
202
|
{description}
|
|
@@ -60,7 +60,7 @@ export function SidebarInstanceCard({ collapsed }: SidebarInstanceCardProps) {
|
|
|
60
60
|
<DropdownMenuTrigger asChild>
|
|
61
61
|
<button
|
|
62
62
|
type="button"
|
|
63
|
-
aria-label={activeName ?
|
|
63
|
+
aria-label={activeName ? `当前项目:${activeName}` : "选择项目"}
|
|
64
64
|
title={activeName ?? "选择项目"}
|
|
65
65
|
disabled={isLoading}
|
|
66
66
|
className={cn(
|
|
@@ -103,7 +103,7 @@ export function SidebarInstanceCard({ collapsed }: SidebarInstanceCardProps) {
|
|
|
103
103
|
>
|
|
104
104
|
<div className="flex flex-1 flex-col overflow-hidden">
|
|
105
105
|
<span className="text-[11px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]">
|
|
106
|
-
|
|
106
|
+
当前项目
|
|
107
107
|
</span>
|
|
108
108
|
<span className="truncate text-sm font-semibold text-[hsl(var(--foreground))]">
|
|
109
109
|
{activeName ?? "未选择"}
|
|
@@ -67,7 +67,7 @@ export function MemoryAddDialog({
|
|
|
67
67
|
</DialogHeader>
|
|
68
68
|
<div className="space-y-4">
|
|
69
69
|
<div className="space-y-2">
|
|
70
|
-
<Label
|
|
70
|
+
<Label>记忆文本</Label>
|
|
71
71
|
<Textarea
|
|
72
72
|
value={text}
|
|
73
73
|
onChange={(event) => setText(event.target.value)}
|
|
@@ -76,7 +76,7 @@ export function MemoryAddDialog({
|
|
|
76
76
|
/>
|
|
77
77
|
</div>
|
|
78
78
|
<div className="space-y-2">
|
|
79
|
-
<Label
|
|
79
|
+
<Label>元数据(JSON,可选)</Label>
|
|
80
80
|
<Textarea
|
|
81
81
|
value={metadataJson}
|
|
82
82
|
onChange={(event) => setMetadataJson(event.target.value)}
|
|
@@ -70,11 +70,11 @@ export function MemoryEditDialog({
|
|
|
70
70
|
</DialogHeader>
|
|
71
71
|
<form key={unitKey} onSubmit={handleSubmit} className="space-y-4">
|
|
72
72
|
<div className="space-y-2">
|
|
73
|
-
<Label
|
|
73
|
+
<Label>记忆文本</Label>
|
|
74
74
|
<Textarea name="text" defaultValue={unit?.text ?? ""} rows={5} />
|
|
75
75
|
</div>
|
|
76
76
|
<div className="space-y-2">
|
|
77
|
-
<Label
|
|
77
|
+
<Label>元数据(JSON)</Label>
|
|
78
78
|
<Textarea
|
|
79
79
|
name="metadata"
|
|
80
80
|
defaultValue={unit?.metadata ? JSON.stringify(unit.metadata, null, 2) : ""}
|
|
@@ -76,7 +76,7 @@ export function MemoryMessagesTable({ messages }: MemoryMessagesTableProps) {
|
|
|
76
76
|
if (!messages.length) {
|
|
77
77
|
return (
|
|
78
78
|
<div className="rounded-lg border border-dashed py-12 text-center text-sm text-muted-foreground">
|
|
79
|
-
|
|
79
|
+
当前范围下暂无消息记录
|
|
80
80
|
</div>
|
|
81
81
|
);
|
|
82
82
|
}
|
|
@@ -88,9 +88,9 @@ export function MemoryMessagesTable({ messages }: MemoryMessagesTableProps) {
|
|
|
88
88
|
<TableRow>
|
|
89
89
|
<TableHead className="w-[180px]">时间</TableHead>
|
|
90
90
|
<TableHead className="w-[120px]">角色</TableHead>
|
|
91
|
-
<TableHead className="w-[140px]"
|
|
91
|
+
<TableHead className="w-[140px]">说话人</TableHead>
|
|
92
92
|
<TableHead>内容</TableHead>
|
|
93
|
-
<TableHead className="w-[260px]"
|
|
93
|
+
<TableHead className="w-[260px]">元数据</TableHead>
|
|
94
94
|
</TableRow>
|
|
95
95
|
</TableHeader>
|
|
96
96
|
<TableBody>
|
|
@@ -72,15 +72,15 @@ function RequestDetailDialog({ request, open, onOpenChange }: {
|
|
|
72
72
|
</DialogHeader>
|
|
73
73
|
<div className="grid gap-4 sm:grid-cols-2">
|
|
74
74
|
<div className="space-y-1">
|
|
75
|
-
<p className="text-xs text-muted-foreground"
|
|
75
|
+
<p className="text-xs text-muted-foreground">操作</p>
|
|
76
76
|
<p className="text-sm font-medium">{request.operation ?? "-"}</p>
|
|
77
77
|
</div>
|
|
78
78
|
<div className="space-y-1">
|
|
79
|
-
<p className="text-xs text-muted-foreground"
|
|
79
|
+
<p className="text-xs text-muted-foreground">请求 ID</p>
|
|
80
80
|
<p className="text-sm font-mono">{request.requestId ?? "-"}</p>
|
|
81
81
|
</div>
|
|
82
82
|
<div className="space-y-1">
|
|
83
|
-
<p className="text-xs text-muted-foreground"
|
|
83
|
+
<p className="text-xs text-muted-foreground">目标 ID</p>
|
|
84
84
|
<p className="text-sm font-medium">{request.targetId ?? "-"}</p>
|
|
85
85
|
</div>
|
|
86
86
|
<div className="space-y-1">
|
|
@@ -96,18 +96,18 @@ function RequestDetailDialog({ request, open, onOpenChange }: {
|
|
|
96
96
|
<p className="text-sm font-medium">{formatTimestamp(request.createdAt)}</p>
|
|
97
97
|
</div>
|
|
98
98
|
<div className="space-y-1">
|
|
99
|
-
<p className="text-xs text-muted-foreground"
|
|
99
|
+
<p className="text-xs text-muted-foreground">入库状态</p>
|
|
100
100
|
<p className="text-sm font-medium">{request.ingestStatus ?? "-"}</p>
|
|
101
101
|
</div>
|
|
102
102
|
<div className="space-y-1 sm:col-span-2">
|
|
103
|
-
<p className="text-xs text-muted-foreground"
|
|
103
|
+
<p className="text-xs text-muted-foreground">范围</p>
|
|
104
104
|
<p className="text-sm font-medium">{scopeLabel(request.scope)}</p>
|
|
105
105
|
{request.scope && (
|
|
106
106
|
<div className="mt-2 grid grid-cols-2 gap-x-4 gap-y-1 text-xs text-muted-foreground">
|
|
107
|
-
<span
|
|
108
|
-
<span
|
|
109
|
-
<span
|
|
110
|
-
<span
|
|
107
|
+
<span>应用:</span><span className="font-mono">{request.scope.appId ?? "-"}</span>
|
|
108
|
+
<span>租户:</span><span className="font-mono">{request.scope.tenantId ?? "-"}</span>
|
|
109
|
+
<span>智能体:</span><span className="font-mono">{request.scope.agentId ?? "-"}</span>
|
|
110
|
+
<span>会话:</span><span className="font-mono">{request.scope.runId ?? "-"}</span>
|
|
111
111
|
</div>
|
|
112
112
|
)}
|
|
113
113
|
</div>
|
|
@@ -173,7 +173,7 @@ export function MemoryRequestsTable({ requests }: MemoryRequestsTableProps) {
|
|
|
173
173
|
if (!requests.length) {
|
|
174
174
|
return (
|
|
175
175
|
<div className="rounded-lg border border-dashed py-12 text-center text-sm text-muted-foreground">
|
|
176
|
-
|
|
176
|
+
当前范围下暂无请求审计记录
|
|
177
177
|
</div>
|
|
178
178
|
);
|
|
179
179
|
}
|
|
@@ -185,8 +185,8 @@ export function MemoryRequestsTable({ requests }: MemoryRequestsTableProps) {
|
|
|
185
185
|
<TableHeader>
|
|
186
186
|
<TableRow>
|
|
187
187
|
<TableHead className="w-[160px]">时间</TableHead>
|
|
188
|
-
<TableHead className="w-[120px]"
|
|
189
|
-
<TableHead className="w-[160px]"
|
|
188
|
+
<TableHead className="w-[120px]">操作</TableHead>
|
|
189
|
+
<TableHead className="w-[160px]">请求 ID</TableHead>
|
|
190
190
|
<TableHead className="w-[80px]">响应码</TableHead>
|
|
191
191
|
<TableHead className="w-[80px]">耗时</TableHead>
|
|
192
192
|
<TableHead className="w-[80px]">操作</TableHead>
|
|
@@ -19,10 +19,10 @@ import { describeMemoryStore, listMemoryUnits } from "@/services/memory";
|
|
|
19
19
|
import type { MemoryScope } from "@/types/memory";
|
|
20
20
|
|
|
21
21
|
const FIELDS: Array<{ key: keyof MemoryScope; label: string; placeholder: string }> = [
|
|
22
|
-
{ key: "appId", label: "
|
|
23
|
-
{ key: "tenantId", label: "
|
|
24
|
-
{ key: "agentId", label: "
|
|
25
|
-
{ key: "runId", label: "
|
|
22
|
+
{ key: "appId", label: "应用", placeholder: "app-001" },
|
|
23
|
+
{ key: "tenantId", label: "租户", placeholder: "tenant-001" },
|
|
24
|
+
{ key: "agentId", label: "智能体", placeholder: "agent-001" },
|
|
25
|
+
{ key: "runId", label: "会话", placeholder: "run-001" },
|
|
26
26
|
];
|
|
27
27
|
|
|
28
28
|
function isWildcardScope(scope: MemoryScope): boolean {
|
|
@@ -47,7 +47,11 @@ export function MemoryScopeBar() {
|
|
|
47
47
|
const router = useRouter();
|
|
48
48
|
const pathname = usePathname();
|
|
49
49
|
const searchParams = useSearchParams();
|
|
50
|
-
const
|
|
50
|
+
const searchParamsString = searchParams.toString();
|
|
51
|
+
const currentScope = useMemo(
|
|
52
|
+
() => buildMemoryScope(new URLSearchParams(searchParamsString)),
|
|
53
|
+
[searchParamsString],
|
|
54
|
+
);
|
|
51
55
|
const [expanded, setExpanded] = useState(false);
|
|
52
56
|
const [draft, setDraft] = useState<MemoryScope>(currentScope);
|
|
53
57
|
const [error, setError] = useState<string | null>(null);
|
|
@@ -90,15 +94,20 @@ export function MemoryScopeBar() {
|
|
|
90
94
|
// Default to wildcard on memory detail pages
|
|
91
95
|
useEffect(() => {
|
|
92
96
|
if (!storeName || pathname.includes("/create")) return;
|
|
93
|
-
|
|
94
|
-
|
|
97
|
+
|
|
98
|
+
// 基于 searchParamsString 重建以避免 closure 捕获 searchParams 引用。
|
|
99
|
+
const sp = new URLSearchParams(searchParamsString);
|
|
100
|
+
const appId = sp.get("appId");
|
|
95
101
|
if (!appId) {
|
|
96
102
|
const params = new URLSearchParams({ appId: "*", tenantId: "*", agentId: "*", runId: "*" });
|
|
97
103
|
router.replace(`${pathname}?${params.toString()}`);
|
|
98
104
|
}
|
|
99
|
-
}, [
|
|
105
|
+
}, [searchParamsString, pathname, router, storeName]);
|
|
100
106
|
|
|
101
|
-
// Sync draft when URL changes
|
|
107
|
+
// Sync draft when URL changes.
|
|
108
|
+
// currentScope 来自 useMemo,仅当 searchParamsString 变化才会更新引用。
|
|
109
|
+
// setDraft 内部已经对 4 个字段做了相等性比较再返回 prev 以避免无效重渲染;
|
|
110
|
+
// setError(null) 在 error 已是 null 时也会被 React 自动跳过。
|
|
102
111
|
useEffect(() => {
|
|
103
112
|
setDraft(prev => {
|
|
104
113
|
// Only update if values actually changed
|
|
@@ -113,7 +122,7 @@ export function MemoryScopeBar() {
|
|
|
113
122
|
return currentScope;
|
|
114
123
|
});
|
|
115
124
|
setError(null);
|
|
116
|
-
}, [currentScope
|
|
125
|
+
}, [currentScope]);
|
|
117
126
|
|
|
118
127
|
const presetLabel = firstUnitScope
|
|
119
128
|
? `${firstUnitScope.appId ?? "-"}/${firstUnitScope.tenantId ?? "-"}/${firstUnitScope.agentId ?? "-"}/${firstUnitScope.runId ?? "-"}`
|
|
@@ -127,7 +136,7 @@ export function MemoryScopeBar() {
|
|
|
127
136
|
runId: (draft.runId ?? "").trim() || undefined,
|
|
128
137
|
};
|
|
129
138
|
if (!trimmed.appId || trimmed.appId === "appId") {
|
|
130
|
-
setError("
|
|
139
|
+
setError("应用 是必填项");
|
|
131
140
|
return;
|
|
132
141
|
}
|
|
133
142
|
setError(null);
|
|
@@ -36,15 +36,15 @@ export function MemorySearchForm({ scope, isLoading, onSubmit }: MemorySearchFor
|
|
|
36
36
|
event.preventDefault();
|
|
37
37
|
setError(null);
|
|
38
38
|
if (!searchable) {
|
|
39
|
-
setError("
|
|
39
|
+
setError("请先在范围栏中设置「应用」和「租户」的具体值");
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
if (!query.trim()) {
|
|
43
|
-
setError("
|
|
43
|
+
setError("请输入检索内容");
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
if (topK < 0 || topK > 50) {
|
|
47
|
-
setError("
|
|
47
|
+
setError("Top K 必须在 0 到 50 之间");
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -71,7 +71,7 @@ export function MemorySearchForm({ scope, isLoading, onSubmit }: MemorySearchFor
|
|
|
71
71
|
</div>
|
|
72
72
|
|
|
73
73
|
<div className="space-y-2">
|
|
74
|
-
<Label
|
|
74
|
+
<Label>检索内容</Label>
|
|
75
75
|
<Textarea
|
|
76
76
|
value={query}
|
|
77
77
|
onChange={(event) => setQuery(event.target.value)}
|
|
@@ -95,13 +95,13 @@ export function MemorySearchForm({ scope, isLoading, onSubmit }: MemorySearchFor
|
|
|
95
95
|
<div className="flex items-end pb-1">
|
|
96
96
|
<label className="flex items-center gap-2 text-sm">
|
|
97
97
|
<Checkbox checked={enableRerank} onCheckedChange={(checked) => setEnableRerank(checked === true)} />
|
|
98
|
-
|
|
98
|
+
启用重排序
|
|
99
99
|
</label>
|
|
100
100
|
</div>
|
|
101
101
|
</div>
|
|
102
102
|
|
|
103
103
|
<div className="space-y-2">
|
|
104
|
-
<Label
|
|
104
|
+
<Label>元数据过滤(JSON)</Label>
|
|
105
105
|
<Textarea
|
|
106
106
|
value={metadataJson}
|
|
107
107
|
onChange={(event) => setMetadataJson(event.target.value)}
|
|
@@ -116,7 +116,7 @@ export function MemorySearchForm({ scope, isLoading, onSubmit }: MemorySearchFor
|
|
|
116
116
|
{isLoading ? "搜索中..." : "搜索"}
|
|
117
117
|
</Button>
|
|
118
118
|
{!searchable && (
|
|
119
|
-
<p className="text-xs text-muted-foreground"
|
|
119
|
+
<p className="text-xs text-muted-foreground">请先在范围栏中设置「应用」和「租户」的具体值。</p>
|
|
120
120
|
)}
|
|
121
121
|
</form>
|
|
122
122
|
);
|
|
@@ -35,7 +35,7 @@ export function MemorySearchResults({ results, elapsedMs }: MemorySearchResultsP
|
|
|
35
35
|
<EmptyState
|
|
36
36
|
icon={Brain}
|
|
37
37
|
title="尚未搜索"
|
|
38
|
-
description="
|
|
38
|
+
description="填写左侧查询条件后,可以验证当前范围下的记忆检索效果"
|
|
39
39
|
/>
|
|
40
40
|
);
|
|
41
41
|
}
|
|
@@ -65,17 +65,17 @@ export function MemorySearchResults({ results, elapsedMs }: MemorySearchResultsP
|
|
|
65
65
|
<CardContent className="space-y-3 p-4">
|
|
66
66
|
<div className="flex flex-wrap items-center gap-2">
|
|
67
67
|
{hit.score !== undefined && (
|
|
68
|
-
<Badge variant="secondary"
|
|
68
|
+
<Badge variant="secondary">相似度 {hit.score.toFixed(4)}</Badge>
|
|
69
69
|
)}
|
|
70
70
|
{hit.source && <Badge variant="outline">{hit.source}</Badge>}
|
|
71
71
|
{hit.unit.unit_type && <Badge variant="outline">{hit.unit.unit_type}</Badge>}
|
|
72
72
|
</div>
|
|
73
73
|
<p className="whitespace-pre-wrap text-sm">{hit.unit.text}</p>
|
|
74
74
|
<div className="grid gap-2 text-xs text-muted-foreground sm:grid-cols-2">
|
|
75
|
-
<span>ID
|
|
76
|
-
<span
|
|
77
|
-
<span
|
|
78
|
-
<span
|
|
75
|
+
<span>ID:{hit.unit.id ?? hit.unit.memoryId ?? "-"}</span>
|
|
76
|
+
<span>范围:{formatScope(hit.unit.scope)}</span>
|
|
77
|
+
<span>创建时间:{formatTimestamp(hit.unit.created_at)}</span>
|
|
78
|
+
<span>版本:{hit.unit.version ?? "-"}</span>
|
|
79
79
|
</div>
|
|
80
80
|
</CardContent>
|
|
81
81
|
</Card>
|
|
@@ -85,7 +85,7 @@ function MemoryStoreCardImpl({ memoryStore, onDelete }: MemoryStoreCardProps) {
|
|
|
85
85
|
|
|
86
86
|
<div className="mt-auto flex items-center gap-2 pt-5">
|
|
87
87
|
<Badge variant="secondary" className="border-0 bg-[hsl(var(--primary-50))] text-primary">
|
|
88
|
-
|
|
88
|
+
智能体记忆
|
|
89
89
|
</Badge>
|
|
90
90
|
</div>
|
|
91
91
|
</CardContent>
|
|
@@ -87,18 +87,18 @@ export function MemoryUnitDetailPanel({
|
|
|
87
87
|
</p>
|
|
88
88
|
</DetailRow>
|
|
89
89
|
{detailUnit.search_text && (
|
|
90
|
-
<DetailRow label="
|
|
90
|
+
<DetailRow label="检索文本">
|
|
91
91
|
<p className="whitespace-pre-wrap rounded-md bg-muted p-3 text-sm">
|
|
92
92
|
{detailUnit.search_text}
|
|
93
93
|
</p>
|
|
94
94
|
</DetailRow>
|
|
95
95
|
)}
|
|
96
|
-
<DetailRow label="
|
|
96
|
+
<DetailRow label="范围">{formatScope(detailUnit.scope)}</DetailRow>
|
|
97
97
|
<DetailRow label="类型">{detailUnit.unit_type ?? "-"}</DetailRow>
|
|
98
|
-
<DetailRow label="
|
|
98
|
+
<DetailRow label="重要度">{detailUnit.salience ?? "-"}</DetailRow>
|
|
99
99
|
<DetailRow label="版本">{detailUnit.version ?? "-"}</DetailRow>
|
|
100
100
|
{detailUnit.metadata && (
|
|
101
|
-
<DetailRow label="
|
|
101
|
+
<DetailRow label="元数据">
|
|
102
102
|
<pre className="overflow-auto rounded-md bg-muted p-3 text-xs">
|
|
103
103
|
{JSON.stringify(detailUnit.metadata, null, 2)}
|
|
104
104
|
</pre>
|
|
@@ -22,7 +22,7 @@ interface MemoryUnitTableProps {
|
|
|
22
22
|
onDelete?: (unit: MemoryUnit) => void;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const DISABLED_TITLE = "
|
|
25
|
+
const DISABLED_TITLE = "当前记忆单元缺少精确范围或 ID,无法操作";
|
|
26
26
|
|
|
27
27
|
function unitId(unit: MemoryUnit): string {
|
|
28
28
|
return unit.id ?? unit.memoryId ?? "-";
|
|
@@ -135,7 +135,7 @@ export function MemoryUnitTable({
|
|
|
135
135
|
if (!units.length) {
|
|
136
136
|
return (
|
|
137
137
|
<div className="rounded-lg border border-dashed py-12 text-center text-sm text-muted-foreground">
|
|
138
|
-
|
|
138
|
+
当前范围下暂无记忆单元
|
|
139
139
|
</div>
|
|
140
140
|
);
|
|
141
141
|
}
|
|
@@ -24,8 +24,14 @@ import {
|
|
|
24
24
|
CollapsibleTrigger,
|
|
25
25
|
} from "@/components/ui/collapsible";
|
|
26
26
|
import { Textarea } from "@/components/ui/textarea";
|
|
27
|
+
import {
|
|
28
|
+
Dialog,
|
|
29
|
+
DialogContent,
|
|
30
|
+
DialogTitle,
|
|
31
|
+
} from "@/components/ui/dialog";
|
|
27
32
|
import { ConfirmDialog } from "@/components/shared/confirm-dialog";
|
|
28
33
|
import { cn } from "@/lib/utils";
|
|
34
|
+
import { IMAGE_FALLBACK_DATA_PREFIX } from "@/lib/constants";
|
|
29
35
|
import type {
|
|
30
36
|
ChatMessage,
|
|
31
37
|
RetrievalGroup,
|
|
@@ -35,6 +41,24 @@ import type { MemorySearchHit } from "@/types/memory";
|
|
|
35
41
|
|
|
36
42
|
import { Markdown } from "./markdown";
|
|
37
43
|
|
|
44
|
+
/** Fallback for clipboard copy when navigator.clipboard is unavailable (e.g.
|
|
45
|
+
* non-HTTPS contexts). Uses the deprecated execCommand approach. */
|
|
46
|
+
function fallbackCopy(text: string) {
|
|
47
|
+
try {
|
|
48
|
+
const textarea = document.createElement("textarea");
|
|
49
|
+
textarea.value = text;
|
|
50
|
+
textarea.style.position = "fixed";
|
|
51
|
+
textarea.style.opacity = "0";
|
|
52
|
+
document.body.appendChild(textarea);
|
|
53
|
+
textarea.select();
|
|
54
|
+
document.execCommand("copy");
|
|
55
|
+
document.body.removeChild(textarea);
|
|
56
|
+
toast.success("已复制");
|
|
57
|
+
} catch {
|
|
58
|
+
toast.error("复制失败");
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
38
62
|
interface QaMessageProps {
|
|
39
63
|
message: ChatMessage;
|
|
40
64
|
/** Whether ANY turn in the session is currently streaming. All action
|
|
@@ -297,8 +321,21 @@ function UserBubble({
|
|
|
297
321
|
const [withNextAssistant, setWithNextAssistant] = useState(true);
|
|
298
322
|
|
|
299
323
|
const handleCopy = useCallback(() => {
|
|
300
|
-
|
|
301
|
-
|
|
324
|
+
if (!message.content) return;
|
|
325
|
+
try {
|
|
326
|
+
if (navigator.clipboard && window.isSecureContext) {
|
|
327
|
+
void navigator.clipboard.writeText(message.content).then(
|
|
328
|
+
() => toast.success("已复制"),
|
|
329
|
+
() => {
|
|
330
|
+
fallbackCopy(message.content);
|
|
331
|
+
},
|
|
332
|
+
);
|
|
333
|
+
} else {
|
|
334
|
+
fallbackCopy(message.content);
|
|
335
|
+
}
|
|
336
|
+
} catch {
|
|
337
|
+
fallbackCopy(message.content);
|
|
338
|
+
}
|
|
302
339
|
}, [message.content]);
|
|
303
340
|
|
|
304
341
|
const handleSaveEdit = useCallback(() => {
|
|
@@ -470,8 +507,21 @@ function AssistantBlock({
|
|
|
470
507
|
.map((g) => ({ name: g.knowledgeBaseName, reason: g.error ?? "" }));
|
|
471
508
|
|
|
472
509
|
const handleCopy = useCallback(() => {
|
|
473
|
-
|
|
474
|
-
|
|
510
|
+
if (!message.content) return;
|
|
511
|
+
try {
|
|
512
|
+
if (navigator.clipboard && window.isSecureContext) {
|
|
513
|
+
void navigator.clipboard.writeText(message.content).then(
|
|
514
|
+
() => toast.success("已复制"),
|
|
515
|
+
() => {
|
|
516
|
+
fallbackCopy(message.content);
|
|
517
|
+
},
|
|
518
|
+
);
|
|
519
|
+
} else {
|
|
520
|
+
fallbackCopy(message.content);
|
|
521
|
+
}
|
|
522
|
+
} catch {
|
|
523
|
+
fallbackCopy(message.content);
|
|
524
|
+
}
|
|
475
525
|
}, [message.content]);
|
|
476
526
|
|
|
477
527
|
return (
|
|
@@ -875,8 +925,17 @@ function GroupedChunkList({
|
|
|
875
925
|
}
|
|
876
926
|
|
|
877
927
|
function ChunkCard({ chunk, index }: { chunk: RetrievedChunk; index: number }) {
|
|
928
|
+
const [zoomedImage, setZoomedImage] = useState<string | null>(null);
|
|
878
929
|
const fileName =
|
|
879
930
|
chunk.ossKey?.split("/").pop() || chunk.ossKey || "未知文件";
|
|
931
|
+
|
|
932
|
+
const isImageChunk = chunk.chunkType?.toLowerCase() === "image";
|
|
933
|
+
const imageSrc = chunk.imageBase64
|
|
934
|
+
? chunk.imageBase64.startsWith("data:")
|
|
935
|
+
? chunk.imageBase64
|
|
936
|
+
: `${IMAGE_FALLBACK_DATA_PREFIX}${chunk.imageBase64}`
|
|
937
|
+
: undefined;
|
|
938
|
+
|
|
880
939
|
return (
|
|
881
940
|
<div className="rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.3)] p-3">
|
|
882
941
|
<div className="mb-1.5 flex items-center gap-2 text-xs text-muted-foreground">
|
|
@@ -885,11 +944,49 @@ function ChunkCard({ chunk, index }: { chunk: RetrievedChunk; index: number }) {
|
|
|
885
944
|
</span>
|
|
886
945
|
<span className="font-medium text-foreground/80">{fileName}</span>
|
|
887
946
|
<span>Chunk #{chunk.chunkId}</span>
|
|
947
|
+
{isImageChunk && (
|
|
948
|
+
<span className="rounded bg-primary/10 px-1 py-0.5 text-[10px] font-medium text-primary">
|
|
949
|
+
IMAGE
|
|
950
|
+
</span>
|
|
951
|
+
)}
|
|
888
952
|
<span className="ml-auto font-mono">{chunk.score.toFixed(4)}</span>
|
|
889
953
|
</div>
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
954
|
+
|
|
955
|
+
{/* 图片缩略图 */}
|
|
956
|
+
{isImageChunk && imageSrc && (
|
|
957
|
+
<img
|
|
958
|
+
src={imageSrc}
|
|
959
|
+
alt={`Image chunk #${chunk.chunkId}`}
|
|
960
|
+
className="mt-2 max-w-[180px] max-h-[180px] object-contain rounded border border-border cursor-pointer hover:opacity-80 transition-opacity"
|
|
961
|
+
onClick={() => setZoomedImage(imageSrc)}
|
|
962
|
+
/>
|
|
963
|
+
)}
|
|
964
|
+
|
|
965
|
+
{/* 文本内容 */}
|
|
966
|
+
{chunk.content && (
|
|
967
|
+
<p
|
|
968
|
+
className={cn(
|
|
969
|
+
"line-clamp-4 whitespace-pre-wrap text-xs text-foreground/80",
|
|
970
|
+
isImageChunk && "mt-2",
|
|
971
|
+
)}
|
|
972
|
+
>
|
|
973
|
+
{chunk.content}
|
|
974
|
+
</p>
|
|
975
|
+
)}
|
|
976
|
+
|
|
977
|
+
{/* 图片放大预览 */}
|
|
978
|
+
<Dialog open={!!zoomedImage} onOpenChange={() => setZoomedImage(null)}>
|
|
979
|
+
<DialogContent className="max-w-[90vw] max-h-[90vh] p-2 flex items-center justify-center border-none bg-black/90 data-[state=open]:animate-none data-[state=closed]:animate-none duration-0">
|
|
980
|
+
<DialogTitle className="sr-only">图片放大预览</DialogTitle>
|
|
981
|
+
{zoomedImage && (
|
|
982
|
+
<img
|
|
983
|
+
src={zoomedImage}
|
|
984
|
+
alt="放大预览"
|
|
985
|
+
className="max-w-full max-h-[85vh] object-contain"
|
|
986
|
+
/>
|
|
987
|
+
)}
|
|
988
|
+
</DialogContent>
|
|
989
|
+
</Dialog>
|
|
893
990
|
</div>
|
|
894
991
|
);
|
|
895
992
|
}
|