@tablestore/tablestore-agent-cli 0.2.1 → 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 +5 -5
- package/dist/dashboard-runtime/dashboard/.next/prerender-manifest.json +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/page/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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 +14 -14
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_head.segment.rsc +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- 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 +14 -14
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_full.segment.rsc +14 -14
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_head.segment.rsc +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_index.segment.rsc +10 -10
- 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/build-manifest.json +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 +17 -17
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_full.segment.rsc +17 -17
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_head.segment.rsc +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_index.segment.rsc +10 -10
- 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 +4 -4
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/onboarding.segment.rsc +4 -4
- package/dist/dashboard-runtime/dashboard/.next/server/app/page/build-manifest.json +2 -2
- 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 +9 -6
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__02p1x3t._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0fglxiw._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0lvi0g-._.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0q8vcw8._.js +1 -1
- 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 +3 -0
- 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]__13ylf4x._.js → [root-of-the-server]__0lgg04c._.js} +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__10rkv6z._.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/_09yzbcp._.js +1 -1
- 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 +3 -0
- 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]_settings_page_tsx_0y26.xu._.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 +5 -5
- 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/07rwb_uq9qcx4.js +1 -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/0i8hdbek9j-fu.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ioivx4pbmayb.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0j-v5f_oscvfu.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/0t5vdnq4s.2yv.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/{0fagnytrt.3oe.js → 0veza1g0elxa7.js} +1 -1
- 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/.next/static/chunks/{turbopack-0w.hw6u8qra5z.js → turbopack-0~gu0g2v-1f11.js} +1 -1
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/chat/page.tsx +5 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/documents/documents-client.tsx +4 -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]/settings/page.tsx +56 -17
- 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/knowledge-bases/[name]/documents/[docId]/route.ts +67 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/memory-helpers.ts +45 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/route.ts +334 -16
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/logs/client/route.ts +13 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/oss/list/route.ts +1 -0
- package/dist/dashboard-runtime/dashboard/src/app/globals.css +23 -0
- package/dist/dashboard-runtime/dashboard/src/components/chat/chat-config-context.tsx +116 -19
- package/dist/dashboard-runtime/dashboard/src/components/chat/chat-mount-config.tsx +5 -0
- package/dist/dashboard-runtime/dashboard/src/components/chat/memory-bind-section.tsx +372 -0
- 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/documents/doc-detail-panel.tsx +578 -76
- package/dist/dashboard-runtime/dashboard/src/components/documents/doc-upload-dialog.tsx +9 -81
- package/dist/dashboard-runtime/dashboard/src/components/documents/oss-browser.tsx +42 -26
- 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-create-form.tsx +84 -56
- 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-settings-form.tsx +90 -21
- 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 +216 -5
- 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/metadata-field-input.tsx +54 -0
- 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 +60 -5
- package/dist/dashboard-runtime/dashboard/src/hooks/use-document.ts +29 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-oss-list.ts +7 -5
- package/dist/dashboard-runtime/dashboard/src/hooks/use-qa-chat.ts +65 -11
- package/dist/dashboard-runtime/dashboard/src/hooks/use-update-document.ts +15 -0
- package/dist/dashboard-runtime/dashboard/src/lib/api-error-toast.ts +62 -0
- package/dist/dashboard-runtime/dashboard/src/lib/constants.ts +8 -0
- package/dist/dashboard-runtime/dashboard/src/lib/metadata-form.ts +88 -0
- package/dist/dashboard-runtime/dashboard/src/lib/query-keys.ts +14 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/api-helpers.ts +18 -5
- package/dist/dashboard-runtime/dashboard/src/lib/server/llm-client.ts +19 -1
- package/dist/dashboard-runtime/dashboard/src/lib/server/oss-client.ts +45 -16
- package/dist/dashboard-runtime/dashboard/src/schemas/knowledge-base.ts +6 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/llm-chat.ts +20 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/retrieval.ts +46 -27
- package/dist/dashboard-runtime/dashboard/src/services/api-client.ts +31 -2
- package/dist/dashboard-runtime/dashboard/src/services/documents.ts +36 -3
- package/dist/dashboard-runtime/dashboard/src/types/knowledge-base.ts +10 -0
- package/dist/dashboard-runtime/dashboard/src/types/llm-chat.ts +33 -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/kb-client.d.ts +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js +4 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js.map +1 -1
- 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/logging.js +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/kb-client.d.ts +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js +4 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js.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/logging.js +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]__0aqzu8w._.js +0 -3
- 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/_0kd7szs._.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/_0xzh5yw._.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/00tz~p479bdgl.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/02i9olo-312mq.js +0 -138
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/062k9jbtd9.lv.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/069zf4m5f.se2.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07cp19da_kfld.js +0 -5
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/086esp1n941jl.js +0 -138
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/09uxq~55qug8c.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0d29.l~3ip181.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ewpzgu_qf0wf.js +0 -4
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jc31diex030o.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k79upjc40aky.css +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0snnsfosp3~gq.js +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/0u9wtl06_b72x.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v9d5wl9nsva3.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~kfzxrhgbkaz.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/{doYIl-pd6Sqax3bfUgN3q → EIbKHHti0Z1ephKfJzCKH}/_buildManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{doYIl-pd6Sqax3bfUgN3q → EIbKHHti0Z1ephKfJzCKH}/_clientMiddlewareManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{doYIl-pd6Sqax3bfUgN3q → EIbKHHti0Z1ephKfJzCKH}/_ssgManifest.js +0 -0
|
@@ -1,27 +1,45 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { useForm } from "react-hook-form";
|
|
4
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
5
|
+
import { z } from "zod";
|
|
4
6
|
import { toast } from "sonner";
|
|
5
7
|
import { Button } from "@/components/ui/button";
|
|
6
|
-
import { Label } from "@/components/ui/label";
|
|
7
8
|
import { Textarea } from "@/components/ui/textarea";
|
|
9
|
+
import {
|
|
10
|
+
Form,
|
|
11
|
+
FormControl,
|
|
12
|
+
FormField,
|
|
13
|
+
FormItem,
|
|
14
|
+
FormLabel,
|
|
15
|
+
FormMessage,
|
|
16
|
+
} from "@/components/ui/form";
|
|
8
17
|
import { useUpdateMemoryStore } from "@/hooks/use-update-memory-store";
|
|
9
18
|
import type { MemoryStore } from "@/types/memory";
|
|
10
19
|
|
|
20
|
+
const updateMemoryStoreSchema = z.object({
|
|
21
|
+
description: z.string().trim().max(256, "描述不超过 256 字").optional(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
type UpdateMemoryStoreInput = z.infer<typeof updateMemoryStoreSchema>;
|
|
25
|
+
|
|
11
26
|
interface MemorySettingsFormProps {
|
|
12
27
|
memoryStore: MemoryStore;
|
|
13
28
|
}
|
|
14
29
|
|
|
15
30
|
export function MemorySettingsForm({ memoryStore }: MemorySettingsFormProps) {
|
|
16
31
|
const updateStore = useUpdateMemoryStore();
|
|
17
|
-
const [description, setDescription] = useState(memoryStore.description ?? "");
|
|
18
32
|
|
|
19
|
-
|
|
20
|
-
|
|
33
|
+
const form = useForm<UpdateMemoryStoreInput>({
|
|
34
|
+
resolver: zodResolver(updateMemoryStoreSchema),
|
|
35
|
+
defaultValues: { description: memoryStore.description ?? "" },
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
async function onSubmit(values: UpdateMemoryStoreInput) {
|
|
21
39
|
try {
|
|
22
40
|
await updateStore.mutateAsync({
|
|
23
41
|
memoryStoreName: memoryStore.memoryStoreName,
|
|
24
|
-
description: description.
|
|
42
|
+
description: values.description?.length ? values.description : undefined,
|
|
25
43
|
});
|
|
26
44
|
toast.success("记忆库设置已更新");
|
|
27
45
|
} catch (error) {
|
|
@@ -30,20 +48,71 @@ export function MemorySettingsForm({ memoryStore }: MemorySettingsFormProps) {
|
|
|
30
48
|
}
|
|
31
49
|
|
|
32
50
|
return (
|
|
33
|
-
<
|
|
34
|
-
<
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
<Form {...form}>
|
|
52
|
+
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-6">
|
|
53
|
+
<section className="rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-5 shadow-sm">
|
|
54
|
+
<SettingsSectionHeader
|
|
55
|
+
title="基本信息"
|
|
56
|
+
description="调整记忆库的描述,帮助团队识别用途。名称在创建后不可修改。"
|
|
57
|
+
/>
|
|
58
|
+
<div className="space-y-4">
|
|
59
|
+
<ReadOnlyField label="名称" value={memoryStore.memoryStoreName} />
|
|
60
|
+
|
|
61
|
+
<FormField
|
|
62
|
+
control={form.control}
|
|
63
|
+
name="description"
|
|
64
|
+
render={({ field }) => (
|
|
65
|
+
<FormItem>
|
|
66
|
+
<FormLabel>描述</FormLabel>
|
|
67
|
+
<FormControl>
|
|
68
|
+
<Textarea
|
|
69
|
+
placeholder="描述这个记忆库的用途..."
|
|
70
|
+
className="resize-none"
|
|
71
|
+
rows={4}
|
|
72
|
+
{...field}
|
|
73
|
+
/>
|
|
74
|
+
</FormControl>
|
|
75
|
+
<FormMessage />
|
|
76
|
+
</FormItem>
|
|
77
|
+
)}
|
|
78
|
+
/>
|
|
79
|
+
|
|
80
|
+
<div className="flex justify-end border-t border-[hsl(var(--border-light))] pt-4">
|
|
81
|
+
<Button type="submit" disabled={updateStore.isPending}>
|
|
82
|
+
{updateStore.isPending ? "保存中..." : "保存更改"}
|
|
83
|
+
</Button>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</section>
|
|
87
|
+
</form>
|
|
88
|
+
</Form>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function SettingsSectionHeader({
|
|
93
|
+
title,
|
|
94
|
+
description,
|
|
95
|
+
}: {
|
|
96
|
+
title: string;
|
|
97
|
+
description: string;
|
|
98
|
+
}) {
|
|
99
|
+
return (
|
|
100
|
+
<header className="mb-4 border-b border-[hsl(var(--border-light))] pb-3">
|
|
101
|
+
<h3 className="text-[15px] font-semibold leading-tight text-[hsl(var(--foreground))]">
|
|
102
|
+
{title}
|
|
103
|
+
</h3>
|
|
104
|
+
<p className="mt-1 text-xs leading-relaxed text-[hsl(var(--muted-foreground))]">
|
|
105
|
+
{description}
|
|
106
|
+
</p>
|
|
107
|
+
</header>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function ReadOnlyField({ label, value }: { label: string; value: string }) {
|
|
112
|
+
return (
|
|
113
|
+
<div className="flex items-center justify-between">
|
|
114
|
+
<span className="text-sm text-muted-foreground">{label}</span>
|
|
115
|
+
<span className="text-sm font-medium">{value}</span>
|
|
116
|
+
</div>
|
|
48
117
|
);
|
|
49
118
|
}
|
|
@@ -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,16 +24,41 @@ 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,
|
|
32
38
|
RetrievedChunk,
|
|
33
39
|
} from "@/types/llm-chat";
|
|
40
|
+
import type { MemorySearchHit } from "@/types/memory";
|
|
34
41
|
|
|
35
42
|
import { Markdown } from "./markdown";
|
|
36
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
|
+
|
|
37
62
|
interface QaMessageProps {
|
|
38
63
|
message: ChatMessage;
|
|
39
64
|
/** Whether ANY turn in the session is currently streaming. All action
|
|
@@ -296,8 +321,21 @@ function UserBubble({
|
|
|
296
321
|
const [withNextAssistant, setWithNextAssistant] = useState(true);
|
|
297
322
|
|
|
298
323
|
const handleCopy = useCallback(() => {
|
|
299
|
-
|
|
300
|
-
|
|
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
|
+
}
|
|
301
339
|
}, [message.content]);
|
|
302
340
|
|
|
303
341
|
const handleSaveEdit = useCallback(() => {
|
|
@@ -469,8 +507,21 @@ function AssistantBlock({
|
|
|
469
507
|
.map((g) => ({ name: g.knowledgeBaseName, reason: g.error ?? "" }));
|
|
470
508
|
|
|
471
509
|
const handleCopy = useCallback(() => {
|
|
472
|
-
|
|
473
|
-
|
|
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
|
+
}
|
|
474
525
|
}, [message.content]);
|
|
475
526
|
|
|
476
527
|
return (
|
|
@@ -517,6 +568,17 @@ function AssistantBlock({
|
|
|
517
568
|
/>
|
|
518
569
|
) : null}
|
|
519
570
|
|
|
571
|
+
{/* Retrieved memory hits. Shown right under the KB chunks so both
|
|
572
|
+
evidence sources sit in the same vertical stack. The differentiator
|
|
573
|
+
is the trigger pill (Brain icon + "参考" verb), since memory hits
|
|
574
|
+
are soft prior context rather than bracketed citations. */}
|
|
575
|
+
{message.memoryHits && message.memoryHits.length > 0 ? (
|
|
576
|
+
<MemoryHitsBlock
|
|
577
|
+
hits={message.memoryHits}
|
|
578
|
+
query={message.memoryQuery}
|
|
579
|
+
/>
|
|
580
|
+
) : null}
|
|
581
|
+
|
|
520
582
|
{/* Main content. */}
|
|
521
583
|
{hasError ? (
|
|
522
584
|
<div className="flex items-start gap-2 rounded-md border border-[hsl(var(--destructive))/0.3] bg-[hsl(var(--destructive))/0.05] px-3 py-2 text-[hsl(var(--destructive))]">
|
|
@@ -863,8 +925,17 @@ function GroupedChunkList({
|
|
|
863
925
|
}
|
|
864
926
|
|
|
865
927
|
function ChunkCard({ chunk, index }: { chunk: RetrievedChunk; index: number }) {
|
|
928
|
+
const [zoomedImage, setZoomedImage] = useState<string | null>(null);
|
|
866
929
|
const fileName =
|
|
867
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
|
+
|
|
868
939
|
return (
|
|
869
940
|
<div className="rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.3)] p-3">
|
|
870
941
|
<div className="mb-1.5 flex items-center gap-2 text-xs text-muted-foreground">
|
|
@@ -873,10 +944,150 @@ function ChunkCard({ chunk, index }: { chunk: RetrievedChunk; index: number }) {
|
|
|
873
944
|
</span>
|
|
874
945
|
<span className="font-medium text-foreground/80">{fileName}</span>
|
|
875
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
|
+
)}
|
|
876
952
|
<span className="ml-auto font-mono">{chunk.score.toFixed(4)}</span>
|
|
877
953
|
</div>
|
|
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>
|
|
990
|
+
</div>
|
|
991
|
+
);
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* Memory evidence panel — sister component of {@link ChunksBlock}.
|
|
996
|
+
*
|
|
997
|
+
* Skeleton (Collapsible + numbered card grid + score-right-aligned header) is
|
|
998
|
+
* intentionally identical to ChunksBlock so users learn one "evidence card"
|
|
999
|
+
* mental model. The differentiation lives entirely in the trigger:
|
|
1000
|
+
* - icon: Brain (vs BookOpen)
|
|
1001
|
+
* - verb: "参考" (vs "查看") — memory hits are soft prior context injected
|
|
1002
|
+
* into the system prompt, not bracket-cited like KB chunks
|
|
1003
|
+
* - optional sub-label: the actual SearchMemories query the server used,
|
|
1004
|
+
* making it easy to debug "what did the server actually search for"
|
|
1005
|
+
* when hits seem off.
|
|
1006
|
+
*/
|
|
1007
|
+
export function MemoryHitsBlock({
|
|
1008
|
+
hits,
|
|
1009
|
+
query,
|
|
1010
|
+
}: {
|
|
1011
|
+
hits: MemorySearchHit[];
|
|
1012
|
+
query?: string;
|
|
1013
|
+
}) {
|
|
1014
|
+
const [open, setOpen] = useState(false);
|
|
1015
|
+
return (
|
|
1016
|
+
<Collapsible open={open} onOpenChange={setOpen}>
|
|
1017
|
+
<CollapsibleTrigger asChild>
|
|
1018
|
+
<button
|
|
1019
|
+
type="button"
|
|
1020
|
+
className="inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-[hsl(var(--accent))] hover:text-foreground"
|
|
1021
|
+
>
|
|
1022
|
+
<Brain className="h-3.5 w-3.5" />
|
|
1023
|
+
参考 {hits.length} 条记忆
|
|
1024
|
+
{query ? (
|
|
1025
|
+
<span className="max-w-[200px] truncate text-muted-foreground/70">
|
|
1026
|
+
· {query}
|
|
1027
|
+
</span>
|
|
1028
|
+
) : null}
|
|
1029
|
+
<ChevronDown
|
|
1030
|
+
className={cn(
|
|
1031
|
+
"h-3 w-3 transition-transform duration-200",
|
|
1032
|
+
open && "rotate-180",
|
|
1033
|
+
)}
|
|
1034
|
+
/>
|
|
1035
|
+
</button>
|
|
1036
|
+
</CollapsibleTrigger>
|
|
1037
|
+
<CollapsibleContent>
|
|
1038
|
+
<div className="mt-2 space-y-2">
|
|
1039
|
+
{hits.map((hit, idx) => (
|
|
1040
|
+
<MemoryHitCard
|
|
1041
|
+
key={
|
|
1042
|
+
hit.unit.memcell_id ??
|
|
1043
|
+
`${idx}-${(hit.unit.text ?? "").slice(0, 16)}`
|
|
1044
|
+
}
|
|
1045
|
+
hit={hit}
|
|
1046
|
+
index={idx + 1}
|
|
1047
|
+
/>
|
|
1048
|
+
))}
|
|
1049
|
+
</div>
|
|
1050
|
+
</CollapsibleContent>
|
|
1051
|
+
</Collapsible>
|
|
1052
|
+
);
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
function MemoryHitCard({
|
|
1056
|
+
hit,
|
|
1057
|
+
index,
|
|
1058
|
+
}: {
|
|
1059
|
+
hit: MemorySearchHit;
|
|
1060
|
+
index: number;
|
|
1061
|
+
}) {
|
|
1062
|
+
const id = hit.unit.memcell_id;
|
|
1063
|
+
const score = typeof hit.score === "number" ? hit.score : undefined;
|
|
1064
|
+
return (
|
|
1065
|
+
<div className="rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.3)] p-3">
|
|
1066
|
+
<div className="mb-1.5 flex items-center gap-2 text-xs text-muted-foreground">
|
|
1067
|
+
<span className="inline-flex h-5 w-5 items-center justify-center rounded-full bg-[hsl(var(--primary-50))] font-semibold text-primary">
|
|
1068
|
+
{index}
|
|
1069
|
+
</span>
|
|
1070
|
+
{id ? (
|
|
1071
|
+
<span
|
|
1072
|
+
className="min-w-0 truncate font-mono text-foreground/80"
|
|
1073
|
+
title={id}
|
|
1074
|
+
>
|
|
1075
|
+
{id}
|
|
1076
|
+
</span>
|
|
1077
|
+
) : (
|
|
1078
|
+
<span className="text-muted-foreground/70">未命名记忆</span>
|
|
1079
|
+
)}
|
|
1080
|
+
{hit.source ? (
|
|
1081
|
+
<span className="rounded bg-[hsl(var(--muted))] px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-muted-foreground">
|
|
1082
|
+
{hit.source}
|
|
1083
|
+
</span>
|
|
1084
|
+
) : null}
|
|
1085
|
+
<span className="ml-auto shrink-0 font-mono">
|
|
1086
|
+
{score !== undefined ? score.toFixed(4) : "—"}
|
|
1087
|
+
</span>
|
|
1088
|
+
</div>
|
|
878
1089
|
<p className="line-clamp-4 whitespace-pre-wrap text-xs text-foreground/80">
|
|
879
|
-
{
|
|
1090
|
+
{hit.unit.text}
|
|
880
1091
|
</p>
|
|
881
1092
|
</div>
|
|
882
1093
|
);
|