@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
|
@@ -25,6 +25,7 @@ import { TemperatureSlider } from "@/components/shared/temperature-slider";
|
|
|
25
25
|
import { newId } from "@/lib/random-id";
|
|
26
26
|
|
|
27
27
|
import { AddMountRow } from "./add-mount-row";
|
|
28
|
+
import { MountEmptyState } from "./mount-empty-state";
|
|
28
29
|
import { MountRow } from "./mount-row";
|
|
29
30
|
import { UnifiedRetrievalSection } from "./unified-retrieval-section";
|
|
30
31
|
|
|
@@ -163,35 +164,42 @@ export function ChatMountConfig({ open, onOpenChange, onSave }: ChatMountConfigP
|
|
|
163
164
|
</div>
|
|
164
165
|
</div>
|
|
165
166
|
|
|
166
|
-
<AddMountRow
|
|
167
|
-
kbs={availableKbs}
|
|
168
|
-
onAdd={(kb) =>
|
|
169
|
-
cfg.addMount({
|
|
170
|
-
id: newId("mount"),
|
|
171
|
-
knowledgeBaseName: kb.knowledgeBaseName,
|
|
172
|
-
})
|
|
173
|
-
}
|
|
174
|
-
/>
|
|
175
|
-
|
|
176
167
|
{cfg.mounts.length === 0 ? (
|
|
177
|
-
<
|
|
178
|
-
|
|
179
|
-
|
|
168
|
+
<MountEmptyState
|
|
169
|
+
kbs={kbs}
|
|
170
|
+
onAdd={(kb) =>
|
|
171
|
+
cfg.addMount({
|
|
172
|
+
id: newId("mount"),
|
|
173
|
+
knowledgeBaseName: kb.knowledgeBaseName,
|
|
174
|
+
})
|
|
175
|
+
}
|
|
176
|
+
/>
|
|
180
177
|
) : (
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
178
|
+
<>
|
|
179
|
+
<div className="space-y-2">
|
|
180
|
+
{cfg.mounts.map((mount) => {
|
|
181
|
+
const kb = kbs.find(
|
|
182
|
+
(k) => k.knowledgeBaseName === mount.knowledgeBaseName,
|
|
183
|
+
);
|
|
184
|
+
return (
|
|
185
|
+
<MountRow
|
|
186
|
+
key={mount.id}
|
|
187
|
+
mount={mount}
|
|
188
|
+
subspaceEnabled={kb?.subspace === true}
|
|
189
|
+
/>
|
|
190
|
+
);
|
|
191
|
+
})}
|
|
192
|
+
</div>
|
|
193
|
+
<AddMountRow
|
|
194
|
+
kbs={availableKbs}
|
|
195
|
+
onAdd={(kb) =>
|
|
196
|
+
cfg.addMount({
|
|
197
|
+
id: newId("mount"),
|
|
198
|
+
knowledgeBaseName: kb.knowledgeBaseName,
|
|
199
|
+
})
|
|
200
|
+
}
|
|
201
|
+
/>
|
|
202
|
+
</>
|
|
195
203
|
)}
|
|
196
204
|
</div>
|
|
197
205
|
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { Database, Plus, Sparkles } from "lucide-react";
|
|
5
|
+
|
|
6
|
+
import { Button } from "@/components/ui/button";
|
|
7
|
+
import type { KnowledgeBase } from "@/types/knowledge-base";
|
|
8
|
+
|
|
9
|
+
import { MountPicker } from "./mount-picker";
|
|
10
|
+
|
|
11
|
+
interface MountEmptyStateProps {
|
|
12
|
+
/** All KBs that exist in the project. When empty we fall back to a
|
|
13
|
+
* "create your first KB" hero instead of the picker. */
|
|
14
|
+
kbs: KnowledgeBase[];
|
|
15
|
+
onAdd: (kb: KnowledgeBase) => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Hero call-to-action shown when the chat session has zero mounted KBs. The
|
|
20
|
+
* card is intentionally the visual focal point of the panel — beginners
|
|
21
|
+
* previously missed the inline Select trigger because it read as a hint
|
|
22
|
+
* label rather than an action.
|
|
23
|
+
*
|
|
24
|
+
* Two variants:
|
|
25
|
+
* • `kbs.length > 0` → primary button opens the searchable picker
|
|
26
|
+
* • `kbs.length === 0` → primary link sends the user to the KB creation page
|
|
27
|
+
* (no picker would have any items to offer)
|
|
28
|
+
*/
|
|
29
|
+
export function MountEmptyState({ kbs, onAdd }: MountEmptyStateProps) {
|
|
30
|
+
const hasNoKbs = kbs.length === 0;
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div
|
|
34
|
+
className="animate-home-reveal relative overflow-hidden rounded-lg border border-dashed border-[hsl(var(--primary)/0.35)] bg-gradient-to-br from-[hsl(var(--primary-soft))] via-[hsl(var(--surface))] to-[hsl(var(--surface))] px-5 py-6 text-center"
|
|
35
|
+
role="region"
|
|
36
|
+
aria-label="挂载知识库"
|
|
37
|
+
>
|
|
38
|
+
{/* Decorative corner spark — subtle brand accent, no semantic meaning */}
|
|
39
|
+
<Sparkles
|
|
40
|
+
className="pointer-events-none absolute right-3 top-3 h-3.5 w-3.5 text-[hsl(var(--primary)/0.45)]"
|
|
41
|
+
aria-hidden
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
{/* Soft-tinted icon tile mirroring the home empty-state visual language */}
|
|
45
|
+
<div className="mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-xl bg-[hsl(var(--primary-soft))] ring-1 ring-[hsl(var(--primary)/0.18)]">
|
|
46
|
+
<Database className="h-6 w-6 text-[hsl(var(--primary))]" />
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<h3 className="text-sm font-semibold text-[hsl(var(--foreground))]">
|
|
50
|
+
{hasNoKbs ? "还没有任何知识库" : "挂载知识库以启用 RAG"}
|
|
51
|
+
</h3>
|
|
52
|
+
<p className="mx-auto mt-1 max-w-[320px] text-xs leading-relaxed text-[hsl(var(--muted-foreground))]">
|
|
53
|
+
{hasNoKbs
|
|
54
|
+
? "创建第一个知识库后,即可在对话中挂载并启用检索增强"
|
|
55
|
+
: "挂载后,模型将基于知识库内容生成回答,支持并行检索与全局重排"}
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
<div className="mt-4 flex flex-col items-center gap-2">
|
|
59
|
+
{hasNoKbs ? (
|
|
60
|
+
<Button asChild size="default" className="h-9 px-4">
|
|
61
|
+
<Link href="/knowledge-base/create">
|
|
62
|
+
<Database className="h-4 w-4" />
|
|
63
|
+
创建知识库
|
|
64
|
+
</Link>
|
|
65
|
+
</Button>
|
|
66
|
+
) : (
|
|
67
|
+
<MountPicker kbs={kbs} onPick={onAdd} align="center">
|
|
68
|
+
<Button type="button" size="default" className="h-9 px-4">
|
|
69
|
+
<Plus className="h-4 w-4" />
|
|
70
|
+
挂载知识库
|
|
71
|
+
</Button>
|
|
72
|
+
</MountPicker>
|
|
73
|
+
)}
|
|
74
|
+
|
|
75
|
+
{!hasNoKbs ? (
|
|
76
|
+
<p className="text-[11px] text-[hsl(var(--muted-foreground))]">
|
|
77
|
+
从已有的{" "}
|
|
78
|
+
<span className="font-medium text-[hsl(var(--foreground))]">
|
|
79
|
+
{kbs.length}
|
|
80
|
+
</span>{" "}
|
|
81
|
+
个知识库中选择
|
|
82
|
+
</p>
|
|
83
|
+
) : null}
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useState, type ReactNode } from "react";
|
|
4
|
+
import { Database } from "lucide-react";
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
Command,
|
|
8
|
+
CommandEmpty,
|
|
9
|
+
CommandGroup,
|
|
10
|
+
CommandInput,
|
|
11
|
+
CommandItem,
|
|
12
|
+
CommandList,
|
|
13
|
+
} from "@/components/ui/command";
|
|
14
|
+
import {
|
|
15
|
+
Popover,
|
|
16
|
+
PopoverContent,
|
|
17
|
+
PopoverTrigger,
|
|
18
|
+
} from "@/components/ui/popover";
|
|
19
|
+
import type { KnowledgeBase } from "@/types/knowledge-base";
|
|
20
|
+
|
|
21
|
+
interface MountPickerProps {
|
|
22
|
+
/** KBs available to mount — typically the global list minus already-mounted. */
|
|
23
|
+
kbs: KnowledgeBase[];
|
|
24
|
+
onPick: (kb: KnowledgeBase) => void;
|
|
25
|
+
/** Render-prop trigger so the same picker can hang off either the empty-
|
|
26
|
+
* state hero button or the compact "add more" affordance below the list. */
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
/** Where to anchor the popover relative to the trigger. */
|
|
29
|
+
align?: "start" | "center" | "end";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Searchable knowledge-base picker rendered inside a Popover. Picking commits
|
|
34
|
+
* immediately and closes the popover — single-click feel matching the
|
|
35
|
+
* "label / member picker" pattern used by Linear, GitHub and Vercel.
|
|
36
|
+
*
|
|
37
|
+
* The trigger is render-prop-driven so the surrounding UI can promote it into
|
|
38
|
+
* a dominant primary button (when no KB is mounted yet) or demote it to a
|
|
39
|
+
* compact dashed pill (once the user has at least one mount).
|
|
40
|
+
*/
|
|
41
|
+
export function MountPicker({
|
|
42
|
+
kbs,
|
|
43
|
+
onPick,
|
|
44
|
+
children,
|
|
45
|
+
align = "start",
|
|
46
|
+
}: MountPickerProps) {
|
|
47
|
+
const [open, setOpen] = useState(false);
|
|
48
|
+
|
|
49
|
+
const handleSelect = (name: string) => {
|
|
50
|
+
const kb = kbs.find((k) => k.knowledgeBaseName === name);
|
|
51
|
+
if (!kb) return;
|
|
52
|
+
onPick(kb);
|
|
53
|
+
setOpen(false);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<Popover open={open} onOpenChange={setOpen}>
|
|
58
|
+
<PopoverTrigger asChild>{children}</PopoverTrigger>
|
|
59
|
+
<PopoverContent
|
|
60
|
+
align={align}
|
|
61
|
+
sideOffset={6}
|
|
62
|
+
className="w-[var(--radix-popover-trigger-width)] min-w-[260px] p-0"
|
|
63
|
+
>
|
|
64
|
+
<Command>
|
|
65
|
+
<CommandInput placeholder="搜索知识库..." />
|
|
66
|
+
<CommandList>
|
|
67
|
+
<CommandEmpty>未找到匹配的知识库</CommandEmpty>
|
|
68
|
+
{kbs.length > 0 ? (
|
|
69
|
+
<CommandGroup>
|
|
70
|
+
{kbs.map((kb) => (
|
|
71
|
+
<CommandItem
|
|
72
|
+
key={kb.knowledgeBaseName}
|
|
73
|
+
value={kb.knowledgeBaseName}
|
|
74
|
+
onSelect={handleSelect}
|
|
75
|
+
>
|
|
76
|
+
<Database className="text-[hsl(var(--muted-foreground))]" />
|
|
77
|
+
<span className="truncate">{kb.knowledgeBaseName}</span>
|
|
78
|
+
</CommandItem>
|
|
79
|
+
))}
|
|
80
|
+
</CommandGroup>
|
|
81
|
+
) : null}
|
|
82
|
+
</CommandList>
|
|
83
|
+
</Command>
|
|
84
|
+
</PopoverContent>
|
|
85
|
+
</Popover>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
@@ -112,7 +112,7 @@ export function UnifiedRetrievalSection({
|
|
|
112
112
|
}
|
|
113
113
|
cfg.setRetrieval(next);
|
|
114
114
|
cfg.setPerKbTopK(
|
|
115
|
-
typeof values.topK === "number" && values.topK
|
|
115
|
+
typeof values.topK === "number" && values.topK >= 0
|
|
116
116
|
? values.topK
|
|
117
117
|
: DEFAULT_PER_KB_TOP_K,
|
|
118
118
|
);
|
|
@@ -173,7 +173,8 @@ export function UnifiedRetrievalSection({
|
|
|
173
173
|
knowledgeBase={singleKb}
|
|
174
174
|
filterRef={filterRef}
|
|
175
175
|
topKLabel="每 KB topK"
|
|
176
|
-
|
|
176
|
+
topKHint="单库检索条数,默认 20"
|
|
177
|
+
topKMode="single"
|
|
177
178
|
/>
|
|
178
179
|
</form>
|
|
179
180
|
</Form>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { useState, useCallback, useMemo, useRef } from "react";
|
|
4
|
-
import { Upload, X, FileText, ChevronDown, ChevronRight, FolderOpen } from "lucide-react";
|
|
4
|
+
import { Upload, X, FileText, ChevronDown, ChevronRight, FolderOpen, Cloud } from "lucide-react";
|
|
5
5
|
import { toast } from "sonner";
|
|
6
6
|
import { Button } from "@/components/ui/button";
|
|
7
7
|
import { Input } from "@/components/ui/input";
|
|
@@ -24,9 +24,23 @@ import {
|
|
|
24
24
|
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs";
|
|
25
25
|
import { Checkbox } from "@/components/ui/checkbox";
|
|
26
26
|
import { useUploadDocuments } from "@/hooks/use-upload-documents";
|
|
27
|
+
import { useOssImport } from "@/hooks/use-oss-import";
|
|
28
|
+
import {
|
|
29
|
+
filterFolderFiles,
|
|
30
|
+
parseExtensionList,
|
|
31
|
+
type RecursiveExtensionRules,
|
|
32
|
+
} from "@/lib/extension-filter";
|
|
33
|
+
import { buildFolderGlobs } from "@/lib/glob-filter";
|
|
34
|
+
import { partitionSelection, type OssSelection } from "@/lib/oss-selection";
|
|
27
35
|
import { cn } from "@/lib/utils";
|
|
28
36
|
import type { MetadataField } from "@/types/knowledge-base";
|
|
29
37
|
|
|
38
|
+
import {
|
|
39
|
+
OssImportTab,
|
|
40
|
+
EMPTY_OSS_FILTER,
|
|
41
|
+
type OssImportFilterState,
|
|
42
|
+
} from "./oss-import-tab";
|
|
43
|
+
|
|
30
44
|
interface DocUploadDialogProps {
|
|
31
45
|
knowledgeBaseName: string;
|
|
32
46
|
metadataFields?: MetadataField[];
|
|
@@ -35,7 +49,7 @@ interface DocUploadDialogProps {
|
|
|
35
49
|
onOpenChange: (open: boolean) => void;
|
|
36
50
|
}
|
|
37
51
|
|
|
38
|
-
type UploadMode = "file" | "folder";
|
|
52
|
+
type UploadMode = "file" | "folder" | "oss";
|
|
39
53
|
|
|
40
54
|
/** Convert form string values to typed values based on field type */
|
|
41
55
|
function convertMetadataValues(
|
|
@@ -75,25 +89,6 @@ function convertMetadataValues(
|
|
|
75
89
|
return result;
|
|
76
90
|
}
|
|
77
91
|
|
|
78
|
-
/**
|
|
79
|
-
* Normalize an extension-list input like ".md, pdf , .TXT" into a lowercase
|
|
80
|
-
* array of dotted suffixes: [".md", ".pdf", ".txt"]. Empty tokens are
|
|
81
|
-
* dropped and a leading dot is added when the user omits it.
|
|
82
|
-
*/
|
|
83
|
-
function parseExtensionList(raw: string): string[] {
|
|
84
|
-
return raw
|
|
85
|
-
.split(",")
|
|
86
|
-
.map((s) => s.trim().toLowerCase())
|
|
87
|
-
.filter(Boolean)
|
|
88
|
-
.map((ext) => (ext.startsWith(".") ? ext : `.${ext}`));
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
interface FolderFilterOptions {
|
|
92
|
-
include: string[];
|
|
93
|
-
exclude: string[];
|
|
94
|
-
recursive: boolean;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
92
|
/**
|
|
98
93
|
* Minimal subset of the FileSystemEntry API we rely on. Typescript ships
|
|
99
94
|
* loose types under DOM lib, but they don't reliably expose
|
|
@@ -195,27 +190,6 @@ function extractEntries(items: DataTransferItemList): FsEntry[] {
|
|
|
195
190
|
return out;
|
|
196
191
|
}
|
|
197
192
|
|
|
198
|
-
/** Apply include / exclude / recursive filters to a batch of picked files. */
|
|
199
|
-
function filterFolderFiles(list: File[], opts: FolderFilterOptions): File[] {
|
|
200
|
-
const { include, exclude, recursive } = opts;
|
|
201
|
-
return list.filter((file) => {
|
|
202
|
-
const relPath = file.webkitRelativePath || file.name;
|
|
203
|
-
// Depth is the number of slashes in the relative path; a top-level file
|
|
204
|
-
// inside the picked folder has exactly one ("<root>/<name>").
|
|
205
|
-
const depth = (relPath.match(/\//g) || []).length;
|
|
206
|
-
if (!recursive && depth > 1) return false;
|
|
207
|
-
|
|
208
|
-
const lowerName = file.name.toLowerCase();
|
|
209
|
-
if (include.length > 0 && !include.some((ext) => lowerName.endsWith(ext))) {
|
|
210
|
-
return false;
|
|
211
|
-
}
|
|
212
|
-
if (exclude.length > 0 && exclude.some((ext) => lowerName.endsWith(ext))) {
|
|
213
|
-
return false;
|
|
214
|
-
}
|
|
215
|
-
return true;
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
|
|
219
193
|
export function DocUploadDialog({
|
|
220
194
|
knowledgeBaseName,
|
|
221
195
|
metadataFields,
|
|
@@ -240,6 +214,13 @@ export function DocUploadDialog({
|
|
|
240
214
|
const folderInputRef = useRef<HTMLInputElement | null>(null);
|
|
241
215
|
const fileInputRef = useRef<HTMLInputElement | null>(null);
|
|
242
216
|
|
|
217
|
+
// OSS-mode state. Selection lives here (not in OssImportTab) so that
|
|
218
|
+
// tab-mode switches can reset it cleanly via resetForm().
|
|
219
|
+
const [ossSelection, setOssSelection] = useState<OssSelection>([]);
|
|
220
|
+
const [ossFilter, setOssFilter] = useState<OssImportFilterState>(EMPTY_OSS_FILTER);
|
|
221
|
+
|
|
222
|
+
const ossImport = useOssImport();
|
|
223
|
+
|
|
243
224
|
const hasSchemaFields = metadataFields && metadataFields.length > 0;
|
|
244
225
|
const uploadDocuments = useUploadDocuments();
|
|
245
226
|
|
|
@@ -252,7 +233,7 @@ export function DocUploadDialog({
|
|
|
252
233
|
include: includeList,
|
|
253
234
|
exclude: excludeList,
|
|
254
235
|
recursive,
|
|
255
|
-
}),
|
|
236
|
+
} satisfies RecursiveExtensionRules),
|
|
256
237
|
[folderRaw, includeList, excludeList, recursive],
|
|
257
238
|
);
|
|
258
239
|
|
|
@@ -432,6 +413,8 @@ export function DocUploadDialog({
|
|
|
432
413
|
setMode("file");
|
|
433
414
|
setFiles([]);
|
|
434
415
|
setFolderRaw([]);
|
|
416
|
+
setOssSelection([]);
|
|
417
|
+
setOssFilter(EMPTY_OSS_FILTER);
|
|
435
418
|
setIncludeInput("");
|
|
436
419
|
setExcludeInput("");
|
|
437
420
|
setRecursive(true);
|
|
@@ -444,9 +427,17 @@ export function DocUploadDialog({
|
|
|
444
427
|
const handleModeChange = useCallback((next: string) => {
|
|
445
428
|
const nextMode = next as UploadMode;
|
|
446
429
|
setMode(nextMode);
|
|
447
|
-
// Wipe
|
|
448
|
-
if (nextMode === "file")
|
|
449
|
-
|
|
430
|
+
// Wipe other tabs' picks to avoid accidental submission of stale data.
|
|
431
|
+
if (nextMode === "file") {
|
|
432
|
+
setFolderRaw([]);
|
|
433
|
+
setOssSelection([]);
|
|
434
|
+
} else if (nextMode === "folder") {
|
|
435
|
+
setFiles([]);
|
|
436
|
+
setOssSelection([]);
|
|
437
|
+
} else {
|
|
438
|
+
setFiles([]);
|
|
439
|
+
setFolderRaw([]);
|
|
440
|
+
}
|
|
450
441
|
}, []);
|
|
451
442
|
|
|
452
443
|
const updateMetadataField = useCallback((fieldName: string, value: string) => {
|
|
@@ -461,6 +452,91 @@ export function DocUploadDialog({
|
|
|
461
452
|
}, [hasSchemaFields, metadataValues, metadataFields]);
|
|
462
453
|
|
|
463
454
|
async function handleSubmit() {
|
|
455
|
+
// ---- OSS branch — early return, leaves the local-files/folder branch below intact ----
|
|
456
|
+
if (mode === "oss") {
|
|
457
|
+
const { fileKeys, folderPrefixes } = partitionSelection(ossSelection);
|
|
458
|
+
if (fileKeys.length === 0 && folderPrefixes.length === 0) {
|
|
459
|
+
toast.error("请在 OSS 浏览器中至少选择一个文件或文件夹");
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
let metadata: Record<string, unknown> | undefined;
|
|
464
|
+
if (hasSchemaFields) {
|
|
465
|
+
const converted = convertMetadataValues(metadataValues, metadataFields!);
|
|
466
|
+
if (Object.keys(converted).length > 0) metadata = converted;
|
|
467
|
+
} else if (metadataJson.trim()) {
|
|
468
|
+
try {
|
|
469
|
+
metadata = JSON.parse(metadataJson) as Record<string, unknown>;
|
|
470
|
+
} catch {
|
|
471
|
+
toast.error("Metadata JSON 格式不正确");
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
try {
|
|
477
|
+
// Translate the four free-text inputs into the server's glob form.
|
|
478
|
+
// Filters only travel on folder items; the hook ignores them when
|
|
479
|
+
// there is no folder selection, so the "filter applies to folder
|
|
480
|
+
// selections only" semantic is enforced once, in one place.
|
|
481
|
+
const { inclusionFilters, exclusionFilters } = buildFolderGlobs(ossFilter);
|
|
482
|
+
const result = await ossImport.mutateAsync({
|
|
483
|
+
knowledgeBaseName,
|
|
484
|
+
fileKeys,
|
|
485
|
+
folderPrefixes,
|
|
486
|
+
inclusionFilters,
|
|
487
|
+
exclusionFilters,
|
|
488
|
+
subspace: subspace || undefined,
|
|
489
|
+
metadata,
|
|
490
|
+
});
|
|
491
|
+
const details = result.documentDetails ?? [];
|
|
492
|
+
const failed = details.filter((d) => d.status.toLowerCase() === "failed");
|
|
493
|
+
|
|
494
|
+
// Distinguish "filter excluded everything" from a successful import.
|
|
495
|
+
if (details.length === 0) {
|
|
496
|
+
toast.warning("未导入任何文件", {
|
|
497
|
+
description:
|
|
498
|
+
folderPrefixes.length > 0
|
|
499
|
+
? "选中的文件夹经过过滤后没有匹配项,请放宽过滤规则"
|
|
500
|
+
: "选择列表为空",
|
|
501
|
+
});
|
|
502
|
+
resetForm();
|
|
503
|
+
onOpenChange(false);
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
if (failed.length === 0) {
|
|
508
|
+
toast.success(`成功导入 ${details.length} 个文档`);
|
|
509
|
+
} else if (failed.length < details.length) {
|
|
510
|
+
const reasons = [
|
|
511
|
+
...new Set(failed.map((d) => d.failureReason).filter(Boolean)),
|
|
512
|
+
];
|
|
513
|
+
toast.warning(
|
|
514
|
+
`${details.length - failed.length} 个导入成功,${failed.length} 个失败`,
|
|
515
|
+
{ description: reasons.length > 0 ? reasons.slice(0, 3).join("; ") : undefined },
|
|
516
|
+
);
|
|
517
|
+
} else {
|
|
518
|
+
// All failed: show the first few distinct failureReasons so the user
|
|
519
|
+
// can diagnose without digging into devtools. The most common cause
|
|
520
|
+
// (until we surface it in the UI) is a server-side validation: e.g.
|
|
521
|
+
// unsupported file type, invalid OSS URI, bucket-endpoint mismatch.
|
|
522
|
+
const reasons = [
|
|
523
|
+
...new Set(failed.map((d) => d.failureReason).filter(Boolean)),
|
|
524
|
+
];
|
|
525
|
+
toast.error(`全部 ${failed.length} 个文档导入失败`, {
|
|
526
|
+
description:
|
|
527
|
+
reasons.length > 0 ? reasons.slice(0, 3).join("; ") : undefined,
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
resetForm();
|
|
531
|
+
onOpenChange(false);
|
|
532
|
+
} catch (error) {
|
|
533
|
+
const message = error instanceof Error ? error.message : "OSS 导入失败";
|
|
534
|
+
toast.error(message);
|
|
535
|
+
}
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
// ---- end OSS branch; the existing handleSubmit body continues below this point unchanged ----
|
|
539
|
+
|
|
464
540
|
if (effectiveFiles.length === 0) {
|
|
465
541
|
toast.error(
|
|
466
542
|
mode === "folder"
|
|
@@ -572,7 +648,7 @@ export function DocUploadDialog({
|
|
|
572
648
|
|
|
573
649
|
<div className="space-y-4 min-w-0">
|
|
574
650
|
<Tabs value={mode} onValueChange={handleModeChange}>
|
|
575
|
-
<TabsList className="grid w-full grid-cols-
|
|
651
|
+
<TabsList className="grid w-full grid-cols-3">
|
|
576
652
|
<TabsTrigger value="file" className="gap-2">
|
|
577
653
|
<FileText className="h-3.5 w-3.5" />
|
|
578
654
|
按文件
|
|
@@ -581,6 +657,10 @@ export function DocUploadDialog({
|
|
|
581
657
|
<FolderOpen className="h-3.5 w-3.5" />
|
|
582
658
|
按文件夹
|
|
583
659
|
</TabsTrigger>
|
|
660
|
+
<TabsTrigger value="oss" className="gap-2">
|
|
661
|
+
<Cloud className="h-3.5 w-3.5" />
|
|
662
|
+
从 OSS 导入
|
|
663
|
+
</TabsTrigger>
|
|
584
664
|
</TabsList>
|
|
585
665
|
|
|
586
666
|
{/* ---- File mode ---- */}
|
|
@@ -765,6 +845,16 @@ export function DocUploadDialog({
|
|
|
765
845
|
</div>
|
|
766
846
|
)}
|
|
767
847
|
</TabsContent>
|
|
848
|
+
|
|
849
|
+
{/* ---- OSS mode ---- */}
|
|
850
|
+
<TabsContent value="oss" className="space-y-3">
|
|
851
|
+
<OssImportTab
|
|
852
|
+
selection={ossSelection}
|
|
853
|
+
onSelectionChange={setOssSelection}
|
|
854
|
+
filter={ossFilter}
|
|
855
|
+
onFilterChange={setOssFilter}
|
|
856
|
+
/>
|
|
857
|
+
</TabsContent>
|
|
768
858
|
</Tabs>
|
|
769
859
|
|
|
770
860
|
{/* 子空间 */}
|
|
@@ -876,19 +966,30 @@ export function DocUploadDialog({
|
|
|
876
966
|
resetForm();
|
|
877
967
|
onOpenChange(false);
|
|
878
968
|
}}
|
|
879
|
-
disabled={uploadDocuments.isPending}
|
|
969
|
+
disabled={uploadDocuments.isPending || ossImport.isPending}
|
|
880
970
|
>
|
|
881
971
|
取消
|
|
882
972
|
</Button>
|
|
883
973
|
<Button
|
|
884
974
|
onClick={handleSubmit}
|
|
885
|
-
disabled={
|
|
975
|
+
disabled={
|
|
976
|
+
(mode === "oss" && ossSelection.length === 0) ||
|
|
977
|
+
(mode !== "oss" && effectiveFiles.length === 0) ||
|
|
978
|
+
uploadDocuments.isPending ||
|
|
979
|
+
ossImport.isPending
|
|
980
|
+
}
|
|
886
981
|
>
|
|
887
|
-
{
|
|
888
|
-
?
|
|
889
|
-
?
|
|
890
|
-
|
|
891
|
-
|
|
982
|
+
{mode === "oss"
|
|
983
|
+
? ossImport.isPending
|
|
984
|
+
? ossImport.progress
|
|
985
|
+
? `导入中 ${ossImport.progress.completedItems}/${ossImport.progress.totalItems}`
|
|
986
|
+
: "提交中…"
|
|
987
|
+
: `导入 ${ossSelection.length} 项`
|
|
988
|
+
: uploadDocuments.isPending
|
|
989
|
+
? uploadDocuments.progress
|
|
990
|
+
? `上传中 ${uploadDocuments.progress.completedFiles}/${uploadDocuments.progress.totalFiles}`
|
|
991
|
+
: "准备上传..."
|
|
992
|
+
: `上传 ${effectiveFiles.length} 个文件`}
|
|
892
993
|
</Button>
|
|
893
994
|
</DialogFooter>
|
|
894
995
|
</DialogContent>
|