@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
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useMemo, useState } from "react";
|
|
4
|
+
import {
|
|
5
|
+
ChevronRight,
|
|
6
|
+
Database,
|
|
7
|
+
FileText,
|
|
8
|
+
Folder,
|
|
9
|
+
RefreshCw,
|
|
10
|
+
} from "lucide-react";
|
|
11
|
+
|
|
12
|
+
import { Checkbox } from "@/components/ui/checkbox";
|
|
13
|
+
import { EmptyState } from "@/components/ui/empty-state";
|
|
14
|
+
import { Button } from "@/components/ui/button";
|
|
15
|
+
import { Input } from "@/components/ui/input";
|
|
16
|
+
import { useOssList } from "@/hooks/use-oss-list";
|
|
17
|
+
import {
|
|
18
|
+
isFileSelected,
|
|
19
|
+
isFolderSelected,
|
|
20
|
+
toggleFile,
|
|
21
|
+
toggleFolder,
|
|
22
|
+
type OssSelection,
|
|
23
|
+
} from "@/lib/oss-selection";
|
|
24
|
+
import { cn } from "@/lib/utils";
|
|
25
|
+
|
|
26
|
+
interface OssBrowserProps {
|
|
27
|
+
selection: OssSelection;
|
|
28
|
+
onSelectionChange: (next: OssSelection) => void;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const SEARCH_DEBOUNCE_MS = 250;
|
|
32
|
+
|
|
33
|
+
/** Format a byte count as "1.2 MB" / "344 KB" / "12 B" with one decimal. */
|
|
34
|
+
function formatBytes(n: number): string {
|
|
35
|
+
if (!Number.isFinite(n) || n <= 0) return "—";
|
|
36
|
+
const units = ["B", "KB", "MB", "GB"];
|
|
37
|
+
let i = 0;
|
|
38
|
+
let v = n;
|
|
39
|
+
while (v >= 1024 && i < units.length - 1) {
|
|
40
|
+
v /= 1024;
|
|
41
|
+
i++;
|
|
42
|
+
}
|
|
43
|
+
return `${v.toFixed(i === 0 ? 0 : 1)} ${units[i]}`;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Slice a prefix into breadcrumb segments. "" → [], "docs/2026/" → [docs, 2026]. */
|
|
47
|
+
function breadcrumbSegments(prefix: string): { label: string; prefix: string }[] {
|
|
48
|
+
if (!prefix) return [];
|
|
49
|
+
const trimmed = prefix.endsWith("/") ? prefix.slice(0, -1) : prefix;
|
|
50
|
+
const parts = trimmed.split("/");
|
|
51
|
+
const out: { label: string; prefix: string }[] = [];
|
|
52
|
+
let acc = "";
|
|
53
|
+
for (const p of parts) {
|
|
54
|
+
acc += `${p}/`;
|
|
55
|
+
out.push({ label: p, prefix: acc });
|
|
56
|
+
}
|
|
57
|
+
return out;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Single-level OSS file/folder picker. The component owns navigation
|
|
62
|
+
* (`prefix`, `search`) and lifts selection up; the parent decides how the
|
|
63
|
+
* selection turns into a submission.
|
|
64
|
+
*
|
|
65
|
+
* Empty / error states render inline so a misconfigured OSS doesn't kick
|
|
66
|
+
* the user out of the upload dialog — they can switch back to a local tab.
|
|
67
|
+
*/
|
|
68
|
+
export function OssBrowser({ selection, onSelectionChange }: OssBrowserProps) {
|
|
69
|
+
const [prefix, setPrefix] = useState("");
|
|
70
|
+
const [searchInput, setSearchInput] = useState("");
|
|
71
|
+
const [search, setSearch] = useState("");
|
|
72
|
+
|
|
73
|
+
// Debounce search to keep keystrokes off the wire.
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
const id = setTimeout(() => setSearch(searchInput.trim()), SEARCH_DEBOUNCE_MS);
|
|
76
|
+
return () => clearTimeout(id);
|
|
77
|
+
}, [searchInput]);
|
|
78
|
+
|
|
79
|
+
const {
|
|
80
|
+
folders,
|
|
81
|
+
files,
|
|
82
|
+
isLoading,
|
|
83
|
+
isFetchingNextPage,
|
|
84
|
+
hasNextPage,
|
|
85
|
+
fetchNextPage,
|
|
86
|
+
refetch,
|
|
87
|
+
error,
|
|
88
|
+
errorCode,
|
|
89
|
+
} = useOssList({ prefix, search });
|
|
90
|
+
|
|
91
|
+
const breadcrumbs = useMemo(() => breadcrumbSegments(prefix), [prefix]);
|
|
92
|
+
|
|
93
|
+
// ---------- Empty / error branches ----------
|
|
94
|
+
|
|
95
|
+
if (errorCode === "OSS_NOT_CONFIGURED") {
|
|
96
|
+
return (
|
|
97
|
+
<EmptyState
|
|
98
|
+
icon={<Database />}
|
|
99
|
+
title="尚未配置 OSS"
|
|
100
|
+
description="请先在「实例配置」中绑定 OSS 端点和 Bucket,再回到此处导入。"
|
|
101
|
+
/>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (error) {
|
|
106
|
+
return (
|
|
107
|
+
<EmptyState
|
|
108
|
+
icon={<Database />}
|
|
109
|
+
title={
|
|
110
|
+
errorCode === "OSS_FORBIDDEN"
|
|
111
|
+
? "无访问权限"
|
|
112
|
+
: errorCode === "OSS_BUCKET_NOT_FOUND"
|
|
113
|
+
? "Bucket 不存在"
|
|
114
|
+
: "OSS 列举失败"
|
|
115
|
+
}
|
|
116
|
+
description={error.message}
|
|
117
|
+
action={
|
|
118
|
+
<Button
|
|
119
|
+
type="button"
|
|
120
|
+
variant="outline"
|
|
121
|
+
size="sm"
|
|
122
|
+
onClick={() => refetch()}
|
|
123
|
+
>
|
|
124
|
+
<RefreshCw className="mr-1 h-3.5 w-3.5" />
|
|
125
|
+
重试
|
|
126
|
+
</Button>
|
|
127
|
+
}
|
|
128
|
+
/>
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// ---------- Main layout ----------
|
|
133
|
+
|
|
134
|
+
const totalRowCount = folders.length + files.length;
|
|
135
|
+
|
|
136
|
+
return (
|
|
137
|
+
<div className="rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--surface))]">
|
|
138
|
+
{/* Breadcrumb + search */}
|
|
139
|
+
<div className="flex items-center gap-2 border-b border-[hsl(var(--border))] px-3 py-2 text-xs">
|
|
140
|
+
<button
|
|
141
|
+
type="button"
|
|
142
|
+
className="text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))]"
|
|
143
|
+
onClick={() => setPrefix("")}
|
|
144
|
+
>
|
|
145
|
+
/
|
|
146
|
+
</button>
|
|
147
|
+
{breadcrumbs.map((seg, i) => (
|
|
148
|
+
<span key={seg.prefix} className="flex items-center gap-1">
|
|
149
|
+
<span className="text-[hsl(var(--muted-foreground))]">/</span>
|
|
150
|
+
<button
|
|
151
|
+
type="button"
|
|
152
|
+
className={cn(
|
|
153
|
+
"hover:text-[hsl(var(--foreground))]",
|
|
154
|
+
i === breadcrumbs.length - 1
|
|
155
|
+
? "text-[hsl(var(--foreground))] font-medium"
|
|
156
|
+
: "text-[hsl(var(--muted-foreground))]",
|
|
157
|
+
)}
|
|
158
|
+
onClick={() => setPrefix(seg.prefix)}
|
|
159
|
+
>
|
|
160
|
+
{seg.label}
|
|
161
|
+
</button>
|
|
162
|
+
</span>
|
|
163
|
+
))}
|
|
164
|
+
<Input
|
|
165
|
+
value={searchInput}
|
|
166
|
+
onChange={(e) => setSearchInput(e.target.value)}
|
|
167
|
+
placeholder="搜索当前目录"
|
|
168
|
+
className="ml-auto h-7 w-44 text-xs"
|
|
169
|
+
/>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
{/* Status bar */}
|
|
173
|
+
<div className="flex items-center justify-between border-b border-[hsl(var(--border))] px-3 py-1.5 text-xs text-[hsl(var(--muted-foreground))]">
|
|
174
|
+
<span>{totalRowCount} 个对象</span>
|
|
175
|
+
<span>已选 {selection.length} 项</span>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
{/* Rows */}
|
|
179
|
+
<div className="max-h-72 overflow-y-auto">
|
|
180
|
+
{isLoading ? (
|
|
181
|
+
<div className="px-3 py-6 text-center text-xs text-[hsl(var(--muted-foreground))]">
|
|
182
|
+
加载中…
|
|
183
|
+
</div>
|
|
184
|
+
) : totalRowCount === 0 ? (
|
|
185
|
+
<div className="px-3 py-8 text-center text-xs text-[hsl(var(--muted-foreground))]">
|
|
186
|
+
当前目录为空
|
|
187
|
+
</div>
|
|
188
|
+
) : (
|
|
189
|
+
<>
|
|
190
|
+
{folders.map((f) => {
|
|
191
|
+
const checked = isFolderSelected(selection, f.prefix);
|
|
192
|
+
return (
|
|
193
|
+
<div
|
|
194
|
+
key={f.prefix}
|
|
195
|
+
className={cn(
|
|
196
|
+
"group flex items-center gap-2 px-3 py-1.5 text-sm transition-colors hover:bg-[hsl(var(--accent))] cursor-pointer",
|
|
197
|
+
checked && "bg-[hsl(var(--primary-soft))]",
|
|
198
|
+
)}
|
|
199
|
+
onClick={() => setPrefix(f.prefix)}
|
|
200
|
+
>
|
|
201
|
+
<Checkbox
|
|
202
|
+
checked={checked}
|
|
203
|
+
onCheckedChange={() =>
|
|
204
|
+
onSelectionChange(toggleFolder(selection, { prefix: f.prefix }))
|
|
205
|
+
}
|
|
206
|
+
onClick={(e) => e.stopPropagation()}
|
|
207
|
+
/>
|
|
208
|
+
<Folder className="h-3.5 w-3.5 shrink-0 text-[hsl(var(--muted-foreground))]" />
|
|
209
|
+
<span className="flex-1 truncate">{f.name}</span>
|
|
210
|
+
<ChevronRight className="h-3.5 w-3.5 shrink-0 text-[hsl(var(--muted-foreground))] opacity-0 transition-opacity group-hover:opacity-100" />
|
|
211
|
+
</div>
|
|
212
|
+
);
|
|
213
|
+
})}
|
|
214
|
+
{files.map((f) => {
|
|
215
|
+
const checked = isFileSelected(selection, f.ossKey);
|
|
216
|
+
return (
|
|
217
|
+
<div
|
|
218
|
+
key={f.ossKey}
|
|
219
|
+
className={cn(
|
|
220
|
+
"flex items-center gap-2 px-3 py-1.5 text-sm transition-colors hover:bg-[hsl(var(--accent))] cursor-pointer",
|
|
221
|
+
checked && "bg-[hsl(var(--primary-soft))]",
|
|
222
|
+
)}
|
|
223
|
+
onClick={() =>
|
|
224
|
+
onSelectionChange(
|
|
225
|
+
toggleFile(selection, { ossKey: f.ossKey, size: f.size }),
|
|
226
|
+
)
|
|
227
|
+
}
|
|
228
|
+
>
|
|
229
|
+
<Checkbox
|
|
230
|
+
checked={checked}
|
|
231
|
+
onCheckedChange={() =>
|
|
232
|
+
onSelectionChange(
|
|
233
|
+
toggleFile(selection, { ossKey: f.ossKey, size: f.size }),
|
|
234
|
+
)
|
|
235
|
+
}
|
|
236
|
+
onClick={(e) => e.stopPropagation()}
|
|
237
|
+
/>
|
|
238
|
+
<FileText className="h-3.5 w-3.5 shrink-0 text-[hsl(var(--muted-foreground))]" />
|
|
239
|
+
<span className="flex-1 truncate">{f.name}</span>
|
|
240
|
+
<span className="shrink-0 text-xs text-[hsl(var(--muted-foreground))]">
|
|
241
|
+
{formatBytes(f.size)}
|
|
242
|
+
</span>
|
|
243
|
+
</div>
|
|
244
|
+
);
|
|
245
|
+
})}
|
|
246
|
+
{hasNextPage && (
|
|
247
|
+
<div className="px-3 py-2 text-center">
|
|
248
|
+
<Button
|
|
249
|
+
type="button"
|
|
250
|
+
variant="ghost"
|
|
251
|
+
size="sm"
|
|
252
|
+
onClick={fetchNextPage}
|
|
253
|
+
disabled={isFetchingNextPage}
|
|
254
|
+
>
|
|
255
|
+
{isFetchingNextPage ? "加载中…" : "加载更多"}
|
|
256
|
+
</Button>
|
|
257
|
+
</div>
|
|
258
|
+
)}
|
|
259
|
+
</>
|
|
260
|
+
)}
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
);
|
|
264
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
|
|
5
|
+
import { Input } from "@/components/ui/input";
|
|
6
|
+
import { Label } from "@/components/ui/label";
|
|
7
|
+
import { partitionSelection, type OssSelection } from "@/lib/oss-selection";
|
|
8
|
+
|
|
9
|
+
import { OssBrowser } from "./oss-browser";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Filter input shape — four free-text comma-separated fields. The translation
|
|
13
|
+
* to the server's glob form (`prefix*` / `*suffix`) lives in
|
|
14
|
+
* `@/lib/glob-filter`; this state is the raw text the user typed.
|
|
15
|
+
*/
|
|
16
|
+
export interface OssImportFilterState {
|
|
17
|
+
prefixIncludeInput: string;
|
|
18
|
+
prefixExcludeInput: string;
|
|
19
|
+
suffixIncludeInput: string;
|
|
20
|
+
suffixExcludeInput: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const EMPTY_OSS_FILTER: OssImportFilterState = {
|
|
24
|
+
prefixIncludeInput: "",
|
|
25
|
+
prefixExcludeInput: "",
|
|
26
|
+
suffixIncludeInput: "",
|
|
27
|
+
suffixExcludeInput: "",
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
interface OssImportTabProps {
|
|
31
|
+
selection: OssSelection;
|
|
32
|
+
onSelectionChange: (next: OssSelection) => void;
|
|
33
|
+
filter: OssImportFilterState;
|
|
34
|
+
onFilterChange: (next: OssImportFilterState) => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The "从 OSS 导入" tab body. Hosts the OSS browser, exposes the four
|
|
39
|
+
* filter knobs (prefix-include / prefix-exclude / suffix-include /
|
|
40
|
+
* suffix-exclude), and renders a small selection summary.
|
|
41
|
+
*
|
|
42
|
+
* Filters apply only to folder selections — the server recurses into a
|
|
43
|
+
* folder ossKey and applies the include / exclude globs server-side.
|
|
44
|
+
* Individually-checked files are imported as-is, bypassing filters
|
|
45
|
+
* (explicit user intent overrides any default rule). The four-field split
|
|
46
|
+
* is what masks the server's glob constraint that `*` may only appear at
|
|
47
|
+
* one anchor: `prefix*` or `*suffix` — users type the plain text, the
|
|
48
|
+
* dialog adds the `*`.
|
|
49
|
+
*/
|
|
50
|
+
export function OssImportTab({
|
|
51
|
+
selection,
|
|
52
|
+
onSelectionChange,
|
|
53
|
+
filter,
|
|
54
|
+
onFilterChange,
|
|
55
|
+
}: OssImportTabProps) {
|
|
56
|
+
const { fileKeys, folderPrefixes } = useMemo(
|
|
57
|
+
() => partitionSelection(selection),
|
|
58
|
+
[selection],
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
const hasFolderSelection = folderPrefixes.length > 0;
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<div className="space-y-3">
|
|
65
|
+
<OssBrowser selection={selection} onSelectionChange={onSelectionChange} />
|
|
66
|
+
|
|
67
|
+
<div
|
|
68
|
+
className={
|
|
69
|
+
"rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--secondary))]/30 p-3 space-y-3 " +
|
|
70
|
+
(hasFolderSelection ? "" : "opacity-60")
|
|
71
|
+
}
|
|
72
|
+
aria-disabled={!hasFolderSelection}
|
|
73
|
+
>
|
|
74
|
+
<div className="text-xs font-medium text-foreground">
|
|
75
|
+
过滤选项
|
|
76
|
+
<span className="ml-1 font-normal text-[hsl(var(--muted-foreground))]">
|
|
77
|
+
(仅作用于「选中的文件夹」,单选文件直接导入;服务端递归子目录)
|
|
78
|
+
</span>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<div className="grid grid-cols-2 gap-3">
|
|
82
|
+
<div className="space-y-1">
|
|
83
|
+
<Label className="text-xs text-muted-foreground">前缀 包含</Label>
|
|
84
|
+
<Input
|
|
85
|
+
placeholder="archive/2026/, drafts/"
|
|
86
|
+
value={filter.prefixIncludeInput}
|
|
87
|
+
onChange={(e) =>
|
|
88
|
+
onFilterChange({ ...filter, prefixIncludeInput: e.target.value })
|
|
89
|
+
}
|
|
90
|
+
className="h-8 bg-background"
|
|
91
|
+
disabled={!hasFolderSelection}
|
|
92
|
+
/>
|
|
93
|
+
</div>
|
|
94
|
+
<div className="space-y-1">
|
|
95
|
+
<Label className="text-xs text-muted-foreground">前缀 排除</Label>
|
|
96
|
+
<Input
|
|
97
|
+
placeholder="tmp/, _archive/"
|
|
98
|
+
value={filter.prefixExcludeInput}
|
|
99
|
+
onChange={(e) =>
|
|
100
|
+
onFilterChange({ ...filter, prefixExcludeInput: e.target.value })
|
|
101
|
+
}
|
|
102
|
+
className="h-8 bg-background"
|
|
103
|
+
disabled={!hasFolderSelection}
|
|
104
|
+
/>
|
|
105
|
+
</div>
|
|
106
|
+
<div className="space-y-1">
|
|
107
|
+
<Label className="text-xs text-muted-foreground">后缀 包含</Label>
|
|
108
|
+
<Input
|
|
109
|
+
placeholder=".md, .pdf, .txt"
|
|
110
|
+
value={filter.suffixIncludeInput}
|
|
111
|
+
onChange={(e) =>
|
|
112
|
+
onFilterChange({ ...filter, suffixIncludeInput: e.target.value })
|
|
113
|
+
}
|
|
114
|
+
className="h-8 bg-background"
|
|
115
|
+
disabled={!hasFolderSelection}
|
|
116
|
+
/>
|
|
117
|
+
</div>
|
|
118
|
+
<div className="space-y-1">
|
|
119
|
+
<Label className="text-xs text-muted-foreground">后缀 排除</Label>
|
|
120
|
+
<Input
|
|
121
|
+
placeholder=".log, .tmp"
|
|
122
|
+
value={filter.suffixExcludeInput}
|
|
123
|
+
onChange={(e) =>
|
|
124
|
+
onFilterChange({ ...filter, suffixExcludeInput: e.target.value })
|
|
125
|
+
}
|
|
126
|
+
className="h-8 bg-background"
|
|
127
|
+
disabled={!hasFolderSelection}
|
|
128
|
+
/>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
{selection.length > 0 && (
|
|
134
|
+
<div className="rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--surface))] px-3 py-2 text-xs text-[hsl(var(--muted-foreground))]">
|
|
135
|
+
已选 <span className="font-medium text-foreground">{fileKeys.length}</span>{" "}
|
|
136
|
+
个文件 +{" "}
|
|
137
|
+
<span className="font-medium text-foreground">{folderPrefixes.length}</span>{" "}
|
|
138
|
+
个文件夹(文件夹由服务端递归并按上方规则过滤)
|
|
139
|
+
</div>
|
|
140
|
+
)}
|
|
141
|
+
</div>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
@@ -219,6 +219,66 @@ export function ConnectInstanceForm({
|
|
|
219
219
|
)}
|
|
220
220
|
/>
|
|
221
221
|
|
|
222
|
+
<FormField
|
|
223
|
+
control={manualForm.control}
|
|
224
|
+
name="region"
|
|
225
|
+
render={({ field }) => (
|
|
226
|
+
<FormItem>
|
|
227
|
+
<FormLabel>Region</FormLabel>
|
|
228
|
+
{regionMode === "__custom__" ? (
|
|
229
|
+
<div className="flex gap-2">
|
|
230
|
+
<FormControl>
|
|
231
|
+
<Input
|
|
232
|
+
{...field}
|
|
233
|
+
placeholder="cn-xxx"
|
|
234
|
+
disabled={busy}
|
|
235
|
+
/>
|
|
236
|
+
</FormControl>
|
|
237
|
+
<Button
|
|
238
|
+
type="button"
|
|
239
|
+
variant="outline"
|
|
240
|
+
size="sm"
|
|
241
|
+
onClick={() => {
|
|
242
|
+
setRegionMode("cn-hangzhou");
|
|
243
|
+
field.onChange("cn-hangzhou");
|
|
244
|
+
}}
|
|
245
|
+
disabled={busy}
|
|
246
|
+
>
|
|
247
|
+
使用预设
|
|
248
|
+
</Button>
|
|
249
|
+
</div>
|
|
250
|
+
) : (
|
|
251
|
+
<Select
|
|
252
|
+
value={regionMode}
|
|
253
|
+
onValueChange={(val) => {
|
|
254
|
+
setRegionMode(val);
|
|
255
|
+
if (val !== "__custom__") {
|
|
256
|
+
field.onChange(val);
|
|
257
|
+
} else {
|
|
258
|
+
field.onChange("");
|
|
259
|
+
}
|
|
260
|
+
}}
|
|
261
|
+
disabled={busy}
|
|
262
|
+
>
|
|
263
|
+
<FormControl>
|
|
264
|
+
<SelectTrigger>
|
|
265
|
+
<SelectValue />
|
|
266
|
+
</SelectTrigger>
|
|
267
|
+
</FormControl>
|
|
268
|
+
<SelectContent>
|
|
269
|
+
{REGION_OPTIONS.map((opt) => (
|
|
270
|
+
<SelectItem key={opt.value} value={opt.value}>
|
|
271
|
+
{opt.label}
|
|
272
|
+
</SelectItem>
|
|
273
|
+
))}
|
|
274
|
+
</SelectContent>
|
|
275
|
+
</Select>
|
|
276
|
+
)}
|
|
277
|
+
<FormMessage />
|
|
278
|
+
</FormItem>
|
|
279
|
+
)}
|
|
280
|
+
/>
|
|
281
|
+
|
|
222
282
|
<div className="grid gap-4 sm:grid-cols-2">
|
|
223
283
|
<FormField
|
|
224
284
|
control={manualForm.control}
|
|
@@ -341,66 +401,6 @@ export function ConnectInstanceForm({
|
|
|
341
401
|
/>
|
|
342
402
|
</div>
|
|
343
403
|
|
|
344
|
-
<FormField
|
|
345
|
-
control={manualForm.control}
|
|
346
|
-
name="region"
|
|
347
|
-
render={({ field }) => (
|
|
348
|
-
<FormItem>
|
|
349
|
-
<FormLabel>Region</FormLabel>
|
|
350
|
-
{regionMode === "__custom__" ? (
|
|
351
|
-
<div className="flex gap-2">
|
|
352
|
-
<FormControl>
|
|
353
|
-
<Input
|
|
354
|
-
{...field}
|
|
355
|
-
placeholder="cn-xxx"
|
|
356
|
-
disabled={busy}
|
|
357
|
-
/>
|
|
358
|
-
</FormControl>
|
|
359
|
-
<Button
|
|
360
|
-
type="button"
|
|
361
|
-
variant="outline"
|
|
362
|
-
size="sm"
|
|
363
|
-
onClick={() => {
|
|
364
|
-
setRegionMode("cn-hangzhou");
|
|
365
|
-
field.onChange("cn-hangzhou");
|
|
366
|
-
}}
|
|
367
|
-
disabled={busy}
|
|
368
|
-
>
|
|
369
|
-
使用预设
|
|
370
|
-
</Button>
|
|
371
|
-
</div>
|
|
372
|
-
) : (
|
|
373
|
-
<Select
|
|
374
|
-
value={regionMode}
|
|
375
|
-
onValueChange={(val) => {
|
|
376
|
-
setRegionMode(val);
|
|
377
|
-
if (val !== "__custom__") {
|
|
378
|
-
field.onChange(val);
|
|
379
|
-
} else {
|
|
380
|
-
field.onChange("");
|
|
381
|
-
}
|
|
382
|
-
}}
|
|
383
|
-
disabled={busy}
|
|
384
|
-
>
|
|
385
|
-
<FormControl>
|
|
386
|
-
<SelectTrigger>
|
|
387
|
-
<SelectValue />
|
|
388
|
-
</SelectTrigger>
|
|
389
|
-
</FormControl>
|
|
390
|
-
<SelectContent>
|
|
391
|
-
{REGION_OPTIONS.map((opt) => (
|
|
392
|
-
<SelectItem key={opt.value} value={opt.value}>
|
|
393
|
-
{opt.label}
|
|
394
|
-
</SelectItem>
|
|
395
|
-
))}
|
|
396
|
-
</SelectContent>
|
|
397
|
-
</Select>
|
|
398
|
-
)}
|
|
399
|
-
<FormMessage />
|
|
400
|
-
</FormItem>
|
|
401
|
-
)}
|
|
402
|
-
/>
|
|
403
|
-
|
|
404
404
|
<div className="flex justify-end pt-2">
|
|
405
405
|
<Button type="submit" disabled={busy}>
|
|
406
406
|
{busy
|
|
@@ -35,6 +35,8 @@ import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
|
|
|
35
35
|
import { TagInput } from "@/components/shared/tag-input";
|
|
36
36
|
import { MetadataForm } from "@/components/shared/metadata-form";
|
|
37
37
|
import { EmbeddingConfigForm } from "./embedding-config-form";
|
|
38
|
+
import { RetrievalResultCountField } from "./retrieval-result-count-field";
|
|
39
|
+
import { buildKnowledgeBaseRetrievalConfiguration } from "./knowledge-base-retrieval-config";
|
|
38
40
|
import { useCreateKB } from "@/hooks/use-create-kb";
|
|
39
41
|
import { createKBSchema, type CreateKBInput } from "@/schemas/knowledge-base";
|
|
40
42
|
|
|
@@ -57,6 +59,12 @@ export function KBCreateForm() {
|
|
|
57
59
|
},
|
|
58
60
|
retrievalConfiguration: {
|
|
59
61
|
searchType: ["DENSE_VECTOR", "FULL_TEXT"],
|
|
62
|
+
denseVectorSearchConfiguration: {
|
|
63
|
+
numberOfResults: 20,
|
|
64
|
+
},
|
|
65
|
+
fullTextSearchConfiguration: {
|
|
66
|
+
numberOfResults: 20,
|
|
67
|
+
},
|
|
60
68
|
rerankingConfiguration: {
|
|
61
69
|
type: "WEIGHT",
|
|
62
70
|
numberOfResults: 20,
|
|
@@ -93,16 +101,7 @@ export function KBCreateForm() {
|
|
|
93
101
|
const request: Parameters<typeof createKB.mutateAsync>[0] = {
|
|
94
102
|
...values,
|
|
95
103
|
retrievalConfiguration: values.retrievalConfiguration
|
|
96
|
-
?
|
|
97
|
-
...values.retrievalConfiguration,
|
|
98
|
-
rerankingConfiguration: values.retrievalConfiguration.rerankingConfiguration
|
|
99
|
-
? {
|
|
100
|
-
...values.retrievalConfiguration.rerankingConfiguration,
|
|
101
|
-
numberOfResults:
|
|
102
|
-
values.retrievalConfiguration.rerankingConfiguration.numberOfResults ?? 20,
|
|
103
|
-
}
|
|
104
|
-
: undefined,
|
|
105
|
-
}
|
|
104
|
+
? buildKnowledgeBaseRetrievalConfiguration(values.retrievalConfiguration)
|
|
106
105
|
: undefined,
|
|
107
106
|
};
|
|
108
107
|
await createKB.mutateAsync(request);
|
|
@@ -278,31 +277,49 @@ export function KBCreateForm() {
|
|
|
278
277
|
)}
|
|
279
278
|
/>
|
|
280
279
|
|
|
281
|
-
<
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
280
|
+
<div className="space-y-3">
|
|
281
|
+
<div className="space-y-1">
|
|
282
|
+
<p className="text-sm font-medium text-[hsl(var(--foreground))]">
|
|
283
|
+
返回数量
|
|
284
|
+
</p>
|
|
285
|
+
<p className="text-xs text-[hsl(var(--muted-foreground))]">
|
|
286
|
+
控制每路召回参与排序的候选数,以及 Rerank 后实际返回的片段数。
|
|
287
|
+
</p>
|
|
288
|
+
</div>
|
|
289
|
+
<div className="grid grid-cols-[repeat(auto-fit,minmax(min(260px,100%),1fr))] gap-3">
|
|
290
|
+
<RetrievalResultCountField
|
|
291
|
+
control={form.control}
|
|
292
|
+
name="retrievalConfiguration.denseVectorSearchConfiguration.numberOfResults"
|
|
293
|
+
label="向量召回数"
|
|
294
|
+
description="向量检索参与后续排序的候选片段数。"
|
|
295
|
+
max={100}
|
|
296
|
+
muted={
|
|
297
|
+
!form
|
|
298
|
+
.watch("retrievalConfiguration.searchType")
|
|
299
|
+
?.includes("DENSE_VECTOR")
|
|
300
|
+
}
|
|
301
|
+
/>
|
|
302
|
+
<RetrievalResultCountField
|
|
303
|
+
control={form.control}
|
|
304
|
+
name="retrievalConfiguration.fullTextSearchConfiguration.numberOfResults"
|
|
305
|
+
label="全文召回数"
|
|
306
|
+
description="全文检索参与后续排序的候选片段数。"
|
|
307
|
+
max={100}
|
|
308
|
+
muted={
|
|
309
|
+
!form
|
|
310
|
+
.watch("retrievalConfiguration.searchType")
|
|
311
|
+
?.includes("FULL_TEXT")
|
|
312
|
+
}
|
|
313
|
+
/>
|
|
314
|
+
</div>
|
|
315
|
+
<RetrievalResultCountField
|
|
316
|
+
control={form.control}
|
|
317
|
+
name="retrievalConfiguration.rerankingConfiguration.numberOfResults"
|
|
318
|
+
label="重排序返回数"
|
|
319
|
+
description="Rerank 后保留并返回的片段数。"
|
|
320
|
+
max={200}
|
|
321
|
+
/>
|
|
322
|
+
</div>
|
|
306
323
|
|
|
307
324
|
<FormField
|
|
308
325
|
control={form.control}
|