@tablestore/tablestore-agent-cli 0.2.0 → 0.2.1
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 +21 -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 +3 -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/app-path-routes-manifest.json +1 -0
- 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/routes-manifest.json +6 -0
- 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/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route_client-reference-manifest.js +3 -0
- 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.js.nft.json +1 -1
- 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/app-paths-manifest.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0n~ec7s.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0cee_lo._.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 +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/dashboard__next-internal_server_app_api_v1_oss_list_route_actions_00xq2u..js +3 -0
- 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]__0aqzu8w._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0hozzu6._.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 +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_02bg849._.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/_0db498n._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0jghj2_._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0kd7szs._.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/_0ogxvev._.js +7 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0tr8-3u._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0xzh5yw._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_12~3vfk._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_13_lb.o._.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_0ejgygh._.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_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/chunks/ssr/dashboard_src_components_ui_0-tuf-h._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_08h.f_8._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0jns_ph._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0pf30rh._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0~k~1nt._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/functions-config-manifest.json +1 -0
- 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/00tz~p479bdgl.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/02i9olo-312mq.js +138 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/062k9jbtd9.lv.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/06uuhz24tvdt..js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07cp19da_kfld.js +5 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/086esp1n941jl.js +138 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/08qlxn-3d_rtu.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/09uxq~55qug8c.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0__g1ogrdh412.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ab-ev0u1~ch5.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0bw682qzkh2ni.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0d29.l~3ip181.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ewpzgu_qf0wf.js +4 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jc31diex030o.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k79upjc40aky.css +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0lp2g_27uyhuz.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0snnsfosp3~gq.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0tmwptel_4y0o.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u9wtl06_b72x.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0uv55p7kzteex.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v9d5wl9nsva3.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0xko7~ja3xuc-.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/14.dp0-y_mhjo.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/15wxh8ltqt88_.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/183~u3-4a74db.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{turbopack-0ybyy.9-.w~ub.js → turbopack-0w.hw6u8qra5z.js} +1 -1
- package/dist/dashboard-runtime/dashboard/package.json +1 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/settings/settings-client.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/documents/route.ts +44 -3
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/oss/list/route.ts +125 -0
- package/dist/dashboard-runtime/dashboard/src/app/globals.css +46 -31
- package/dist/dashboard-runtime/dashboard/src/components/chat/add-mount-row.tsx +21 -55
- package/dist/dashboard-runtime/dashboard/src/components/chat/chat-mount-config.tsx +35 -27
- package/dist/dashboard-runtime/dashboard/src/components/chat/mount-empty-state.tsx +87 -0
- package/dist/dashboard-runtime/dashboard/src/components/chat/mount-picker.tsx +87 -0
- package/dist/dashboard-runtime/dashboard/src/components/chat/unified-retrieval-section.tsx +3 -2
- package/dist/dashboard-runtime/dashboard/src/components/documents/doc-upload-dialog.tsx +155 -54
- package/dist/dashboard-runtime/dashboard/src/components/documents/oss-browser.tsx +264 -0
- package/dist/dashboard-runtime/dashboard/src/components/documents/oss-import-tab.tsx +143 -0
- package/dist/dashboard-runtime/dashboard/src/components/instance/connect-instance-form.tsx +60 -60
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-create-form.tsx +52 -35
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-settings-form.tsx +152 -76
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/knowledge-base-retrieval-config.ts +110 -0
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/retrieval-result-count-field.tsx +106 -0
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/retrieval-result-count.ts +11 -0
- package/dist/dashboard-runtime/dashboard/src/components/layout/detail-sidebar.tsx +84 -4
- package/dist/dashboard-runtime/dashboard/src/components/retrieval/assemble-retrieval-configuration.ts +22 -3
- package/dist/dashboard-runtime/dashboard/src/components/retrieval/retrieval-form.tsx +10 -3
- package/dist/dashboard-runtime/dashboard/src/components/retrieval/retrieval-params-fields.tsx +114 -56
- package/dist/dashboard-runtime/dashboard/src/hooks/use-detail-sidebar-collapsed.ts +86 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-oss-import.ts +148 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-oss-list.ts +89 -0
- package/dist/dashboard-runtime/dashboard/src/lib/extension-filter.ts +62 -0
- package/dist/dashboard-runtime/dashboard/src/lib/glob-filter.ts +76 -0
- package/dist/dashboard-runtime/dashboard/src/lib/oss-selection.ts +58 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/oss-client.ts +65 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/knowledge-base.ts +3 -3
- package/dist/dashboard-runtime/dashboard/src/schemas/llm-chat.ts +1 -1
- package/dist/dashboard-runtime/dashboard/src/schemas/retrieval.ts +4 -1
- package/dist/dashboard-runtime/dashboard/src/services/api-client.ts +11 -6
- package/dist/dashboard-runtime/dashboard/src/services/documents.ts +27 -8
- package/dist/dashboard-runtime/dashboard/src/services/oss.ts +36 -0
- package/dist/dashboard-runtime/dashboard/src/types/knowledge-base.ts +1 -1
- package/dist/dashboard-runtime/dashboard/vitest.config.mjs +6 -0
- 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 +1 -1
- 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 +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0lvo_@radix-ui_react-popper_dist_index_mjs_13rqw99._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0id.4_g._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0p7j-9i._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0.1szyw._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0251rsp._.js +0 -7
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_038vjn1._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06tznmj._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_09y~hs8._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0_ow0x1._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0t373jc._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_12guzbo._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0jns2ew._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0aw_rgu._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0ld4qfm._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_125b4co._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-ov0wxgu5b65.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/00-qnlax_4630.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/034uozc1ki09_.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/03zdsc.dicedw.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/05hmbxh7h5ct-.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/08tdws.ontiw1.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0azwigiwuhh08.css +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0b54rtt1-cxht.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0cdo38.8y_jr2.js +0 -138
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0cy.fvgx7dgqx.js +0 -4
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0fa.nak91jfo-.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0fv6q06wgazh_.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0g9y74cipd10n.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ga6neugwmh.1.js +0 -5
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0hkir82jccgck.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k-x6_7dhqb~c.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0n42fh.zwyk35.js +0 -138
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0q6lk_p74rti7.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u39cc6mmeqb3.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0uay29z9qqouw.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v0e.nl_9fjba.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0wd0_x8u.jzur.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0wf-nssu2qd_2.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x7pw1zo7nxno.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0zbi5n76awxz1.js +0 -1
- /package/dist/dashboard-runtime/dashboard/.next/static/{uYteIiFtKdPhUhmILps5X → doYIl-pd6Sqax3bfUgN3q}/_buildManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{uYteIiFtKdPhUhmILps5X → doYIl-pd6Sqax3bfUgN3q}/_clientMiddlewareManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{uYteIiFtKdPhUhmILps5X → doYIl-pd6Sqax3bfUgN3q}/_ssgManifest.js +0 -0
|
@@ -33,6 +33,8 @@ import {
|
|
|
33
33
|
TableRow,
|
|
34
34
|
} from "@/components/ui/table";
|
|
35
35
|
import { TagInput } from "@/components/shared/tag-input";
|
|
36
|
+
import { RetrievalResultCountField } from "./retrieval-result-count-field";
|
|
37
|
+
import { buildKnowledgeBaseRetrievalConfiguration } from "./knowledge-base-retrieval-config";
|
|
36
38
|
import { useUpdateKB } from "@/hooks/use-update-kb";
|
|
37
39
|
import { updateKBSchema, type UpdateKBInput } from "@/schemas/knowledge-base";
|
|
38
40
|
import type { KnowledgeBase } from "@/types/knowledge-base";
|
|
@@ -52,9 +54,19 @@ export function KBSettingsForm({ knowledgeBase }: KBSettingsFormProps) {
|
|
|
52
54
|
tags: knowledgeBase.tags ?? [],
|
|
53
55
|
retrievalConfiguration: {
|
|
54
56
|
searchType: knowledgeBase.retrievalConfiguration?.searchType ?? ["DENSE_VECTOR"],
|
|
57
|
+
denseVectorSearchConfiguration:
|
|
58
|
+
knowledgeBase.retrievalConfiguration?.denseVectorSearchConfiguration ?? {
|
|
59
|
+
numberOfResults:
|
|
60
|
+
knowledgeBase.retrievalConfiguration?.rerankingConfiguration?.numberOfResults ?? 20,
|
|
61
|
+
},
|
|
62
|
+
fullTextSearchConfiguration:
|
|
63
|
+
knowledgeBase.retrievalConfiguration?.fullTextSearchConfiguration ?? {
|
|
64
|
+
numberOfResults:
|
|
65
|
+
knowledgeBase.retrievalConfiguration?.rerankingConfiguration?.numberOfResults ?? 20,
|
|
66
|
+
},
|
|
55
67
|
rerankingConfiguration: {
|
|
56
68
|
type: knowledgeBase.retrievalConfiguration?.rerankingConfiguration?.type ?? "RRF",
|
|
57
|
-
numberOfResults: knowledgeBase.retrievalConfiguration?.rerankingConfiguration?.numberOfResults ??
|
|
69
|
+
numberOfResults: knowledgeBase.retrievalConfiguration?.rerankingConfiguration?.numberOfResults ?? 20,
|
|
58
70
|
rrfConfiguration: knowledgeBase.retrievalConfiguration?.rerankingConfiguration?.rrfConfiguration ?? {
|
|
59
71
|
denseVectorSearchWeight: 0.6,
|
|
60
72
|
fullTextSearchWeight: 0.4,
|
|
@@ -88,16 +100,7 @@ export function KBSettingsForm({ knowledgeBase }: KBSettingsFormProps) {
|
|
|
88
100
|
const request: Parameters<typeof updateKB.mutateAsync>[0] = {
|
|
89
101
|
...values,
|
|
90
102
|
retrievalConfiguration: values.retrievalConfiguration
|
|
91
|
-
?
|
|
92
|
-
...values.retrievalConfiguration,
|
|
93
|
-
rerankingConfiguration: values.retrievalConfiguration.rerankingConfiguration
|
|
94
|
-
? {
|
|
95
|
-
...values.retrievalConfiguration.rerankingConfiguration,
|
|
96
|
-
numberOfResults:
|
|
97
|
-
values.retrievalConfiguration.rerankingConfiguration.numberOfResults ?? 5,
|
|
98
|
-
}
|
|
99
|
-
: undefined,
|
|
100
|
-
}
|
|
103
|
+
? buildKnowledgeBaseRetrievalConfiguration(values.retrievalConfiguration)
|
|
101
104
|
: undefined,
|
|
102
105
|
};
|
|
103
106
|
await updateKB.mutateAsync(request);
|
|
@@ -113,12 +116,14 @@ export function KBSettingsForm({ knowledgeBase }: KBSettingsFormProps) {
|
|
|
113
116
|
const metadataFields = knowledgeBase.metadata ?? [];
|
|
114
117
|
|
|
115
118
|
return (
|
|
116
|
-
<div className="
|
|
117
|
-
{
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
<div className="grid gap-6 xl:grid-cols-[minmax(0,1fr)_320px]">
|
|
120
|
+
<Form {...form}>
|
|
121
|
+
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-6">
|
|
122
|
+
<section className="rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-5 shadow-sm">
|
|
123
|
+
<SettingsSectionHeader
|
|
124
|
+
title="基本信息"
|
|
125
|
+
description="调整知识库说明和标签,帮助团队快速识别用途。"
|
|
126
|
+
/>
|
|
122
127
|
<FormField
|
|
123
128
|
control={form.control}
|
|
124
129
|
name="description"
|
|
@@ -156,10 +161,14 @@ export function KBSettingsForm({ knowledgeBase }: KBSettingsFormProps) {
|
|
|
156
161
|
)}
|
|
157
162
|
/>
|
|
158
163
|
|
|
159
|
-
|
|
160
|
-
<div className="space-y-4 pt-4 border-t border-[hsl(var(--border))]">
|
|
161
|
-
<h4 className="text-sm font-medium">检索配置</h4>
|
|
164
|
+
</section>
|
|
162
165
|
|
|
166
|
+
<section className="rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-5 shadow-sm">
|
|
167
|
+
<SettingsSectionHeader
|
|
168
|
+
title="检索配置"
|
|
169
|
+
description="控制默认召回方式、返回规模和 Rerank 策略。"
|
|
170
|
+
/>
|
|
171
|
+
<div className="space-y-4">
|
|
163
172
|
<FormField
|
|
164
173
|
control={form.control}
|
|
165
174
|
name="retrievalConfiguration.searchType"
|
|
@@ -195,6 +204,50 @@ export function KBSettingsForm({ knowledgeBase }: KBSettingsFormProps) {
|
|
|
195
204
|
)}
|
|
196
205
|
/>
|
|
197
206
|
|
|
207
|
+
<div className="space-y-3">
|
|
208
|
+
<div className="space-y-1">
|
|
209
|
+
<p className="text-sm font-medium text-[hsl(var(--foreground))]">
|
|
210
|
+
返回数量
|
|
211
|
+
</p>
|
|
212
|
+
<p className="text-xs text-[hsl(var(--muted-foreground))]">
|
|
213
|
+
控制每路召回参与排序的候选数,以及 Rerank 后实际返回的片段数。
|
|
214
|
+
</p>
|
|
215
|
+
</div>
|
|
216
|
+
<div className="grid grid-cols-[repeat(auto-fit,minmax(min(260px,100%),1fr))] gap-3">
|
|
217
|
+
<RetrievalResultCountField
|
|
218
|
+
control={form.control}
|
|
219
|
+
name="retrievalConfiguration.denseVectorSearchConfiguration.numberOfResults"
|
|
220
|
+
label="向量召回数"
|
|
221
|
+
description="向量检索参与后续排序的候选片段数。"
|
|
222
|
+
max={100}
|
|
223
|
+
muted={
|
|
224
|
+
!form
|
|
225
|
+
.watch("retrievalConfiguration.searchType")
|
|
226
|
+
?.includes("DENSE_VECTOR")
|
|
227
|
+
}
|
|
228
|
+
/>
|
|
229
|
+
<RetrievalResultCountField
|
|
230
|
+
control={form.control}
|
|
231
|
+
name="retrievalConfiguration.fullTextSearchConfiguration.numberOfResults"
|
|
232
|
+
label="全文召回数"
|
|
233
|
+
description="全文检索参与后续排序的候选片段数。"
|
|
234
|
+
max={100}
|
|
235
|
+
muted={
|
|
236
|
+
!form
|
|
237
|
+
.watch("retrievalConfiguration.searchType")
|
|
238
|
+
?.includes("FULL_TEXT")
|
|
239
|
+
}
|
|
240
|
+
/>
|
|
241
|
+
</div>
|
|
242
|
+
<RetrievalResultCountField
|
|
243
|
+
control={form.control}
|
|
244
|
+
name="retrievalConfiguration.rerankingConfiguration.numberOfResults"
|
|
245
|
+
label="重排序返回数"
|
|
246
|
+
description="Rerank 后保留并返回的片段数。"
|
|
247
|
+
max={200}
|
|
248
|
+
/>
|
|
249
|
+
</div>
|
|
250
|
+
|
|
198
251
|
<FormField
|
|
199
252
|
control={form.control}
|
|
200
253
|
name="retrievalConfiguration.rerankingConfiguration.type"
|
|
@@ -405,74 +458,97 @@ export function KBSettingsForm({ knowledgeBase }: KBSettingsFormProps) {
|
|
|
405
458
|
</div>
|
|
406
459
|
</div>
|
|
407
460
|
|
|
408
|
-
<div className="flex justify-end pt-
|
|
461
|
+
<div className="flex justify-end border-t border-[hsl(var(--border-light))] pt-4">
|
|
409
462
|
<Button type="submit" disabled={updateKB.isPending}>
|
|
410
463
|
{updateKB.isPending ? "保存中..." : "保存更改"}
|
|
411
464
|
</Button>
|
|
412
465
|
</div>
|
|
413
|
-
</
|
|
414
|
-
</
|
|
415
|
-
</
|
|
466
|
+
</section>
|
|
467
|
+
</form>
|
|
468
|
+
</Form>
|
|
416
469
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
<
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
value={embeddingConfig?.provider === "bailian" ? "百炼 (Bailian)" : "自定义 (Custom)"}
|
|
424
|
-
/>
|
|
425
|
-
<ReadOnlyField label="模型" value={embeddingConfig?.model ?? "—"} />
|
|
426
|
-
<ReadOnlyField
|
|
427
|
-
label="维度"
|
|
428
|
-
value={embeddingConfig?.dimension?.toString() ?? "—"}
|
|
470
|
+
<aside className="space-y-6">
|
|
471
|
+
{/* Embedding 配置 - 只读 */}
|
|
472
|
+
<section className="rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-5 shadow-sm">
|
|
473
|
+
<SettingsSectionHeader
|
|
474
|
+
title="Embedding 配置"
|
|
475
|
+
description="创建后不可修改"
|
|
429
476
|
/>
|
|
430
|
-
|
|
431
|
-
<ReadOnlyField
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
477
|
+
<div className="space-y-3">
|
|
478
|
+
<ReadOnlyField
|
|
479
|
+
label="提供方"
|
|
480
|
+
value={embeddingConfig?.provider === "bailian" ? "百炼 (Bailian)" : "自定义 (Custom)"}
|
|
481
|
+
/>
|
|
482
|
+
<ReadOnlyField label="模型" value={embeddingConfig?.model ?? "—"} />
|
|
483
|
+
<ReadOnlyField
|
|
484
|
+
label="维度"
|
|
485
|
+
value={embeddingConfig?.dimension?.toString() ?? "—"}
|
|
486
|
+
/>
|
|
487
|
+
{embeddingConfig?.provider === "custom" && embeddingConfig?.url && (
|
|
488
|
+
<ReadOnlyField label="API URL" value={embeddingConfig.url} />
|
|
489
|
+
)}
|
|
490
|
+
</div>
|
|
491
|
+
</section>
|
|
438
492
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
{metadataFields.map((field) => (
|
|
453
|
-
<TableRow key={field.name}>
|
|
454
|
-
<TableCell className="font-mono text-sm">
|
|
455
|
-
{field.name}
|
|
456
|
-
</TableCell>
|
|
457
|
-
<TableCell className="text-sm text-muted-foreground">
|
|
458
|
-
{field.type}
|
|
459
|
-
</TableCell>
|
|
493
|
+
{/* Metadata Schema - 只读 */}
|
|
494
|
+
<section className="rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-5 shadow-sm">
|
|
495
|
+
<SettingsSectionHeader
|
|
496
|
+
title="Metadata Schema"
|
|
497
|
+
description="创建后不可修改"
|
|
498
|
+
/>
|
|
499
|
+
{metadataFields.length > 0 ? (
|
|
500
|
+
<div className="overflow-hidden rounded-md border border-[hsl(var(--border-light))]">
|
|
501
|
+
<Table>
|
|
502
|
+
<TableHeader>
|
|
503
|
+
<TableRow>
|
|
504
|
+
<TableHead>字段名</TableHead>
|
|
505
|
+
<TableHead>类型</TableHead>
|
|
460
506
|
</TableRow>
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
507
|
+
</TableHeader>
|
|
508
|
+
<TableBody>
|
|
509
|
+
{metadataFields.map((field) => (
|
|
510
|
+
<TableRow key={field.name}>
|
|
511
|
+
<TableCell className="font-mono text-sm">
|
|
512
|
+
{field.name}
|
|
513
|
+
</TableCell>
|
|
514
|
+
<TableCell className="text-sm text-muted-foreground">
|
|
515
|
+
{field.type}
|
|
516
|
+
</TableCell>
|
|
517
|
+
</TableRow>
|
|
518
|
+
))}
|
|
519
|
+
</TableBody>
|
|
520
|
+
</Table>
|
|
521
|
+
</div>
|
|
522
|
+
) : (
|
|
523
|
+
<p className="rounded-md bg-[hsl(var(--muted)/0.35)] px-3 py-2 text-sm text-muted-foreground">
|
|
524
|
+
未定义 Metadata Schema
|
|
525
|
+
</p>
|
|
526
|
+
)}
|
|
527
|
+
</section>
|
|
528
|
+
</aside>
|
|
472
529
|
</div>
|
|
473
530
|
);
|
|
474
531
|
}
|
|
475
532
|
|
|
533
|
+
function SettingsSectionHeader({
|
|
534
|
+
title,
|
|
535
|
+
description,
|
|
536
|
+
}: {
|
|
537
|
+
title: string;
|
|
538
|
+
description: string;
|
|
539
|
+
}) {
|
|
540
|
+
return (
|
|
541
|
+
<header className="mb-4 border-b border-[hsl(var(--border-light))] pb-3">
|
|
542
|
+
<h3 className="text-[15px] font-semibold leading-tight text-[hsl(var(--foreground))]">
|
|
543
|
+
{title}
|
|
544
|
+
</h3>
|
|
545
|
+
<p className="mt-1 text-xs leading-relaxed text-[hsl(var(--muted-foreground))]">
|
|
546
|
+
{description}
|
|
547
|
+
</p>
|
|
548
|
+
</header>
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
|
|
476
552
|
function ReadOnlyField({ label, value }: { label: string; value: string }) {
|
|
477
553
|
return (
|
|
478
554
|
<div className="flex items-center justify-between">
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
RetrievalConfig,
|
|
3
|
+
RerankType,
|
|
4
|
+
SearchType,
|
|
5
|
+
} from "@/types/knowledge-base";
|
|
6
|
+
|
|
7
|
+
export interface KnowledgeBaseRetrievalConfigInput {
|
|
8
|
+
searchType?: SearchType[];
|
|
9
|
+
denseTopK?: number;
|
|
10
|
+
fullTextTopK?: number;
|
|
11
|
+
rerankTopK?: number;
|
|
12
|
+
rerankType?: RerankType;
|
|
13
|
+
rrfK?: number;
|
|
14
|
+
rrfDenseWeight?: number;
|
|
15
|
+
rrfFullTextWeight?: number;
|
|
16
|
+
weightDense?: number;
|
|
17
|
+
weightFullText?: number;
|
|
18
|
+
modelProvider?: string;
|
|
19
|
+
modelName?: string;
|
|
20
|
+
denseVectorSearchConfiguration?: { numberOfResults?: number };
|
|
21
|
+
fullTextSearchConfiguration?: { numberOfResults?: number };
|
|
22
|
+
rerankingConfiguration?: {
|
|
23
|
+
type?: RerankType;
|
|
24
|
+
numberOfResults?: number;
|
|
25
|
+
rrfConfiguration?: {
|
|
26
|
+
denseVectorSearchWeight?: number;
|
|
27
|
+
fullTextSearchWeight?: number;
|
|
28
|
+
k?: number;
|
|
29
|
+
};
|
|
30
|
+
weightConfiguration?: {
|
|
31
|
+
denseVectorSearchWeight?: number;
|
|
32
|
+
fullTextSearchWeight?: number;
|
|
33
|
+
};
|
|
34
|
+
modelConfiguration?: {
|
|
35
|
+
provider?: string;
|
|
36
|
+
model?: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function buildKnowledgeBaseRetrievalConfiguration(
|
|
42
|
+
input: KnowledgeBaseRetrievalConfigInput | undefined,
|
|
43
|
+
): RetrievalConfig | undefined {
|
|
44
|
+
if (!input) return undefined;
|
|
45
|
+
|
|
46
|
+
const rerank = input.rerankingConfiguration;
|
|
47
|
+
const rerankType = input.rerankType ?? rerank?.type;
|
|
48
|
+
const config: RetrievalConfig = {
|
|
49
|
+
searchType: input.searchType ?? [],
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const denseTopK =
|
|
53
|
+
input.denseTopK ?? input.denseVectorSearchConfiguration?.numberOfResults;
|
|
54
|
+
const fullTextTopK =
|
|
55
|
+
input.fullTextTopK ?? input.fullTextSearchConfiguration?.numberOfResults;
|
|
56
|
+
const rerankTopK = input.rerankTopK ?? rerank?.numberOfResults;
|
|
57
|
+
|
|
58
|
+
if (denseTopK !== undefined) {
|
|
59
|
+
config.denseVectorSearchConfiguration = { numberOfResults: denseTopK };
|
|
60
|
+
}
|
|
61
|
+
if (fullTextTopK !== undefined) {
|
|
62
|
+
config.fullTextSearchConfiguration = { numberOfResults: fullTextTopK };
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (rerankType) {
|
|
66
|
+
const reranking: NonNullable<RetrievalConfig["rerankingConfiguration"]> = {
|
|
67
|
+
type: rerankType,
|
|
68
|
+
};
|
|
69
|
+
if (rerankTopK !== undefined) reranking.numberOfResults = rerankTopK;
|
|
70
|
+
|
|
71
|
+
if (rerankType === "RRF") {
|
|
72
|
+
reranking.rrfConfiguration = {
|
|
73
|
+
denseVectorSearchWeight:
|
|
74
|
+
input.rrfDenseWeight ??
|
|
75
|
+
rerank?.rrfConfiguration?.denseVectorSearchWeight ??
|
|
76
|
+
0,
|
|
77
|
+
fullTextSearchWeight:
|
|
78
|
+
input.rrfFullTextWeight ??
|
|
79
|
+
rerank?.rrfConfiguration?.fullTextSearchWeight ??
|
|
80
|
+
0,
|
|
81
|
+
k: input.rrfK ?? rerank?.rrfConfiguration?.k ?? 60,
|
|
82
|
+
};
|
|
83
|
+
} else if (rerankType === "WEIGHT") {
|
|
84
|
+
reranking.weightConfiguration = {
|
|
85
|
+
denseVectorSearchWeight:
|
|
86
|
+
input.weightDense ??
|
|
87
|
+
rerank?.weightConfiguration?.denseVectorSearchWeight ??
|
|
88
|
+
0,
|
|
89
|
+
fullTextSearchWeight:
|
|
90
|
+
input.weightFullText ??
|
|
91
|
+
rerank?.weightConfiguration?.fullTextSearchWeight ??
|
|
92
|
+
0,
|
|
93
|
+
};
|
|
94
|
+
} else if (rerankType === "MODEL") {
|
|
95
|
+
reranking.modelConfiguration = {
|
|
96
|
+
provider:
|
|
97
|
+
input.modelProvider ??
|
|
98
|
+
rerank?.modelConfiguration?.provider ??
|
|
99
|
+
"bailian",
|
|
100
|
+
model:
|
|
101
|
+
input.modelName ??
|
|
102
|
+
rerank?.modelConfiguration?.model ??
|
|
103
|
+
"gte-rerank-v2",
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
config.rerankingConfiguration = reranking;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return config;
|
|
110
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { Control, FieldPath, FieldValues } from "react-hook-form";
|
|
4
|
+
import { ListOrdered } from "lucide-react";
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
import {
|
|
8
|
+
FormControl,
|
|
9
|
+
FormField,
|
|
10
|
+
FormItem,
|
|
11
|
+
FormLabel,
|
|
12
|
+
FormMessage,
|
|
13
|
+
} from "@/components/ui/form";
|
|
14
|
+
import { Input } from "@/components/ui/input";
|
|
15
|
+
import {
|
|
16
|
+
RETRIEVAL_RESULT_COUNT_MIN,
|
|
17
|
+
parseRetrievalResultCountInput,
|
|
18
|
+
} from "./retrieval-result-count";
|
|
19
|
+
|
|
20
|
+
interface RetrievalResultCountFieldProps<TFieldValues extends FieldValues> {
|
|
21
|
+
control: Control<TFieldValues>;
|
|
22
|
+
name: FieldPath<TFieldValues>;
|
|
23
|
+
label?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
min?: number;
|
|
26
|
+
max?: number;
|
|
27
|
+
muted?: boolean;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function RetrievalResultCountField<TFieldValues extends FieldValues>({
|
|
32
|
+
control,
|
|
33
|
+
name,
|
|
34
|
+
label = "返回片段数",
|
|
35
|
+
description = "单次检索返回的最多片段数,Rerank 后取前 N 条。",
|
|
36
|
+
min = RETRIEVAL_RESULT_COUNT_MIN,
|
|
37
|
+
max,
|
|
38
|
+
muted = false,
|
|
39
|
+
className,
|
|
40
|
+
}: RetrievalResultCountFieldProps<TFieldValues>) {
|
|
41
|
+
return (
|
|
42
|
+
<FormField
|
|
43
|
+
control={control}
|
|
44
|
+
name={name}
|
|
45
|
+
render={({ field }) => {
|
|
46
|
+
const inputValue =
|
|
47
|
+
typeof field.value === "number" && Number.isFinite(field.value)
|
|
48
|
+
? String(field.value)
|
|
49
|
+
: "";
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<FormItem
|
|
53
|
+
className={cn(
|
|
54
|
+
"mb-0 rounded-md border border-[hsl(var(--border)/0.6)] bg-[hsl(var(--card)/0.72)] p-3 shadow-[0_1px_2px_hsl(var(--foreground)/0.04)]",
|
|
55
|
+
muted && "opacity-65",
|
|
56
|
+
className,
|
|
57
|
+
)}
|
|
58
|
+
>
|
|
59
|
+
<div className="grid gap-3 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-center">
|
|
60
|
+
<div className="flex min-w-0 gap-3">
|
|
61
|
+
<span className="mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-[hsl(var(--primary)/0.08)] text-[hsl(var(--primary))]">
|
|
62
|
+
<ListOrdered className="h-3.5 w-3.5" />
|
|
63
|
+
</span>
|
|
64
|
+
<div className="min-w-0 space-y-1">
|
|
65
|
+
<FormLabel className="text-sm font-medium">
|
|
66
|
+
{label}
|
|
67
|
+
</FormLabel>
|
|
68
|
+
<p className="text-xs leading-relaxed text-[hsl(var(--muted-foreground))]">
|
|
69
|
+
{description}
|
|
70
|
+
</p>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<div className="relative w-28 shrink-0">
|
|
75
|
+
<FormControl>
|
|
76
|
+
<Input
|
|
77
|
+
ref={field.ref}
|
|
78
|
+
name={field.name}
|
|
79
|
+
type="number"
|
|
80
|
+
inputMode="numeric"
|
|
81
|
+
min={min}
|
|
82
|
+
max={max}
|
|
83
|
+
aria-label={label}
|
|
84
|
+
className="h-9 w-full bg-[hsl(var(--background))] pr-8 text-right font-mono text-sm tabular-nums shadow-sm [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"
|
|
85
|
+
value={inputValue}
|
|
86
|
+
onBlur={field.onBlur}
|
|
87
|
+
onChange={(event) =>
|
|
88
|
+
field.onChange(
|
|
89
|
+
parseRetrievalResultCountInput(event.target.value),
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
/>
|
|
93
|
+
</FormControl>
|
|
94
|
+
<span className="pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-xs text-[hsl(var(--muted-foreground))]">
|
|
95
|
+
条
|
|
96
|
+
</span>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<FormMessage className="pt-1" />
|
|
101
|
+
</FormItem>
|
|
102
|
+
);
|
|
103
|
+
}}
|
|
104
|
+
/>
|
|
105
|
+
);
|
|
106
|
+
}
|
package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/retrieval-result-count.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const RETRIEVAL_RESULT_COUNT_MIN = 0;
|
|
2
|
+
|
|
3
|
+
export function parseRetrievalResultCountInput(
|
|
4
|
+
value: string,
|
|
5
|
+
): number | undefined {
|
|
6
|
+
const trimmed = value.trim();
|
|
7
|
+
if (!trimmed) return undefined;
|
|
8
|
+
|
|
9
|
+
const parsed = Number(trimmed);
|
|
10
|
+
return Number.isFinite(parsed) ? parsed : undefined;
|
|
11
|
+
}
|
|
@@ -3,11 +3,18 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import Link from "next/link";
|
|
5
5
|
import { usePathname } from "next/navigation";
|
|
6
|
-
import { ArrowLeft } from "lucide-react";
|
|
6
|
+
import { ArrowLeft, PanelLeftClose, PanelLeft } from "lucide-react";
|
|
7
7
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
8
8
|
|
|
9
9
|
import { cn } from "@/lib/utils";
|
|
10
10
|
import { useSidebarCollapsed } from "@/hooks/use-sidebar-collapsed";
|
|
11
|
+
import { useDetailSidebarCollapsed } from "@/hooks/use-detail-sidebar-collapsed";
|
|
12
|
+
import {
|
|
13
|
+
Tooltip,
|
|
14
|
+
TooltipContent,
|
|
15
|
+
TooltipProvider,
|
|
16
|
+
TooltipTrigger,
|
|
17
|
+
} from "@/components/ui/tooltip";
|
|
11
18
|
|
|
12
19
|
/**
|
|
13
20
|
* webUI-style "detail-page" secondary sidebar. Pairs with the primary
|
|
@@ -26,6 +33,12 @@ export function DetailSidebar({
|
|
|
26
33
|
className?: string;
|
|
27
34
|
children: React.ReactNode;
|
|
28
35
|
}) {
|
|
36
|
+
const { collapsed } = useDetailSidebarCollapsed();
|
|
37
|
+
// When collapsed, render nothing — the parent `DetailLayout` renders a
|
|
38
|
+
// `DetailSidebarRestoreButton` so the user can bring the sidebar back.
|
|
39
|
+
// Returning null (rather than a zero-width aside) keeps the flex math
|
|
40
|
+
// simple: the right pane just fills the row.
|
|
41
|
+
if (collapsed) return null;
|
|
29
42
|
return (
|
|
30
43
|
<aside
|
|
31
44
|
className={cn(
|
|
@@ -44,6 +57,35 @@ export function DetailSidebar({
|
|
|
44
57
|
);
|
|
45
58
|
}
|
|
46
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Floating "open detail sidebar" button shown in the right pane when the
|
|
62
|
+
* detail sidebar is collapsed. Anchored to the top-left of the content
|
|
63
|
+
* area so it lands roughly where the sidebar's header would have been —
|
|
64
|
+
* matching VSCode's restore-from-collapsed pattern.
|
|
65
|
+
*/
|
|
66
|
+
function DetailSidebarRestoreButton() {
|
|
67
|
+
const { toggle } = useDetailSidebarCollapsed();
|
|
68
|
+
return (
|
|
69
|
+
<TooltipProvider delayDuration={200}>
|
|
70
|
+
<Tooltip>
|
|
71
|
+
<TooltipTrigger asChild>
|
|
72
|
+
<button
|
|
73
|
+
type="button"
|
|
74
|
+
aria-label="展开侧边栏"
|
|
75
|
+
onClick={toggle}
|
|
76
|
+
className="hidden md:flex absolute left-3 top-3 z-10 h-8 w-8 items-center justify-center rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--card))] text-[hsl(var(--muted-foreground))] shadow-sm transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--foreground))]"
|
|
77
|
+
>
|
|
78
|
+
<PanelLeft className="h-4 w-4" />
|
|
79
|
+
</button>
|
|
80
|
+
</TooltipTrigger>
|
|
81
|
+
<TooltipContent side="right" sideOffset={6}>
|
|
82
|
+
展开侧边栏
|
|
83
|
+
</TooltipContent>
|
|
84
|
+
</Tooltip>
|
|
85
|
+
</TooltipProvider>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
47
89
|
const detailIconAccent = cva(
|
|
48
90
|
"flex h-9 w-9 items-center justify-center rounded-lg [&>svg]:h-[18px] [&>svg]:w-[18px]",
|
|
49
91
|
{
|
|
@@ -83,11 +125,38 @@ export function DetailSidebarHeader({
|
|
|
83
125
|
actions,
|
|
84
126
|
extra,
|
|
85
127
|
}: DetailSidebarHeaderProps) {
|
|
128
|
+
const { toggle } = useDetailSidebarCollapsed();
|
|
86
129
|
return (
|
|
87
130
|
<header className="flex flex-col gap-2 border-b border-[hsl(var(--border-light))] px-4 pb-4 pt-4">
|
|
88
131
|
<div className="flex items-start justify-between gap-2">
|
|
89
132
|
<div className={detailIconAccent({ accent })}>{icon}</div>
|
|
90
|
-
{
|
|
133
|
+
{/*
|
|
134
|
+
Right-side controls: any consumer-supplied actions (delete, etc.)
|
|
135
|
+
plus a built-in "collapse sidebar" button. The collapse button is
|
|
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.
|
|
139
|
+
*/}
|
|
140
|
+
<div className="-mt-1 -mr-1 flex items-center gap-0.5">
|
|
141
|
+
{actions}
|
|
142
|
+
<TooltipProvider delayDuration={200}>
|
|
143
|
+
<Tooltip>
|
|
144
|
+
<TooltipTrigger asChild>
|
|
145
|
+
<button
|
|
146
|
+
type="button"
|
|
147
|
+
aria-label="收起侧边栏"
|
|
148
|
+
onClick={toggle}
|
|
149
|
+
className="flex h-7 w-7 items-center justify-center rounded-md text-[hsl(var(--muted-foreground))] transition-colors hover:bg-[hsl(var(--background))] hover:text-[hsl(var(--foreground))]"
|
|
150
|
+
>
|
|
151
|
+
<PanelLeftClose className="h-4 w-4" />
|
|
152
|
+
</button>
|
|
153
|
+
</TooltipTrigger>
|
|
154
|
+
<TooltipContent side="bottom" sideOffset={6}>
|
|
155
|
+
收起侧边栏
|
|
156
|
+
</TooltipContent>
|
|
157
|
+
</Tooltip>
|
|
158
|
+
</TooltipProvider>
|
|
159
|
+
</div>
|
|
91
160
|
</div>
|
|
92
161
|
<div className="space-y-0.5">
|
|
93
162
|
<div className="text-sm font-semibold leading-tight text-[hsl(var(--foreground))]">
|
|
@@ -245,11 +314,22 @@ export function DetailLayout({
|
|
|
245
314
|
sidebar: React.ReactNode;
|
|
246
315
|
children: React.ReactNode;
|
|
247
316
|
}) {
|
|
317
|
+
const { collapsed } = useDetailSidebarCollapsed();
|
|
248
318
|
return (
|
|
249
319
|
<AppShellLayout>
|
|
250
320
|
{sidebar}
|
|
251
|
-
|
|
252
|
-
|
|
321
|
+
{/*
|
|
322
|
+
Wrap the right pane in a `relative` so the restore button can pin
|
|
323
|
+
to its top-left without scrolling away with the content. Splitting
|
|
324
|
+
the previous single `flex-1 overflow-y-auto` into a `relative` outer
|
|
325
|
+
+ an inner `absolute inset-0` scroll container achieves this without
|
|
326
|
+
changing the visible layout for the expanded case.
|
|
327
|
+
*/}
|
|
328
|
+
<div className="relative min-w-0 flex-1">
|
|
329
|
+
{collapsed ? <DetailSidebarRestoreButton /> : null}
|
|
330
|
+
<div className="absolute inset-0 overflow-y-auto px-7 py-5 max-md:px-4">
|
|
331
|
+
{children}
|
|
332
|
+
</div>
|
|
253
333
|
</div>
|
|
254
334
|
</AppShellLayout>
|
|
255
335
|
);
|