@tablestore/tablestore-agent-cli 0.1.8 → 0.2.0
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/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +173 -4
- package/dist/commands/dashboard.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 +2 -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/required-server-files.json +2 -0
- package/dist/dashboard-runtime/dashboard/.next/routes-manifest.json +12 -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 +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/documents/page/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/documents/page.js +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +4 -4
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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/react-loadable-manifest.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/requests/page.js +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.rsc +20 -19
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +20 -19
- 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 -9
- 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 +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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route_client-reference-manifest.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/runtime/context/route/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route_client-reference-manifest.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.rsc +19 -18
- 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 +19 -18
- 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 -9
- 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 +1 -1
- 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 +23 -22
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_full.segment.rsc +23 -22
- 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 -9
- 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.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/page.js.nft.json +1 -1
- 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 +2 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0n~ec7s.js +6 -6
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.gylau._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.hvkwy._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.qtdn4._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__02p1x3t._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04dd04u._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04ujbw-._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04zbudf._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__05eryp~._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__06fva9g._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0byveuc._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0cee_lo._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0cyd2qb._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ecs-9r._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ejcow5._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0fglxiw._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0i1_p1s._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/{[root-of-the-server]__0f990w9._.js → [root-of-the-server]__0lvi0g-._.js} +14 -12
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0no9qm0._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0q9fgt6._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0rx9hon._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0w_ig2a._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0zmo~nd._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__11s_zx6._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__11wq90l._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__126srko._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12e1t6o._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12ylr4n._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__13g_f9w._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__13~-fxp._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/dashboard__next-internal_server_app_api_v1_logs_client_route_actions_0tnhyc7.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/dashboard__next-internal_server_app_api_v1_runtime_context_route_actions_0d9d6g_.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/0p91_next_dist_shared_lib_deployment-id_0uu7yq4.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[externals]__0tqph4u._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0aqzu8w._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0id.4_g._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0jb9ccl._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0jhpb-b._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0p7j-9i._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__10rkv6z._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0.1szyw._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_01-2v37._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0251rsp._.js +7 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_038vjn1._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_03cxnik._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_04f2u4t._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06tznmj._.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/_09y~hs8._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0_ow0x1._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ddbh97._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0f4u0.1._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0fj8l5g._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0hnw-ok._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0j-q~ro._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0jghj2_._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0l~-9i0._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0mtqe24._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0n4gd_6._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0o665bf._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0q748rf._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0t373jc._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0tej2s.._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0u4elhp._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0vtm7dh._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0xdioxg._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_12guzbo._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_12r9c8h._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_00ofp7q._.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_0jns2ew._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0o9jhcn._.js +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0xf3ffa._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0y49vhd._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_10dsqx~._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_knowledge-base_create_page_tsx_0916~g-._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_settings_page_tsx_0y26.xu._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_units_page_tsx_0.6xnei._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_error_tsx_01x7ppm._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_0ls1exu._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_0ugdjlb._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_shared_relative-time_tsx_0b7s9rc._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_ui_dropdown-menu_tsx_0c~d-fd._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_ui_select_tsx_0ys.i47._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_providers_runtime-context-provider_tsx_0wmj66z._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_00arje5._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0ld4qfm._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_125b4co._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/functions-config-manifest.json +28 -1
- package/dist/dashboard-runtime/dashboard/.next/server/middleware-build-manifest.js +5 -5
- package/dist/dashboard-runtime/dashboard/.next/server/pages/404.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/pages/500.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-2yqm.ft6yzy.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-ov0wxgu5b65.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0.2e8ciiogw04.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/00-qnlax_4630.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/034uozc1ki09_.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/03zdsc.dicedw.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/069zf4m5f.se2.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/08e9vvmr~0bqr.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/08i99xsvs8o5s.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/08tdws.ontiw1.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0azwigiwuhh08.css +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0b54rtt1-cxht.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0bpginsuceywq.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0h7d69g2fdgs6.js → 0cdo38.8y_jr2.js} +6 -6
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0cto67_iw~p9z.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0cy.fvgx7dgqx.js +4 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0fa.nak91jfo-.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{07q4gw5gnh3.d.js → 0fagnytrt.3oe.js} +2 -2
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0fv6q06wgazh_.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0g9y74cipd10n.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ga6neugwmh.1.js +5 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{123yjh849.vzp.js → 0gjljpk5qgdmz.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0h77.bqx5ltem.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ix_suxk3spjj.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k-x6_7dhqb~c.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0lrw.bnws62y9.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0mea2ylxe.umh.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{01k-.wkndubwy.js → 0n42fh.zwyk35.js} +6 -6
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0dqag6qsw7xv8.js → 0px2r0l_3kp2t.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0q6lk_p74rti7.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0t0yqi68~eil6.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0td9nhfbpbmyt.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0th7u6qvdy3x2.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u39cc6mmeqb3.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u6_s-0w8.yr..js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0uay29z9qqouw.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v0e.nl_9fjba.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0wd0_x8u.jzur.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0wf-nssu2qd_2.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x7pw1zo7nxno.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~kfzxrhgbkaz.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{05_578ka0ga8d.js → 12pz6ag1s~te_.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/15bzqpm440jvz.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{turbopack-0jhqjurvu9x3y.js → turbopack-0ybyy.9-.w~ub.js} +1 -1
- package/dist/dashboard-runtime/dashboard/components.json +20 -0
- package/dist/dashboard-runtime/dashboard/instrumentation-node.ts +14 -0
- package/dist/dashboard-runtime/dashboard/instrumentation.ts +18 -0
- package/dist/dashboard-runtime/dashboard/next.config.ts +56 -0
- package/dist/dashboard-runtime/dashboard/postcss.config.mjs +8 -0
- package/dist/dashboard-runtime/dashboard/server.js +1 -1
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/chat/error.tsx +44 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/chat/loading.tsx +29 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/chat/page.tsx +373 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/error.tsx +69 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/documents/documents-client.tsx +22 -12
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/layout-client.tsx +191 -40
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/qa/page.tsx +23 -20
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/retrieval/retrieval-client.tsx +8 -7
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/layout.tsx +68 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/loading.tsx +26 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/layout.tsx +168 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/messages/_helpers.ts +109 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/messages/page.tsx +309 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/page.tsx +26 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/requests/_helpers.ts +234 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/requests/page.tsx +323 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/search/page.tsx +56 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/settings/page.tsx +71 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/units/page.tsx +277 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/create/page.tsx +30 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/error.tsx +44 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/loading.tsx +26 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/page.tsx +27 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/projects/error.tsx +43 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/projects/loading.tsx +25 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/projects/page.tsx +174 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/auth/status/route.ts +53 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/auth/token/route.ts +113 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/instances/[name]/route.ts +196 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/instances/[name]/token/route.ts +80 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/instances/[name]/use/route.ts +91 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/instances/route.ts +274 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/chunks/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/documents/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/documents/upload/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/retrieve/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/route.ts +455 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/providers/[id]/models/route.ts +46 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/providers/[id]/route.ts +83 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/providers/[id]/test/route.ts +40 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/providers/route.ts +70 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/logs/client/route.ts +70 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/_scope.ts +84 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/messages/route.ts +64 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/requests/route.ts +65 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/route.ts +78 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/search/route.ts +49 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/units/[memoryId]/route.ts +126 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/units/route.ts +85 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/route.ts +60 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/runtime/context/route.ts +26 -0
- package/dist/dashboard-runtime/dashboard/src/app/error.tsx +84 -0
- package/dist/dashboard-runtime/dashboard/src/app/globals.css +282 -0
- package/dist/dashboard-runtime/dashboard/src/app/layout.tsx +38 -0
- package/dist/dashboard-runtime/dashboard/src/app/not-found.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/app/onboarding/error.tsx +54 -0
- package/dist/dashboard-runtime/dashboard/src/app/onboarding/layout.tsx +18 -0
- package/dist/dashboard-runtime/dashboard/src/app/onboarding/page.tsx +62 -0
- package/dist/dashboard-runtime/dashboard/src/app/page.tsx +10 -0
- package/dist/dashboard-runtime/dashboard/src/components/chat/add-mount-row.tsx +48 -39
- package/dist/dashboard-runtime/dashboard/src/components/documents/doc-chunks-dialog.tsx +62 -29
- package/dist/dashboard-runtime/dashboard/src/components/documents/doc-columns.tsx +57 -46
- package/dist/dashboard-runtime/dashboard/src/components/documents/doc-table.tsx +2 -4
- package/dist/dashboard-runtime/dashboard/src/components/documents/doc-toolbar.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/components/documents/doc-upload-dialog.tsx +66 -3
- package/dist/dashboard-runtime/dashboard/src/components/instance/connect-instance-form.tsx +10 -2
- package/dist/dashboard-runtime/dashboard/src/components/instance/edit-instance-dialog.tsx +6 -2
- package/dist/dashboard-runtime/dashboard/src/components/instance/project-card.tsx +195 -0
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-list.tsx +6 -1
- package/dist/dashboard-runtime/dashboard/src/components/layout/detail-sidebar.tsx +331 -0
- package/dist/dashboard-runtime/dashboard/src/components/layout/help-link.tsx +58 -0
- package/dist/dashboard-runtime/dashboard/src/components/layout/page-header.tsx +130 -11
- package/dist/dashboard-runtime/dashboard/src/components/layout/sidebar-instance-card.tsx +203 -0
- package/dist/dashboard-runtime/dashboard/src/components/layout/sidebar-item.tsx +14 -11
- package/dist/dashboard-runtime/dashboard/src/components/layout/sidebar-mobile.tsx +37 -29
- package/dist/dashboard-runtime/dashboard/src/components/layout/sidebar-usage-stats.tsx +26 -0
- package/dist/dashboard-runtime/dashboard/src/components/layout/sidebar.tsx +138 -0
- package/dist/dashboard-runtime/dashboard/src/components/layout/theme-toggle.tsx +161 -41
- package/dist/dashboard-runtime/dashboard/src/components/logging/client-error-reporter.tsx +59 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-store-list.tsx +6 -1
- package/dist/dashboard-runtime/dashboard/src/components/memory/requests-histogram-chart.tsx +2 -2
- package/dist/dashboard-runtime/dashboard/src/components/qa/markdown.tsx +77 -0
- package/dist/dashboard-runtime/dashboard/src/components/qa/qa-chat-panel.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/components/retrieval/retrieval-form.tsx +100 -17
- package/dist/dashboard-runtime/dashboard/src/components/retrieval/retrieval-rerank-fields.tsx +60 -23
- package/dist/dashboard-runtime/dashboard/src/components/shared/empty-state.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/components/shared/error-state.tsx +54 -0
- package/dist/dashboard-runtime/dashboard/src/components/shared/llm-model-selector.tsx +160 -70
- package/dist/dashboard-runtime/dashboard/src/components/shared/relative-time.tsx +30 -6
- package/dist/dashboard-runtime/dashboard/src/components/ui/badge.tsx +47 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/button.tsx +58 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/card.tsx +103 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/chat-bubble.tsx +60 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/checkbox.tsx +28 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/collapsible.tsx +11 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/command.tsx +153 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/data-card.tsx +57 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/detail-section.tsx +40 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/dialog.tsx +127 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/dropdown-menu.tsx +6 -6
- package/dist/dashboard-runtime/dashboard/src/components/ui/empty-state.tsx +42 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/filter-pill.tsx +90 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/form.tsx +178 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/input.tsx +26 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/item-card.tsx +88 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/label.tsx +24 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/memory-row.tsx +63 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/mini-stat.tsx +48 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/nav-tab-bar.tsx +60 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/playground-shell.tsx +69 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/popover.tsx +34 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/result-row.tsx +37 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/scope-tag.tsx +30 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/select.tsx +163 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/separator.tsx +31 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/sheet.tsx +129 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/skeleton.tsx +49 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/slider.tsx +28 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/sonner.tsx +29 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/stat-card.tsx +58 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/switch.tsx +66 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/table.tsx +127 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/tabs.tsx +69 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/textarea.tsx +25 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/tooltip.tsx +30 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/usage-card.tsx +43 -0
- package/dist/dashboard-runtime/dashboard/src/config/navigation.ts +80 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-active-instance.ts +20 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-add-memory.ts +3 -4
- package/dist/dashboard-runtime/dashboard/src/hooks/use-chat-history.ts +212 -99
- package/dist/dashboard-runtime/dashboard/src/hooks/use-create-kb.ts +2 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-create-llm-provider.ts +2 -3
- package/dist/dashboard-runtime/dashboard/src/hooks/use-create-memory-store.ts +2 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-delete-documents.ts +10 -5
- package/dist/dashboard-runtime/dashboard/src/hooks/use-delete-kb.ts +2 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-delete-llm-provider.ts +2 -3
- package/dist/dashboard-runtime/dashboard/src/hooks/use-delete-memory-store.ts +2 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-delete-memory-unit.ts +3 -3
- package/dist/dashboard-runtime/dashboard/src/hooks/use-documents.ts +7 -5
- package/dist/dashboard-runtime/dashboard/src/hooks/use-instances.ts +38 -19
- package/dist/dashboard-runtime/dashboard/src/hooks/use-knowledge-base.ts +5 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-knowledge-bases.ts +5 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-llm-provider-models.ts +5 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-llm-provider.ts +5 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-llm-providers.ts +5 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-messages.ts +12 -6
- package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-requests.ts +12 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-store.ts +5 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-stores.ts +5 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-unit.ts +16 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-units.ts +11 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-qa-chat.ts +2 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-update-kb.ts +3 -5
- package/dist/dashboard-runtime/dashboard/src/hooks/use-update-llm-provider.ts +2 -4
- package/dist/dashboard-runtime/dashboard/src/hooks/use-update-memory-store.ts +3 -5
- package/dist/dashboard-runtime/dashboard/src/hooks/use-update-memory-unit.ts +3 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-upload-documents.ts +26 -7
- package/dist/dashboard-runtime/dashboard/src/lib/constants.ts +22 -0
- package/dist/dashboard-runtime/dashboard/src/lib/fonts.ts +9 -0
- package/dist/dashboard-runtime/dashboard/src/lib/memory.ts +69 -0
- package/dist/dashboard-runtime/dashboard/src/lib/normalize-oss-endpoint.ts +28 -0
- package/dist/dashboard-runtime/dashboard/src/lib/query-keys.ts +147 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/api-helpers.ts +193 -9
- package/dist/dashboard-runtime/dashboard/src/lib/server/chat-project-context.ts +17 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/runtime-context.ts +108 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/sdk-client.ts +250 -22
- package/dist/dashboard-runtime/dashboard/src/lib/utils.ts +15 -0
- package/dist/dashboard-runtime/dashboard/src/providers/query-provider.tsx +4 -1
- package/dist/dashboard-runtime/dashboard/src/providers/runtime-context-provider.tsx +237 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/common.ts +8 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/document.ts +28 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/instance.ts +107 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/llm-chat.ts +1 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/retrieval.ts +28 -0
- package/dist/dashboard-runtime/dashboard/src/services/api-client.ts +138 -33
- package/dist/dashboard-runtime/dashboard/src/services/auth.ts +18 -0
- package/dist/dashboard-runtime/dashboard/src/services/chunks.ts +49 -0
- package/dist/dashboard-runtime/dashboard/src/services/documents.ts +208 -0
- package/dist/dashboard-runtime/dashboard/src/services/instances.ts +71 -0
- package/dist/dashboard-runtime/dashboard/src/services/memory.ts +158 -0
- package/dist/dashboard-runtime/dashboard/src/services/retrieval.ts +16 -0
- package/dist/dashboard-runtime/dashboard/src/services/runtime-context.ts +8 -0
- package/dist/dashboard-runtime/dashboard/src/types/api.ts +18 -0
- package/dist/dashboard-runtime/dashboard/src/types/instance.ts +68 -0
- package/dist/dashboard-runtime/dashboard/src/types/llm-chat.ts +2 -0
- package/dist/dashboard-runtime/dashboard/src/types/memory.ts +106 -0
- package/dist/dashboard-runtime/dashboard/src/types/retrieval.ts +43 -0
- package/dist/dashboard-runtime/dashboard/src/types/runtime-context.ts +12 -0
- package/dist/dashboard-runtime/dashboard/tailwind.config.ts +127 -0
- package/dist/dashboard-runtime/dashboard/tsconfig.json +43 -0
- package/dist/dashboard-runtime/dashboard/vitest.config.mjs +12 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js +64 -20
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js +62 -18
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/config.d.ts +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/config.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/config.js +19 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/config.js.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/constants.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/constants.js +4 -2
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/constants.js.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/index.d.ts +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/index.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/index.js +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/index.js.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/logging.d.ts +78 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/logging.d.ts.map +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/logging.js +398 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/logging.js.map +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js +64 -20
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js +62 -18
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/config.d.ts +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/config.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/config.js +19 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/config.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/constants.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/constants.js +4 -2
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/constants.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/index.d.ts +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/index.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/index.js +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/index.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/logging.d.ts +78 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/logging.d.ts.map +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/logging.js +398 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/logging.js.map +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__03742bf._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__037l_3-._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__05pd96o._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__07jfil8._.js +0 -38
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__089jtfp._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__08w-nm2._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0_o02fk._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0b50n21._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0bfezi5._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0btp1y7._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0fqdh7c._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0g9--xh._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0gqr7to._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0h71~~8._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0l1bgu.._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0lcurm3._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0n3pam7._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0nkghp7._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0r4amj5._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0td5dey._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0tsud8x._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0wl_vik._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0x7~7nk._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0xvok7r._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0~tse9o._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12lk-nv._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12sqoa8._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0e.4_sonner_dist_index_mjs_0u2em8w._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/12df_@tanstack_react-query_build_modern_0em_ajy._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[externals]__0wijiwt._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0-kiaf5._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__09_30hi._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0kaiok7._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0l937k4._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0nwf4e.._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0-dlo4s._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_00f15bk._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_01pp~xx._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06l.12l._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_08j6p-z._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_09eom0_._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0c7wecm._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0cd.__9._.js +0 -7
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0f-may2._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0fbjpet._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0fp_nnb._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0hm68~i._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0l6jz-5._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0naqa6h._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ntv66s._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0sc0tpz._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0tyxwr3._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0u9md36._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0vzw0pw._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0z0rlpq._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_11fig8y._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_13l7w34._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0o4a.29._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0suis9l._.js +0 -9
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_10mc58z._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_knowledge-base_[name]_layout-client_tsx_05momc5._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_retrieval_02c2uck._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_00o55he._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0qdd37m._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0qzg4vh._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_11mc1z9._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-mr2-dyb-szq.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-xqk6wfme5fu.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0.yj.t1hbwkg4.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/00.fyg_t3xjc~.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0003a8l0skc88.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/00m4164p4ip7m.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/02b1c4t1dy1ri.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/06v~rjrrn4ugo.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07iqor2nl~iqc.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07r22x5uhjxjb.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07v08gtfpo2yk.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07xvdo2w9s4~p.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0cbu3udngtx-v.js +0 -4
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0gkonvtvjhg-p.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0hpoawl1bb10g.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0iv0g360z0ja5.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jf4ytf.izmzh.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0m2p301.a174k.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0m42mmyxmgn-i.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0odz1whf-ozqn.css +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0osozgwmk692r.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ouxv_2qvf6.9.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0rbkgj._oqsb3.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0rywhgbu_16tm.js +0 -5
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0r~6kt_pkm4di.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0sg6z8.ci0l2b.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u6u.649ou67b.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0vf7~eysvh9bq.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0wmaq.ay~r2sn.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0xb0_9t-vmo6e.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0yp_2ea75d19v.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/11cizim1aug~b.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/13-2ei295hl0-.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/14-39g6hwhcgn.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/17m1wc_o0.5iz.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/1864_5-9a61tw.js +0 -1
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-header.tsx +0 -91
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-tab-nav.tsx +0 -62
- package/dist/dashboard-runtime/dashboard/src/components/layout/breadcrumb-bar.tsx +0 -115
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-header.tsx +0 -46
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-tab-nav.tsx +0 -54
- /package/dist/dashboard-runtime/dashboard/.next/static/{BGnMIk4OPjFx_qvLFMTBc → uYteIiFtKdPhUhmILps5X}/_buildManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{BGnMIk4OPjFx_qvLFMTBc → uYteIiFtKdPhUhmILps5X}/_clientMiddlewareManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{BGnMIk4OPjFx_qvLFMTBc → uYteIiFtKdPhUhmILps5X}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,45123,e=>{"use strict";var t=e.i(44501),s=e.i(17635),r=e.i(76490);let n=s.forwardRef(({className:e,...s},n)=>(0,t.jsx)("textarea",{className:(0,r.cn)("flex min-h-[64px] w-full rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-3 py-2 text-sm transition-colors","placeholder:text-[hsl(var(--subtle))]","focus-visible:outline-none focus-visible:border-[hsl(var(--primary))] focus-visible:ring-2 focus-visible:ring-[hsl(var(--primary)/0.2)] focus-visible:ring-offset-0","disabled:cursor-not-allowed disabled:bg-[hsl(var(--secondary))] disabled:text-[hsl(var(--muted-foreground))]",e),ref:n,...s}));n.displayName="Textarea",e.s(["Textarea",0,n])},64204,e=>{"use strict";var t=e.i(93321);function s(e,t){let s=new URLSearchParams;return s.set("appId",e.appId),e.tenantId&&s.set("tenantId",e.tenantId),e.agentId&&s.set("agentId",e.agentId),e.runId&&s.set("runId",e.runId),Object.entries(t??{}).forEach(([e,t])=>{void 0!==t&&""!==t&&s.set(e,String(t))}),s.toString()}async function r(){return(0,t.apiGet)("/api/v1/memory/stores")}async function n(e){return(0,t.apiGet)(`/api/v1/memory/stores/${encodeURIComponent(e)}`)}async function a(e){await (0,t.apiPost)("/api/v1/memory/stores",e)}async function o(e){let{memoryStoreName:s,...r}=e;await (0,t.apiPut)(`/api/v1/memory/stores/${encodeURIComponent(s)}`,r)}async function i(e){await (0,t.apiDelete)(`/api/v1/memory/stores/${encodeURIComponent(e)}`)}async function l(e,r,n){let a=s(r,n);return(0,t.apiGet)(`/api/v1/memory/stores/${encodeURIComponent(e)}/units?${a}`)}async function c(e){let{memoryStoreName:s,...r}=e;return(0,t.apiPost)(`/api/v1/memory/stores/${encodeURIComponent(s)}/units`,r)}async function d(e){let r=s(e.scope);return(0,t.apiGet)(`/api/v1/memory/stores/${encodeURIComponent(e.memoryStoreName)}/units/${encodeURIComponent(e.memoryId)}?${r}`)}async function u(e){let{memoryStoreName:s,memoryId:r,...n}=e;return(0,t.apiPut)(`/api/v1/memory/stores/${encodeURIComponent(s)}/units/${encodeURIComponent(r)}`,n)}async function m(e){let{memoryStoreName:s,memoryId:r,...n}=e;await (0,t.apiDelete)(`/api/v1/memory/stores/${encodeURIComponent(s)}/units/${encodeURIComponent(r)}`,n)}async function p(e){let{memoryStoreName:s,...r}=e;return(0,t.apiPost)(`/api/v1/memory/stores/${encodeURIComponent(s)}/search`,r)}async function h(e,r,n){let a=s(r,n);return(0,t.apiGet)(`/api/v1/memory/stores/${encodeURIComponent(e)}/messages?${a}`)}async function x(e,r,n){let a=s(r,n);return(0,t.apiGet)(`/api/v1/memory/stores/${encodeURIComponent(e)}/requests?${a}`)}e.s(["addMemory",0,c,"createMemoryStore",0,a,"deleteMemoryStore",0,i,"deleteMemoryUnit",0,m,"describeMemoryStore",0,n,"getMemoryUnit",0,d,"listMemoryMessages",0,h,"listMemoryRequests",0,x,"listMemoryStores",0,r,"listMemoryUnits",0,l,"searchMemory",0,p,"updateMemoryStore",0,o,"updateMemoryUnit",0,u])},26232,e=>{"use strict";let t=(0,e.i(86620).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["Zap",0,t],26232)},77163,e=>{"use strict";let t=(0,e.i(86620).default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);e.s(["Database",0,t],77163)},68432,e=>{"use strict";let t=(0,e.i(86620).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],68432)},34752,e=>{"use strict";let t=(0,e.i(86620).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",0,t],34752)},47932,e=>{"use strict";var t=e.i(43876),s=e.i(58770),r=e.i(47570),n=e.i(7166);e.s(["useKnowledgeBases",0,function(){let{context:e,ready:a}=(0,n.useRuntimeContext)();return(0,t.useQuery)({queryKey:r.queryKeys.knowledgeBases(e.dataScopeKey),queryFn:s.listKnowledgeBases,enabled:a,staleTime:3e4})}])},37769,e=>{"use strict";let t=(0,e.i(86620).default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);e.s(["MessageSquare",0,t],37769)},83389,e=>{"use strict";var t=e.i(17635);let s="sidebar.collapsed",r="sidebar-collapsed-change",n=null;function a(){if(null!==n)return n;try{n="1"===window.localStorage.getItem(s)}catch{n=!1}return n}function o(e){let t=t=>{n=!!t.detail,e()},a=t=>{t.key===s&&(n="1"===t.newValue,e())};return window.addEventListener(r,t),window.addEventListener("storage",a),()=>{window.removeEventListener(r,t),window.removeEventListener("storage",a)}}function i(){return a()}function l(){return!1}e.s(["useSidebarCollapsed",0,function(){let e=(0,t.useSyncExternalStore)(o,i,l),c=(0,t.useCallback)(e=>{n=e;try{window.localStorage.setItem(s,e?"1":"0")}catch{}window.dispatchEvent(new CustomEvent(r,{detail:e}))},[]),d=(0,t.useCallback)(()=>{c(!a())},[c]);return{collapsed:e,setCollapsed:c,toggle:d}}])},18722,e=>{"use strict";let t=(0,e.i(86620).default)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]);e.s(["Brain",0,t],18722)},67225,e=>{"use strict";let t=(0,e.i(86620).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["Settings2",0,t],67225)},58770,e=>{"use strict";var t=e.i(93321);async function s(){return(0,t.apiGet)("/api/v1/knowledge-bases")}async function r(e){return(0,t.apiGet)(`/api/v1/knowledge-bases/${encodeURIComponent(e)}`)}async function n(e){await (0,t.apiPost)("/api/v1/knowledge-bases",e)}async function a(e){let{knowledgeBaseName:s,...r}=e;await (0,t.apiPut)(`/api/v1/knowledge-bases/${encodeURIComponent(s)}`,r)}async function o(e){await (0,t.apiDelete)(`/api/v1/knowledge-bases/${encodeURIComponent(e)}`)}e.s(["createKnowledgeBase",0,n,"deleteKnowledgeBase",0,o,"describeKnowledgeBase",0,r,"listKnowledgeBases",0,s,"updateKnowledgeBase",0,a])},12122,e=>{"use strict";var t=e.i(44501),s=e.i(17635),r=e.i(91967),n=e.i(67928),a=e.i(43250),o=e.i(48989),i=e.i(33616),l=e.i(38154),c=e.i(32374),d=e.i(90088),u=e.i(80939),m=e.i(52053),p=e.i(17256),h=e.i(47791),[x,f]=(0,a.createContextScope)("Tooltip",[l.createPopperScope]),g=(0,l.createPopperScope)(),v="TooltipProvider",y="tooltip.open",[b,j]=x(v),w=e=>{let{__scopeTooltip:r,delayDuration:n=700,skipDelayDuration:a=300,disableHoverableContent:o=!1,children:i}=e,l=s.useRef(!0),c=s.useRef(!1),d=s.useRef(0);return s.useEffect(()=>{let e=d.current;return()=>window.clearTimeout(e)},[]),(0,t.jsx)(b,{scope:r,isOpenDelayedRef:l,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,a)},[a]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(e=>{c.current=e},[]),disableHoverableContent:o,children:i})};w.displayName=v;var k="Tooltip",[C,N]=x(k),S=e=>{let{__scopeTooltip:r,children:n,open:a,defaultOpen:o,onOpenChange:c,disableHoverableContent:d,delayDuration:u}=e,m=j(k,e.__scopeTooltip),h=g(r),[x,f]=s.useState(null),v=(0,i.useId)(),b=s.useRef(0),w=d??m.disableHoverableContent,N=u??m.delayDuration,S=s.useRef(!1),[I,T]=(0,p.useControllableState)({prop:a,defaultProp:o??!1,onChange:e=>{e?(m.onOpen(),document.dispatchEvent(new CustomEvent(y))):m.onClose(),c?.(e)},caller:k}),M=s.useMemo(()=>I?S.current?"delayed-open":"instant-open":"closed",[I]),E=s.useCallback(()=>{window.clearTimeout(b.current),b.current=0,S.current=!1,T(!0)},[T]),F=s.useCallback(()=>{window.clearTimeout(b.current),b.current=0,T(!1)},[T]),R=s.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{S.current=!0,T(!0),b.current=0},N)},[N,T]);return s.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),(0,t.jsx)(l.Root,{...h,children:(0,t.jsx)(C,{scope:r,contentId:v,open:I,stateAttribute:M,trigger:x,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{m.isOpenDelayedRef.current?R():E()},[m.isOpenDelayedRef,R,E]),onTriggerLeave:s.useCallback(()=>{w?F():(window.clearTimeout(b.current),b.current=0)},[F,w]),onOpen:E,onClose:F,disableHoverableContent:w,children:n})})};S.displayName=k;var I="TooltipTrigger",T=s.forwardRef((e,a)=>{let{__scopeTooltip:o,...i}=e,c=N(I,o),d=j(I,o),m=g(o),p=s.useRef(null),h=(0,n.useComposedRefs)(a,p,c.onTriggerChange),x=s.useRef(!1),f=s.useRef(!1),v=s.useCallback(()=>x.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),(0,t.jsx)(l.Anchor,{asChild:!0,...m,children:(0,t.jsx)(u.Primitive.button,{"aria-describedby":c.open?c.contentId:void 0,"data-state":c.stateAttribute,...i,ref:h,onPointerMove:(0,r.composeEventHandlers)(e.onPointerMove,e=>{"touch"!==e.pointerType&&(f.current||d.isPointerInTransitRef.current||(c.onTriggerEnter(),f.current=!0))}),onPointerLeave:(0,r.composeEventHandlers)(e.onPointerLeave,()=>{c.onTriggerLeave(),f.current=!1}),onPointerDown:(0,r.composeEventHandlers)(e.onPointerDown,()=>{c.open&&c.onClose(),x.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>{x.current||c.onOpen()}),onBlur:(0,r.composeEventHandlers)(e.onBlur,c.onClose),onClick:(0,r.composeEventHandlers)(e.onClick,c.onClose)})})});T.displayName=I;var M="TooltipPortal",[E,F]=x(M,{forceMount:void 0}),R=e=>{let{__scopeTooltip:s,forceMount:r,children:n,container:a}=e,o=N(M,s);return(0,t.jsx)(E,{scope:s,forceMount:r,children:(0,t.jsx)(d.Presence,{present:r||o.open,children:(0,t.jsx)(c.Portal,{asChild:!0,container:a,children:n})})})};R.displayName=M;var K="TooltipContent",D=s.forwardRef((e,s)=>{let r=F(K,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...o}=e,i=N(K,e.__scopeTooltip);return(0,t.jsx)(d.Presence,{present:n||i.open,children:i.disableHoverableContent?(0,t.jsx)(U,{side:a,...o,ref:s}):(0,t.jsx)(P,{side:a,...o,ref:s})})}),P=s.forwardRef((e,r)=>{let a=N(K,e.__scopeTooltip),o=j(K,e.__scopeTooltip),i=s.useRef(null),l=(0,n.useComposedRefs)(r,i),[c,d]=s.useState(null),{trigger:u,onClose:m}=a,p=i.current,{onPointerInTransitChange:h}=o,x=s.useCallback(()=>{d(null),h(!1)},[h]),f=s.useCallback((e,t)=>{let s,r=e.currentTarget,n={x:e.clientX,y:e.clientY},a=function(e,t){let s=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(s,r,n,a)){case a:return"left";case n:return"right";case s:return"top";case r:return"bottom";default:throw Error("unreachable")}}(n,r.getBoundingClientRect());d(((s=[...function(e,t,s=5){let r=[];switch(t){case"top":r.push({x:e.x-s,y:e.y+s},{x:e.x+s,y:e.y+s});break;case"bottom":r.push({x:e.x-s,y:e.y-s},{x:e.x+s,y:e.y-s});break;case"left":r.push({x:e.x+s,y:e.y-s},{x:e.x+s,y:e.y+s});break;case"right":r.push({x:e.x-s,y:e.y-s},{x:e.x-s,y:e.y+s})}return r}(n,a),...function(e){let{top:t,right:s,bottom:r,left:n}=e;return[{x:n,y:t},{x:s,y:t},{x:s,y:r},{x:n,y:r}]}(t.getBoundingClientRect())].slice()).sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:1*!!(e.y>t.y)),function(e){if(e.length<=1)return e.slice();let t=[];for(let s=0;s<e.length;s++){let r=e[s];for(;t.length>=2;){let e=t[t.length-1],s=t[t.length-2];if((e.x-s.x)*(r.y-s.y)>=(e.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}t.pop();let s=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;s.length>=2;){let e=s[s.length-1],t=s[s.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))s.pop();else break}s.push(r)}return(s.pop(),1===t.length&&1===s.length&&t[0].x===s[0].x&&t[0].y===s[0].y)?t:t.concat(s)}(s))),h(!0)},[h]);return s.useEffect(()=>()=>x(),[x]),s.useEffect(()=>{if(u&&p){let e=e=>f(e,p),t=e=>f(e,u);return u.addEventListener("pointerleave",e),p.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),p.removeEventListener("pointerleave",t)}}},[u,p,f,x]),s.useEffect(()=>{if(c){let e=e=>{let t=e.target,s={x:e.clientX,y:e.clientY},r=u?.contains(t)||p?.contains(t),n=!function(e,t){let{x:s,y:r}=e,n=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],i=t[a],l=o.x,c=o.y,d=i.x,u=i.y;c>r!=u>r&&s<(d-l)*(r-c)/(u-c)+l&&(n=!n)}return n}(s,c);r?x():n&&(x(),m())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[u,p,c,m,x]),(0,t.jsx)(U,{...e,ref:l})}),[z,_]=x(k,{isInside:!1}),L=(0,m.createSlottable)("TooltipContent"),U=s.forwardRef((e,r)=>{let{__scopeTooltip:n,children:a,"aria-label":i,onEscapeKeyDown:c,onPointerDownOutside:d,...u}=e,m=N(K,n),p=g(n),{onClose:x}=m;return s.useEffect(()=>(document.addEventListener(y,x),()=>document.removeEventListener(y,x)),[x]),s.useEffect(()=>{if(m.trigger){let e=e=>{let t=e.target;t?.contains(m.trigger)&&x()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[m.trigger,x]),(0,t.jsx)(o.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:e=>e.preventDefault(),onDismiss:x,children:(0,t.jsxs)(l.Content,{"data-state":m.stateAttribute,...p,...u,ref:r,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,t.jsx)(L,{children:a}),(0,t.jsx)(z,{scope:n,isInside:!0,children:(0,t.jsx)(h.Root,{id:m.contentId,role:"tooltip",children:i||a})})]})})});D.displayName=K;var $="TooltipArrow";s.forwardRef((e,s)=>{let{__scopeTooltip:r,...n}=e,a=g(r);return _($,r).isInside?null:(0,t.jsx)(l.Arrow,{...a,...n,ref:s})}).displayName=$;var O=e.i(76490);let A=s.forwardRef(({className:e,sideOffset:s=4,...r},n)=>(0,t.jsx)(R,{children:(0,t.jsx)(D,{ref:n,sideOffset:s,className:(0,O.cn)("z-50 overflow-hidden rounded-md bg-[hsl(var(--foreground))] px-2.5 py-1 text-xs text-[hsl(var(--background))] shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...r})}));A.displayName=D.displayName,e.s(["Tooltip",0,S,"TooltipContent",0,A,"TooltipProvider",0,w,"TooltipTrigger",0,T],12122)},58204,e=>{"use strict";let t=(0,e.i(86620).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],58204)},43754,e=>{"use strict";let t=(0,e.i(86620).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["Info",0,t],43754)},42737,e=>{"use strict";let t=(0,e.i(86620).default)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["HelpCircle",0,t],42737)},97634,e=>{"use strict";let t=(0,e.i(86620).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,t],97634)},54614,e=>{"use strict";var t=e.i(43876),s=e.i(64204),r=e.i(47570),n=e.i(7166);e.s(["useMemoryStores",0,function(){let{context:e,ready:a}=(0,n.useRuntimeContext)();return(0,t.useQuery)({queryKey:r.queryKeys.memoryStores(e.dataScopeKey),queryFn:s.listMemoryStores,enabled:a,staleTime:3e4})}])},47421,e=>{"use strict";var t=e.i(44501),s=e.i(17635),r=e.i(91967),n=e.i(43250),a=e.i(77275),o=e.i(90088),i=e.i(80939),l=e.i(25486),c=e.i(17256),d=e.i(33616),u="Tabs",[m,p]=(0,n.createContextScope)(u,[a.createRovingFocusGroupScope]),h=(0,a.createRovingFocusGroupScope)(),[x,f]=m(u),g=s.forwardRef((e,s)=>{let{__scopeTabs:r,value:n,onValueChange:a,defaultValue:o,orientation:m="horizontal",dir:p,activationMode:h="automatic",...f}=e,g=(0,l.useDirection)(p),[v,y]=(0,c.useControllableState)({prop:n,onChange:a,defaultProp:o??"",caller:u});return(0,t.jsx)(x,{scope:r,baseId:(0,d.useId)(),value:v,onValueChange:y,orientation:m,dir:g,activationMode:h,children:(0,t.jsx)(i.Primitive.div,{dir:g,"data-orientation":m,...f,ref:s})})});g.displayName=u;var v="TabsList",y=s.forwardRef((e,s)=>{let{__scopeTabs:r,loop:n=!0,...o}=e,l=f(v,r),c=h(r);return(0,t.jsx)(a.Root,{asChild:!0,...c,orientation:l.orientation,dir:l.dir,loop:n,children:(0,t.jsx)(i.Primitive.div,{role:"tablist","aria-orientation":l.orientation,...o,ref:s})})});y.displayName=v;var b="TabsTrigger",j=s.forwardRef((e,s)=>{let{__scopeTabs:n,value:o,disabled:l=!1,...c}=e,d=f(b,n),u=h(n),m=C(d.baseId,o),p=N(d.baseId,o),x=o===d.value;return(0,t.jsx)(a.Item,{asChild:!0,...u,focusable:!l,active:x,children:(0,t.jsx)(i.Primitive.button,{type:"button",role:"tab","aria-selected":x,"aria-controls":p,"data-state":x?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:m,...c,ref:s,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(o)}),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(o)}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==d.activationMode;x||l||!e||d.onValueChange(o)})})})});j.displayName=b;var w="TabsContent",k=s.forwardRef((e,r)=>{let{__scopeTabs:n,value:a,forceMount:l,children:c,...d}=e,u=f(w,n),m=C(u.baseId,a),p=N(u.baseId,a),h=a===u.value,x=s.useRef(h);return s.useEffect(()=>{let e=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(o.Presence,{present:l||h,children:({present:s})=>(0,t.jsx)(i.Primitive.div,{"data-state":h?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":m,hidden:!s,id:p,tabIndex:0,...d,ref:r,style:{...e.style,animationDuration:x.current?"0s":void 0},children:s&&c})})});function C(e,t){return`${e}-trigger-${t}`}function N(e,t){return`${e}-content-${t}`}k.displayName=w;var S=e.i(76490);let I=s.forwardRef(({className:e,...s},r)=>(0,t.jsx)(y,{ref:r,className:(0,S.cn)("inline-flex h-10 items-center justify-center rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--secondary))] p-1 text-muted-foreground shadow-[inset_0_1px_2px_rgba(15,23,42,0.04)]",e),...s}));I.displayName=y.displayName;let T=s.forwardRef(({className:e,...s},r)=>(0,t.jsx)(j,{ref:r,className:(0,S.cn)("inline-flex h-8 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3.5 text-sm font-medium","ring-offset-[hsl(var(--background))] transition-all duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","hover:text-foreground","data-[state=active]:bg-[hsl(var(--background))]","data-[state=active]:text-[hsl(var(--primary))]","data-[state=active]:shadow-[0_1px_2px_rgba(15,23,42,0.08),0_0_0_1px_hsl(var(--border))]","data-[state=active]:font-semibold",e),...s}));T.displayName=j.displayName;let M=s.forwardRef(({className:e,...s},r)=>(0,t.jsx)(k,{ref:r,className:(0,S.cn)("mt-3 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...s}));M.displayName=k.displayName,e.s(["Tabs",0,g,"TabsContent",0,M,"TabsList",0,I,"TabsTrigger",0,T],47421)},53859,59387,e=>{"use strict";var t=e.i(37500),s=e.i(43876),r=e.i(12984),n=e.i(87014),a=e.i(93321);async function o(){return(0,a.apiGet)("/api/v1/instances")}async function i(e){return(0,a.apiGet)(`/api/v1/instances/${encodeURIComponent(e)}`)}async function l(e){return(0,a.apiPost)("/api/v1/instances",e)}async function c(e){return(0,a.apiPost)("/api/v1/instances",e)}async function d(e,t){return(0,a.apiPut)(`/api/v1/instances/${encodeURIComponent(e)}`,t)}async function u(e){return(0,a.apiDelete)(`/api/v1/instances/${encodeURIComponent(e)}`)}async function m(e){return(0,a.apiPost)(`/api/v1/instances/${encodeURIComponent(e)}/use`)}async function p(e){return(0,a.apiGet)(`/api/v1/instances/${encodeURIComponent(e)}/token`)}var h=e.i(47570),x=e.i(7166);function f(e){(0,h.invalidateInstanceScopedQueries)(e)}function g(e){(0,h.resetInstanceScopedQueries)(e)}function v(e){e.invalidateQueries({queryKey:h.RUNTIME_CONTEXT_QUERY_KEY})}e.s(["useConnectInstance",0,function(){let e=(0,r.useQueryClient)();return(0,t.useMutation)({mutationFn:e=>l(e),onSuccess:()=>{g(e),v(e),n.toast.success("项目已创建")},onError:e=>{n.toast.error(e instanceof Error?e.message:"创建项目失败")}})},"useDeleteInstance",0,function(){let e=(0,r.useQueryClient)();return(0,t.useMutation)({mutationFn:e=>u(e),onSuccess:()=>{f(e),v(e),n.toast.success("项目已删除")},onError:e=>{n.toast.error(e instanceof Error?e.message:"删除项目失败")}})},"useExportInstanceToken",0,function(){return(0,t.useMutation)({mutationFn:e=>p(e),onError:e=>{n.toast.error(e instanceof Error?e.message:"导出 Token 失败")}})},"useImportInstance",0,function(){let e=(0,r.useQueryClient)();return(0,t.useMutation)({mutationFn:e=>c(e),onSuccess:()=>{g(e),v(e),n.toast.success("Token 已导入")},onError:e=>{n.toast.error(e instanceof Error?e.message:"导入 Token 失败")}})},"useInstance",0,function(e){let{context:t,ready:r}=(0,x.useRuntimeContext)();return(0,s.useQuery)({queryKey:h.queryKeys.instance(t.dataScopeKey,e),queryFn:()=>i(e),enabled:r&&!!e,staleTime:3e4})},"useInstances",0,function(){let{context:e,ready:t}=(0,x.useRuntimeContext)();return(0,s.useQuery)({queryKey:h.queryKeys.instances(e.dataScopeKey),queryFn:o,enabled:t,staleTime:3e4})},"useSwitchInstance",0,function(){let e=(0,r.useQueryClient)(),{context:s}=(0,x.useRuntimeContext)();return(0,t.useMutation)({mutationFn:e=>m(e),onSuccess:({activeInstance:t})=>{(0,x.markDashboardRuntimeContextChange)(window.sessionStorage,{previousDataScopeKey:s.dataScopeKey,targetActiveInstance:t}),g(e),v(e),n.toast.success("已切换当前项目")},onError:e=>{n.toast.error(e instanceof Error?e.message:"切换项目失败")}})},"useUpdateInstance",0,function(e){let s=(0,r.useQueryClient)();return(0,t.useMutation)({mutationFn:t=>d(e,t),onSuccess:()=>{f(s),s.invalidateQueries({queryKey:["instance"]}),v(s),n.toast.success("项目已更新")},onError:e=>{n.toast.error(e instanceof Error?e.message:"更新项目失败")}})}],53859),e.s(["isImportPayload",0,function(e){return"string"==typeof e.token}],59387)},47474,e=>{"use strict";var t=e.i(44501),s=e.i(17635),r=e.i(88310),n=e.i(80883),a=e.i(43754),o=e.i(32356);let i=o.z.string().trim().regex(/^[a-z0-9-]{1,32}$/,"名称需为 1-32 位小写字母、数字或连字符").refine(e=>"default"!==e,'名称 "default" 为保留字'),l=(e,t=512)=>o.z.string().trim().min(1,`请输入${e}`).max(t),c=(e=512)=>o.z.string().trim().max(e).optional().or(o.z.literal("")),d=o.z.object({name:i,accessKeyId:l("AccessKey ID",128),accessKeySecret:l("AccessKey Secret",512),otsEndpoint:l("OTS Endpoint",256),otsInstanceName:l("OTS 实例名",128),ossEndpoint:c(256),ossBucketName:c(128),region:c(64),activate:o.z.boolean().optional()});o.z.object({accessKeyId:c(128),accessKeySecret:c(512),otsEndpoint:c(256),otsInstanceName:c(128),ossEndpoint:c(256),ossBucketName:c(128),region:c(64),activate:o.z.boolean().optional()}).refine(e=>{let t=!!(e.accessKeyId&&e.accessKeyId.length>0);return!!(e.accessKeySecret&&e.accessKeySecret.length>0)===t},{message:"AccessKey ID 与 Secret 必须成对更新,要么同时填写、要么同时留空",path:["accessKeySecret"]});let u=o.z.object({name:i,accessKeyId:c(128),accessKeySecret:c(512),otsEndpoint:l("OTS Endpoint",256),otsInstanceName:l("OTS 实例名",128),ossEndpoint:c(256),ossBucketName:c(128),region:c(64),activate:o.z.boolean().optional()}).refine(e=>{let t=!!(e.accessKeyId&&e.accessKeyId.length>0);return!!(e.accessKeySecret&&e.accessKeySecret.length>0)===t},{message:"AccessKey ID 与 Secret 必须成对更新,要么同时填写、要么同时留空",path:["accessKeySecret"]}),m=o.z.object({token:o.z.string().trim().min(10,"Token 长度不足,无法解析").max(4096),name:i.optional(),activate:o.z.boolean().optional()});var p=e.i(42595),h=e.i(21562),x=e.i(23888),f=e.i(66473),g=e.i(47421),v=e.i(45123);let y=d.extend({otsEndpoint:o.z.string().trim().url("请输入合法的 OTS Endpoint URL"),ossEndpoint:o.z.string().trim().url("请输入合法的 OSS Endpoint URL").optional().or(o.z.literal(""))}),b=m.pick({token:!0}),j=[{value:"cn-beijing",label:"华北 2(北京)"},{value:"cn-hangzhou",label:"华东 1(杭州)"},{value:"cn-shanghai",label:"华东 2(上海)"},{value:"cn-shenzhen",label:"华南 1(深圳)"},{value:"__custom__",label:"其它(自定义)"}];e.s(["ConnectInstanceForm",0,function({mode:e,defaultValues:o,accessKeyIdPlaceholder:i,accessKeySecretPlaceholder:l,onSubmit:c,busy:d,lockName:m,submitLabel:w}){let[k,C]=(0,s.useState)("manual"),N="edit"===e,S=o?.region??"cn-hangzhou",I=(0,s.useMemo)(()=>j.some(e=>e.value===S),[S]),[T,M]=(0,s.useState)(I?S:"__custom__"),E=(0,s.useMemo)(()=>(0,r.zodResolver)(N?u:y),[N]),F=(0,n.useForm)({resolver:E,defaultValues:{name:o?.name??"",accessKeyId:N?"":o?.accessKeyId??"",accessKeySecret:N?"":o?.accessKeySecret??"",otsEndpoint:o?.otsEndpoint??"",otsInstanceName:o?.otsInstanceName??"",ossEndpoint:o?.ossEndpoint??"",ossBucketName:o?.ossBucketName??"",region:S}}),R=(0,n.useForm)({resolver:(0,r.zodResolver)(b),defaultValues:{token:""}});async function K(e){let t=e.ossEndpoint?.trim()||void 0,s=e.ossBucketName?.trim()||void 0;t&&s&&(t=function(e,t){try{let s=new URL(e);if(s.hostname.startsWith(`${t}.`))return s.hostname=s.hostname.slice(t.length+1),s.toString().replace(/\/$/,"")}catch{}return e}(t,s));let r={...e,ossEndpoint:t,ossBucketName:s};await c(r)}async function D(e){let t={token:e.token.trim()};await c(t)}let P="create"===e;return(0,t.jsxs)(g.Tabs,{value:k,onValueChange:e=>C(e),className:"w-full",children:[P&&(0,t.jsxs)(g.TabsList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(g.TabsTrigger,{value:"manual",children:"手动填写"}),(0,t.jsx)(g.TabsTrigger,{value:"token",children:"导入 Token"})]}),(0,t.jsx)(g.TabsContent,{value:"manual",className:"mt-4",children:(0,t.jsx)(h.Form,{...F,children:(0,t.jsxs)("form",{onSubmit:F.handleSubmit(K),className:"space-y-4",children:[(0,t.jsx)(h.FormField,{control:F.control,name:"name",render:({field:e})=>(0,t.jsxs)(h.FormItem,{children:[(0,t.jsx)(h.FormLabel,{children:"项目名称"}),(0,t.jsx)(h.FormControl,{children:(0,t.jsx)(x.Input,{...e,placeholder:"prod-main",disabled:m||d,autoComplete:"off"})}),(0,t.jsx)(h.FormDescription,{children:"仅用于本地区分,不会发送到服务端。"}),(0,t.jsx)(h.FormMessage,{})]})}),(0,t.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,t.jsx)(h.FormField,{control:F.control,name:"accessKeyId",render:({field:e})=>(0,t.jsxs)(h.FormItem,{children:[(0,t.jsx)(h.FormLabel,{children:"AccessKey ID"}),(0,t.jsx)(h.FormControl,{children:(0,t.jsx)(x.Input,{...e,autoComplete:"off",disabled:d,placeholder:N&&i?`${i} \xb7 留空表示保留`:void 0})}),N&&(0,t.jsx)(h.FormDescription,{children:"AK 与 SK 必须成对更新,留空则保留现有凭证。"}),(0,t.jsx)(h.FormMessage,{})]})}),(0,t.jsx)(h.FormField,{control:F.control,name:"accessKeySecret",render:({field:e})=>(0,t.jsxs)(h.FormItem,{children:[(0,t.jsx)(h.FormLabel,{children:"AccessKey Secret"}),(0,t.jsx)(h.FormControl,{children:(0,t.jsx)(x.Input,{...e,type:"password",autoComplete:"new-password",disabled:d})}),(0,t.jsx)(h.FormMessage,{})]})})]}),(0,t.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,t.jsx)(h.FormField,{control:F.control,name:"otsEndpoint",render:({field:e})=>(0,t.jsxs)(h.FormItem,{children:[(0,t.jsx)(h.FormLabel,{children:"OTS Endpoint"}),(0,t.jsx)(h.FormControl,{children:(0,t.jsx)(x.Input,{...e,placeholder:"https://xxx.cn-hangzhou.ots.aliyuncs.com",disabled:d})}),(0,t.jsx)(h.FormMessage,{})]})}),(0,t.jsx)(h.FormField,{control:F.control,name:"otsInstanceName",render:({field:e})=>(0,t.jsxs)(h.FormItem,{children:[(0,t.jsx)(h.FormLabel,{children:"OTS 实例名"}),(0,t.jsx)(h.FormControl,{children:(0,t.jsx)(x.Input,{...e,disabled:d})}),(0,t.jsx)(h.FormMessage,{})]})})]}),(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.4)] px-3 py-2 text-xs text-[hsl(var(--muted-foreground))]",children:[(0,t.jsx)(a.Info,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-[hsl(var(--primary))]"}),(0,t.jsx)("span",{children:"OSS 信息为可选项。若需上传文档到知识库,OSS Endpoint 与 Bucket 必填; 留空则项目只能用于查询与检索,文件上传功能将不可用。"})]}),(0,t.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,t.jsx)(h.FormField,{control:F.control,name:"ossEndpoint",render:({field:e})=>(0,t.jsxs)(h.FormItem,{children:[(0,t.jsx)(h.FormLabel,{children:"OSS Endpoint(可选)"}),(0,t.jsx)(h.FormControl,{children:(0,t.jsx)(x.Input,{...e,placeholder:"https://oss-cn-hangzhou.aliyuncs.com",disabled:d})}),(0,t.jsx)(h.FormMessage,{})]})}),(0,t.jsx)(h.FormField,{control:F.control,name:"ossBucketName",render:({field:e})=>(0,t.jsxs)(h.FormItem,{children:[(0,t.jsx)(h.FormLabel,{children:"OSS Bucket(可选)"}),(0,t.jsx)(h.FormControl,{children:(0,t.jsx)(x.Input,{...e,disabled:d})}),(0,t.jsx)(h.FormMessage,{})]})})]}),(0,t.jsx)(h.FormField,{control:F.control,name:"region",render:({field:e})=>(0,t.jsxs)(h.FormItem,{children:[(0,t.jsx)(h.FormLabel,{children:"Region"}),"__custom__"===T?(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(h.FormControl,{children:(0,t.jsx)(x.Input,{...e,placeholder:"cn-xxx",disabled:d})}),(0,t.jsx)(p.Button,{type:"button",variant:"outline",size:"sm",onClick:()=>{M("cn-hangzhou"),e.onChange("cn-hangzhou")},disabled:d,children:"使用预设"})]}):(0,t.jsxs)(f.Select,{value:T,onValueChange:t=>{M(t),"__custom__"!==t?e.onChange(t):e.onChange("")},disabled:d,children:[(0,t.jsx)(h.FormControl,{children:(0,t.jsx)(f.SelectTrigger,{children:(0,t.jsx)(f.SelectValue,{})})}),(0,t.jsx)(f.SelectContent,{children:j.map(e=>(0,t.jsx)(f.SelectItem,{value:e.value,children:e.label},e.value))})]}),(0,t.jsx)(h.FormMessage,{})]})}),(0,t.jsx)("div",{className:"flex justify-end pt-2",children:(0,t.jsx)(p.Button,{type:"submit",disabled:d,children:d?"提交中...":w??("edit"===e?"保存":"创建项目")})})]})})}),P&&(0,t.jsx)(g.TabsContent,{value:"token",className:"mt-4",children:(0,t.jsx)(h.Form,{...R,children:(0,t.jsxs)("form",{onSubmit:R.handleSubmit(D),className:"space-y-4",children:[(0,t.jsx)(h.FormField,{control:R.control,name:"token",render:({field:e})=>(0,t.jsxs)(h.FormItem,{children:[(0,t.jsx)(h.FormLabel,{children:"项目 Token"}),(0,t.jsx)(h.FormControl,{children:(0,t.jsx)(v.Textarea,{...e,rows:5,placeholder:"粘贴从其他环境导出的项目 Token",disabled:d})}),(0,t.jsx)(h.FormDescription,{children:"Token 中已包含 AK/SK、Endpoint 等全部连接信息。"}),(0,t.jsx)(h.FormMessage,{})]})}),(0,t.jsx)("div",{className:"flex justify-end pt-2",children:(0,t.jsx)(p.Button,{type:"submit",disabled:d,children:d?"导入中...":"导入并连接"})})]})})})]})}],47474)},68184,e=>{"use strict";var t=e.i(44501),s=e.i(33253),r=e.i(53859),n=e.i(59387),a=e.i(47474);e.s(["ConnectInstanceDialog",0,function({open:e,onOpenChange:o,onSuccess:i}){let l=(0,r.useConnectInstance)(),c=(0,r.useImportInstance)(),d=l.isPending||c.isPending;async function u(e){let t=(0,n.isImportPayload)(e)?await c.mutateAsync(e):await l.mutateAsync(e);i?.(t),o(!1)}return(0,t.jsx)(s.Dialog,{open:e,onOpenChange:o,children:(0,t.jsxs)(s.DialogContent,{className:"max-w-xl",children:[(0,t.jsxs)(s.DialogHeader,{children:[(0,t.jsx)(s.DialogTitle,{children:"创建新项目"}),(0,t.jsx)(s.DialogDescription,{children:"填写项目的连接凭证,或粘贴已有的项目 Token。"})]}),(0,t.jsx)(a.ConnectInstanceForm,{mode:"create",onSubmit:u,busy:d})]})})}])},91850,94767,44698,96809,41026,88140,e=>{"use strict";var t=e.i(18722),s=e.i(77163),r=e.i(86620);let n=(0,r.default)("folder-kanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);var a=e.i(37769),o=e.i(34752);let i=[{title:"对话",items:[{title:"对话智能体",href:"/chat",icon:a.MessageSquare}]},{title:"知识库",items:[{title:"知识库管理",href:"/knowledge-base",icon:s.Database}]},{title:"记忆库",items:[{title:"记忆库管理",href:"/memory",icon:t.Brain}]},{title:"配置",items:[{title:"模型提供商",href:"/llm-providers",icon:o.Sparkles},{title:"项目管理",href:"/projects",icon:n}]}];i.flatMap(e=>e.items),e.s(["sidebarGroups",0,i],91850);var l=e.i(44501),c=e.i(70978),d=e.i(65581);let u=(0,r.default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);var m=e.i(76490),p=e.i(12122);e.s(["SidebarItem",0,function({item:e,collapsed:t=!1}){let s=(0,d.usePathname)(),r=e.icon,n=!!e.href&&(s===e.href||s?.startsWith(`${e.href}/`)),a=e.comingSoon||!e.href,o=(0,l.jsxs)("span",{className:(0,m.cn)("group relative flex items-center font-medium transition-colors duration-150",t?"mx-auto h-8 w-8 justify-center rounded-md text-[14px]":"h-9 gap-2.5 rounded-md px-3 text-[14px]",n?"bg-[hsl(var(--sidebar-active-bg))] text-[hsl(var(--sidebar-active-fg))]":"text-[hsl(var(--sidebar-text))] hover:bg-[hsl(var(--background))] hover:text-[hsl(var(--foreground))]",a&&"cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[hsl(var(--sidebar-text))]"),children:[(0,l.jsx)(r,{className:(0,m.cn)("shrink-0",t?"h-[18px] w-[18px]":"h-4 w-4")}),!t&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"flex-1 truncate",children:e.title}),e.comingSoon&&(0,l.jsxs)("span",{className:"flex items-center gap-1 rounded-md bg-[hsl(var(--muted))] px-1.5 py-0.5 text-[10px] font-medium text-[hsl(var(--muted-foreground))]",children:[(0,l.jsx)(u,{className:"h-3 w-3"}),"即将开放"]})]})]}),i=t||a,h=e.tooltip??e.title,x=a?(0,l.jsx)("div",{"aria-disabled":"true",children:o}):(0,l.jsx)(c.default,{href:e.href,className:"block no-underline",children:o});return i?(0,l.jsx)(p.TooltipProvider,{delayDuration:200,children:(0,l.jsxs)(p.Tooltip,{children:[(0,l.jsx)(p.TooltipTrigger,{asChild:!0,children:x}),(0,l.jsx)(p.TooltipContent,{side:"right",sideOffset:8,children:h})]})}):x}],94767);var h=e.i(17635),x=e.i(6703),f=e.i(97634),g=e.i(58204),v=e.i(67225),y=e.i(1709),b=e.i(68184),j=e.i(53859);function w({activeName:e,instances:t,onSelect:s,onCreate:r,onManage:n}){return(0,l.jsxs)(y.DropdownMenuContent,{align:"start",className:"min-w-[220px]",children:[(0,l.jsx)(y.DropdownMenuLabel,{children:"切换项目"}),0===t.length?(0,l.jsx)("div",{className:"px-3 py-2 text-xs text-[hsl(var(--muted-foreground))]",children:"暂无项目,先创建一个。"}):t.map(t=>{let r=t.name===e;return(0,l.jsxs)(y.DropdownMenuItem,{onSelect:e=>{e.preventDefault(),s(t.name)},className:"flex items-center gap-2 pr-2",children:[(0,l.jsx)(x.Check,{className:(0,m.cn)("h-3.5 w-3.5 shrink-0",r?"text-[hsl(var(--primary))]":"opacity-0")}),(0,l.jsx)("span",{className:"flex-1 truncate",children:t.name}),t.region&&(0,l.jsx)("span",{className:"text-[11px] text-[hsl(var(--muted-foreground))]",children:t.region})]},t.name)}),(0,l.jsx)(y.DropdownMenuSeparator,{}),(0,l.jsxs)(y.DropdownMenuItem,{onSelect:e=>{e.preventDefault(),r()},children:[(0,l.jsx)(g.Plus,{className:"h-3.5 w-3.5"}),"创建新项目"]}),(0,l.jsxs)(y.DropdownMenuItem,{onSelect:e=>{e.preventDefault(),n()},children:[(0,l.jsx)(v.Settings2,{className:"h-3.5 w-3.5"}),"项目管理"]})]})}function k({title:e="Usage",items:t,className:s,...r}){return(0,l.jsxs)("div",{className:(0,m.cn)("rounded-md bg-[hsl(var(--background))] p-3 text-xs",s),...r,children:[(0,l.jsx)("div",{className:"mb-1.5 font-semibold text-[hsl(var(--muted-foreground))]",children:e}),t.map((e,t)=>(0,l.jsxs)("div",{className:"flex justify-between text-[hsl(var(--subtle))] last:mb-0",children:[(0,l.jsx)("span",{children:e.label}),(0,l.jsx)("span",{children:e.value})]},t))]})}e.s(["SidebarInstanceCard",0,function({collapsed:e}){let t=(0,d.useRouter)(),s=(0,d.usePathname)(),[r,n]=(0,h.useState)(!1),{data:a,isLoading:o}=(0,j.useInstances)(),i=(0,j.useSwitchInstance)(),c=a?.activeInstance??null,u=a?.instances??[];async function p(e){if(e!==c&&!i.isPending)try{await i.mutateAsync(e);let t=(s?s.match(/^\/knowledge-base\/[^/]+(?:\/.*)?$/)?"/knowledge-base":s.match(/^\/memory\/[^/]+(?:\/.*)?$/)?"/memory":null:null)??window.location.pathname;window.location.assign(t)}catch{}}return e?(0,l.jsxs)("div",{className:"flex justify-center px-0 pt-3",children:[(0,l.jsxs)(y.DropdownMenu,{children:[(0,l.jsx)(y.DropdownMenuTrigger,{asChild:!0,children:(0,l.jsx)("button",{type:"button","aria-label":c?`当前实例:${c}`:"选择项目",title:c??"选择项目",disabled:o,className:(0,m.cn)("flex h-8 w-8 items-center justify-center rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--card))] text-[11px] font-semibold uppercase text-[hsl(var(--foreground))] transition-colors","hover:border-[hsl(var(--primary))] hover:text-[hsl(var(--primary))]","disabled:opacity-50"),children:(c??"?").charAt(0)})}),(0,l.jsx)(w,{activeName:c,instances:u,onSelect:p,onCreate:()=>n(!0),onManage:()=>t.push("/projects")})]}),(0,l.jsx)(b.ConnectInstanceDialog,{open:r,onOpenChange:n,onSuccess:()=>t.refresh()})]}):(0,l.jsxs)("div",{className:"px-3 pt-3",children:[(0,l.jsxs)(y.DropdownMenu,{children:[(0,l.jsx)(y.DropdownMenuTrigger,{asChild:!0,children:(0,l.jsxs)("button",{type:"button",disabled:o,className:"group flex w-full items-center gap-2 rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--secondary))] px-3 py-2 text-left transition-colors hover:bg-[hsl(var(--accent))]",children:[(0,l.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,l.jsx)("span",{className:"text-[11px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"当前实例"}),(0,l.jsx)("span",{className:"truncate text-sm font-semibold text-[hsl(var(--foreground))]",children:c??"未选择"})]}),(0,l.jsx)(f.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 text-[hsl(var(--muted-foreground))]"})]})}),(0,l.jsx)(w,{activeName:c,instances:u,onSelect:p,onCreate:()=>n(!0),onManage:()=>t.push("/projects")})]}),(0,l.jsx)(b.ConnectInstanceDialog,{open:r,onOpenChange:n,onSuccess:()=>t.refresh()})]})}],44698);var C=e.i(47932),N=e.i(54614);e.s(["SidebarUsageStats",0,function(){let e=(0,C.useKnowledgeBases)(),t=(0,N.useMemoryStores)(),s=e.data?.totalCount??e.data?.items?.length,r=t.data?.totalCount??t.data?.items?.length;return(0,l.jsx)(k,{items:[{label:"知识库",value:s??"—"},{label:"记忆库",value:r??"—"}]})}],96809);var S=e.i(42737);e.s(["HelpLink",0,function({collapsed:e}){var t;let s=(t=(0,d.usePathname)(),t?.startsWith("/knowledge-base")?"https://help.aliyun.com/zh/tablestore/knowledge-base-rag/":"https://help.aliyun.com/zh/tablestore/");return e?(0,l.jsx)("a",{href:s,target:"_blank",rel:"noreferrer",title:"帮助","aria-label":"帮助",className:"flex h-8 w-8 items-center justify-center rounded-md text-[hsl(var(--muted-foreground))] transition-colors hover:bg-[hsl(var(--background))] hover:text-[hsl(var(--foreground))]",children:(0,l.jsx)(S.HelpCircle,{className:"h-4 w-4"})}):(0,l.jsxs)("a",{href:s,target:"_blank",rel:"noreferrer",title:"帮助",className:(0,m.cn)("flex h-8 items-center gap-2 rounded-md px-3 text-sm text-[hsl(var(--muted-foreground))] transition-colors hover:bg-[hsl(var(--background))] hover:text-[hsl(var(--foreground))]"),children:[(0,l.jsx)(S.HelpCircle,{className:"h-4 w-4 shrink-0"}),(0,l.jsx)("span",{children:"帮助"})]})}],41026);let I=(0,r.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),T=(0,r.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),M=(0,r.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var E=e.i(12278);let F=["light","system","dark"],R={light:M,system:T,dark:I},K={light:"浅色",system:"自动",dark:"深色"};e.s(["ThemeToggle",0,function({collapsed:e}){let{theme:t,setTheme:s,resolvedTheme:r}=(0,E.useTheme)(),[n,a]=(0,h.useState)(!1);if((0,h.useEffect)(()=>a(!0),[]),!n)return e?(0,l.jsx)("div",{className:"h-8 w-8","aria-hidden":!0}):(0,l.jsx)("div",{className:"h-8 w-[108px]","aria-hidden":!0});let o=t??"system";if(e){let e=(F.indexOf(o)+1)%F.length,t=F[e],n="system"===o?"dark"===r?"dark":"light":o,a=R[n];return(0,l.jsx)(p.TooltipProvider,{delayDuration:200,children:(0,l.jsxs)(p.Tooltip,{children:[(0,l.jsx)(p.TooltipTrigger,{asChild:!0,children:(0,l.jsxs)("button",{type:"button","aria-label":`切换到 ${K[t]} 主题`,"data-mode":o,onClick:()=>s(t),className:(0,m.cn)("relative flex h-8 w-8 items-center justify-center rounded-md text-[hsl(var(--muted-foreground))] transition-colors","hover:bg-[hsl(var(--background))] hover:text-[hsl(var(--foreground))]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--primary)/0.3)]"),children:[(0,l.jsx)(M,{className:(0,m.cn)("absolute h-[18px] w-[18px] transition-all duration-300 ease-[cubic-bezier(0.34,1.56,0.64,1)]","light"===n?"rotate-0 scale-100 opacity-100":"-rotate-90 scale-50 opacity-0")}),(0,l.jsx)(I,{className:(0,m.cn)("absolute h-[18px] w-[18px] transition-all duration-300 ease-[cubic-bezier(0.34,1.56,0.64,1)]","dark"===n?"rotate-0 scale-100 opacity-100":"rotate-90 scale-50 opacity-0")}),"system"===o&&(0,l.jsx)("span",{"aria-hidden":!0,className:"absolute bottom-0.5 right-0.5 flex h-2.5 w-2.5 items-center justify-center rounded-full bg-[hsl(var(--card))] text-[hsl(var(--primary))] ring-1 ring-[hsl(var(--border))]",children:(0,l.jsx)(T,{className:"h-1.5 w-1.5",strokeWidth:3})}),(0,l.jsx)(a,{"aria-hidden":!0,className:"hidden"})]})}),(0,l.jsxs)(p.TooltipContent,{side:"right",sideOffset:8,children:["主题:",K[o]," · 点击切换至 ",K[t]]})]})})}return(0,l.jsx)("div",{role:"radiogroup","aria-label":"主题",className:(0,m.cn)("inline-flex items-center gap-0.5 rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--secondary))] p-0.5","shadow-[inset_0_1px_2px_rgba(15,23,42,0.04)]"),children:F.map(e=>{let t=R[e],r=o===e;return(0,l.jsx)(p.TooltipProvider,{delayDuration:300,children:(0,l.jsxs)(p.Tooltip,{children:[(0,l.jsx)(p.TooltipTrigger,{asChild:!0,children:(0,l.jsx)("button",{type:"button",role:"radio","aria-checked":r,"aria-label":K[e],"data-state":r?"on":"off",onClick:()=>s(e),className:(0,m.cn)("relative flex h-7 w-7 items-center justify-center rounded transition-all duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--primary)/0.3)]",r?"bg-[hsl(var(--card))] text-[hsl(var(--primary))] shadow-sm":"text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))]"),children:(0,l.jsx)(t,{className:"h-3.5 w-3.5"})})}),(0,l.jsx)(p.TooltipContent,{side:"top",sideOffset:6,children:K[e]})]})},e)})})}],88140)},6758,e=>{"use strict";var t=e.i(44501),s=e.i(70978),r=e.i(68432),n=e.i(79980),a=e.i(26232),o=e.i(91850),i=e.i(83389),l=e.i(76490),c=e.i(12122),d=e.i(94767),u=e.i(44698),m=e.i(96809),p=e.i(41026),h=e.i(88140);e.s(["Sidebar",0,function(){let{collapsed:e,toggle:x}=(0,i.useSidebarCollapsed)(),f=e?"w-16":"w-[220px]";return(0,t.jsxs)("aside",{"data-collapsed":e,className:(0,l.cn)("fixed left-0 top-0 bottom-0 z-40 hidden flex-col border-r border-[hsl(var(--sidebar-border))] bg-[hsl(var(--sidebar-bg))] transition-[width] duration-200 ease-out md:flex",f),children:[(0,t.jsxs)(s.default,{href:"/",className:(0,l.cn)("flex h-14 shrink-0 items-center gap-2.5 border-b border-[hsl(var(--sidebar-border))] transition-opacity hover:opacity-80",e?"justify-center px-0":"px-4"),children:[(0,t.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] shadow-sm",children:(0,t.jsx)(a.Zap,{className:"h-4 w-4"})}),!e&&(0,t.jsx)("span",{className:"text-[15px] font-semibold tracking-tight text-[hsl(var(--foreground))]",children:"Agent Storage"})]}),(0,t.jsx)(u.SidebarInstanceCard,{collapsed:e}),(0,t.jsx)("nav",{className:(0,l.cn)("flex-1 overflow-y-auto py-3",e?"px-2":"px-3"),children:o.sidebarGroups.map((s,r)=>(0,t.jsxs)("div",{className:(0,l.cn)(r>0&&(e?"mt-3":"mt-4")),children:[!e&&(0,t.jsx)("div",{className:"mb-1.5 px-3 text-[11px] font-semibold uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:s.title}),(0,t.jsx)("div",{className:(0,l.cn)(e?"space-y-1":"space-y-0.5"),children:s.items.map(s=>(0,t.jsx)(d.SidebarItem,{item:s,collapsed:e},s.title))})]},s.title))}),(0,t.jsxs)("div",{className:(0,l.cn)("shrink-0 border-t border-[hsl(var(--sidebar-border))]",e?"px-2 py-2":"p-3"),children:[!e&&(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsx)(m.SidebarUsageStats,{})}),(0,t.jsxs)("div",{className:(0,l.cn)("flex items-center",e?"flex-col gap-1":"justify-between gap-1"),children:[(0,t.jsx)(p.HelpLink,{collapsed:e}),(0,t.jsx)(h.ThemeToggle,{collapsed:e}),e?(0,t.jsx)(c.TooltipProvider,{delayDuration:200,children:(0,t.jsxs)(c.Tooltip,{children:[(0,t.jsx)(c.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:x,"aria-label":"展开侧边栏",className:"flex h-8 w-8 items-center justify-center rounded-md text-[hsl(var(--muted-foreground))] transition-colors hover:bg-[hsl(var(--background))] hover:text-[hsl(var(--foreground))]",children:(0,t.jsx)(n.ChevronRight,{className:"h-4 w-4"})})}),(0,t.jsx)(c.TooltipContent,{side:"right",sideOffset:8,children:"展开侧边栏"})]})}):null]}),!e&&(0,t.jsxs)("button",{type:"button",onClick:x,"aria-label":"收起侧边栏",className:"mt-2 flex h-8 w-full items-center gap-2 rounded-md px-3 text-xs text-[hsl(var(--muted-foreground))] transition-colors hover:bg-[hsl(var(--background))] hover:text-[hsl(var(--foreground))]",children:[(0,t.jsx)(r.ChevronLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:"收起"})]})]})]})}])},31445,e=>{"use strict";var t=e.i(44501),s=e.i(17635),r=e.i(70978),n=e.i(65581),a=e.i(46951);let o=(0,e.i(86620).default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);var i=e.i(46398),l=e.i(26232),c=e.i(91850),d=e.i(76490),u=e.i(94767),m=e.i(44698),p=e.i(96809),h=e.i(41026),x=e.i(88140);e.s(["SidebarMobile",0,function(){let[e,f]=(0,s.useState)(!1),g=(0,n.usePathname)();return(0,s.useEffect)(()=>{f(!1)},[g]),(0,t.jsxs)("div",{className:"flex h-14 items-center gap-3 border-b border-[hsl(var(--sidebar-border))] bg-[hsl(var(--sidebar-bg))] px-4 md:hidden",children:[(0,t.jsxs)(a.Root,{open:e,onOpenChange:f,children:[(0,t.jsx)(a.Trigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button","aria-label":"打开菜单",className:"rounded-md p-2 text-[hsl(var(--muted-foreground))] transition-colors hover:bg-[hsl(var(--background))] hover:text-[hsl(var(--foreground))]",children:(0,t.jsx)(o,{className:"h-5 w-5"})})}),(0,t.jsxs)(a.Portal,{children:[(0,t.jsx)(a.Overlay,{className:"fixed inset-0 z-50 bg-black/30 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),(0,t.jsxs)(a.Content,{className:"fixed left-0 top-0 z-50 flex h-full w-[260px] flex-col border-r border-[hsl(var(--sidebar-border))] bg-[hsl(var(--sidebar-bg))] shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left data-[state=open]:duration-200",children:[(0,t.jsx)(a.Title,{className:"sr-only",children:"导航菜单"}),(0,t.jsxs)("div",{className:"flex h-14 items-center justify-between border-b border-[hsl(var(--sidebar-border))] px-4",children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-2.5",children:[(0,t.jsx)("span",{className:"flex h-7 w-7 items-center justify-center rounded-md bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] shadow-sm",children:(0,t.jsx)(l.Zap,{className:"h-4 w-4"})}),(0,t.jsx)("span",{className:"text-[15px] font-semibold tracking-tight text-[hsl(var(--foreground))]",children:"Agent Storage"})]}),(0,t.jsx)(a.Close,{asChild:!0,children:(0,t.jsx)("button",{type:"button","aria-label":"关闭菜单",className:"rounded-md p-2 text-[hsl(var(--muted-foreground))] transition-colors hover:bg-[hsl(var(--background))] hover:text-[hsl(var(--foreground))]",children:(0,t.jsx)(i.X,{className:"h-4 w-4"})})})]}),(0,t.jsx)(m.SidebarInstanceCard,{}),(0,t.jsx)("nav",{className:"flex-1 overflow-y-auto px-3 py-3",children:c.sidebarGroups.map((e,s)=>(0,t.jsxs)("div",{className:(0,d.cn)(s>0&&"mt-4"),children:[(0,t.jsx)("div",{className:"mb-1.5 px-3 text-[11px] font-semibold uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:e.title}),(0,t.jsx)("div",{className:"space-y-0.5",children:e.items.map(e=>(0,t.jsx)(u.SidebarItem,{item:e},e.title))})]},e.title))}),(0,t.jsxs)("div",{className:"border-t border-[hsl(var(--sidebar-border))] p-3 space-y-2",children:[(0,t.jsx)(p.SidebarUsageStats,{}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-1",children:[(0,t.jsx)(h.HelpLink,{}),(0,t.jsx)(x.ThemeToggle,{})]})]})]})]})]}),(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"flex h-7 w-7 items-center justify-center rounded-md bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]",children:(0,t.jsx)(l.Zap,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("span",{className:"text-sm font-semibold tracking-tight text-[hsl(var(--foreground))]",children:"Agent Storage"})]})]})}],31445)},98235,e=>{"use strict";var t=e.i(44501),s=e.i(83389),r=e.i(76490);e.s(["SidebarOffset",0,function({children:e}){let{collapsed:n}=(0,s.useSidebarCollapsed)();return(0,t.jsx)("div",{className:(0,r.cn)("transition-[margin] duration-200 ease-out",n?"md:ml-16":"md:ml-[220px]"),children:e})}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,30363,e=>{"use strict";let r=(0,e.i(86620).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,r],30363)},23516,e=>{"use strict";var r=e.i(44501),n=e.i(70978),t=e.i(65581),a=e.i(79980),l=e.i(76490);let o={"knowledge-base":"知识库",memory:"记忆库","llm-providers":"大模型",projects:"项目管理",documents:"文档",retrieval:"检索测试",qa:"问答测试",search:"记忆检索",units:"长期记忆",messages:"短期记忆",requests:"请求审计",settings:"设置",create:"新建",new:"新建",chat:"对话"};e.s(["PageHeader",0,function({title:e,description:i,hideBreadcrumb:s,children:d,className:c}){let u=(0,t.usePathname)()??"/",m=s?[]:function(e){if(/^\/knowledge-base\/[^/]+(?:\/.*)?$/.test(e)||/^\/memory\/[^/]+(?:\/.*)?$/.test(e))return[];let r=e.split("/").filter(Boolean);if(0===r.length)return[];let n=[],t="";return r.forEach((e,a)=>{t+=`/${e}`;let l=decodeURIComponent(e),i=o[l]??l;n.push({label:i,href:a<r.length-1?t:void 0})}),n}(u);return(0,r.jsxs)("div",{className:(0,l.cn)("mb-5 flex flex-col gap-2",c),children:[m.length>1&&(0,r.jsxs)("nav",{"aria-label":"面包屑",className:"flex items-center gap-1 text-[13px] text-[hsl(var(--muted-foreground))]",children:[(0,r.jsx)(n.default,{href:"/",className:"transition-colors hover:text-[hsl(var(--foreground))]",children:"主页"}),m.map((e,t)=>(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(a.ChevronRight,{className:"h-3 w-3 opacity-60"}),e.href?(0,r.jsx)(n.default,{href:e.href,className:"transition-colors hover:text-[hsl(var(--foreground))]",children:e.label}):(0,r.jsx)("span",{className:"font-medium text-[hsl(var(--foreground))]",children:e.label})]},`${e.label}-${t}`))]}),(0,r.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)("h1",{className:"text-xl font-semibold leading-tight text-[hsl(var(--foreground))]",children:e}),i&&(0,r.jsx)("p",{className:"text-[13px] text-[hsl(var(--muted-foreground))]",children:i})]}),d&&(0,r.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:d})]})]})}])},53552,e=>{"use strict";let r=(0,e.i(86620).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,r],53552)},3106,96359,e=>{"use strict";var r=e.i(44501),n=e.i(17635),t=e.i(43250),a=e.i(80939),l=e.i(77275),o=e.i(91967),i=e.i(17256),s="Toggle",d=n.forwardRef((e,n)=>{let{pressed:t,defaultPressed:l,onPressedChange:d,...c}=e,[u,m]=(0,i.useControllableState)({prop:t,onChange:d,defaultProp:l??!1,caller:s});return(0,r.jsx)(a.Primitive.button,{type:"button","aria-pressed":u,"data-state":u?"on":"off","data-disabled":e.disabled?"":void 0,...c,ref:n,onClick:(0,o.composeEventHandlers)(e.onClick,()=>{e.disabled||m(!u)})})});d.displayName=s;var c=e.i(25486),u="ToggleGroup",[m,g]=(0,t.createContextScope)(u,[l.createRovingFocusGroupScope]),h=(0,l.createRovingFocusGroupScope)(),x=n.default.forwardRef((e,n)=>{let{type:t,...a}=e;if("single"===t)return(0,r.jsx)(b,{...a,ref:n});if("multiple"===t)return(0,r.jsx)(j,{...a,ref:n});throw Error(`Missing prop \`type\` expected on \`${u}\``)});x.displayName=u;var[p,f]=m(u),b=n.default.forwardRef((e,t)=>{let{value:a,defaultValue:l,onValueChange:o=()=>{},...s}=e,[d,c]=(0,i.useControllableState)({prop:a,defaultProp:l??"",onChange:o,caller:u});return(0,r.jsx)(p,{scope:e.__scopeToggleGroup,type:"single",value:n.default.useMemo(()=>d?[d]:[],[d]),onItemActivate:c,onItemDeactivate:n.default.useCallback(()=>c(""),[c]),children:(0,r.jsx)(F,{...s,ref:t})})}),j=n.default.forwardRef((e,t)=>{let{value:a,defaultValue:l,onValueChange:o=()=>{},...s}=e,[d,c]=(0,i.useControllableState)({prop:a,defaultProp:l??[],onChange:o,caller:u}),m=n.default.useCallback(e=>c((r=[])=>[...r,e]),[c]),g=n.default.useCallback(e=>c((r=[])=>r.filter(r=>r!==e)),[c]);return(0,r.jsx)(p,{scope:e.__scopeToggleGroup,type:"multiple",value:d,onItemActivate:m,onItemDeactivate:g,children:(0,r.jsx)(F,{...s,ref:t})})});x.displayName=u;var[v,C]=m(u),F=n.default.forwardRef((e,n)=>{let{__scopeToggleGroup:t,disabled:o=!1,rovingFocus:i=!0,orientation:s,dir:d,loop:u=!0,...m}=e,g=h(t),x=(0,c.useDirection)(d),p={role:"group",dir:x,...m};return(0,r.jsx)(v,{scope:t,rovingFocus:i,disabled:o,children:i?(0,r.jsx)(l.Root,{asChild:!0,...g,orientation:s,dir:x,loop:u,children:(0,r.jsx)(a.Primitive.div,{...p,ref:n})}):(0,r.jsx)(a.Primitive.div,{...p,ref:n})})}),y="ToggleGroupItem",N=n.default.forwardRef((e,t)=>{let a=f(y,e.__scopeToggleGroup),o=C(y,e.__scopeToggleGroup),i=h(e.__scopeToggleGroup),s=a.value.includes(e.value),d=o.disabled||e.disabled,c={...e,pressed:s,disabled:d},u=n.default.useRef(null);return o.rovingFocus?(0,r.jsx)(l.Item,{asChild:!0,...i,focusable:!d,active:s,ref:u,children:(0,r.jsx)(w,{...c,ref:t})}):(0,r.jsx)(w,{...c,ref:t})});N.displayName=y;var w=n.default.forwardRef((e,n)=>{let{__scopeToggleGroup:t,value:a,...l}=e,o=f(y,t),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s="single"===o.type?i:void 0;return(0,r.jsx)(d,{...s,...l,ref:n,onPressedChange:e=>{e?o.onItemActivate(a):o.onItemDeactivate(a)}})}),k=e.i(76490);let I=n.createContext({size:"default",variant:"default"}),S=n.forwardRef(({className:e,variant:n="default",size:t="default",children:a,...l},o)=>(0,r.jsx)(x,{ref:o,className:(0,k.cn)("inline-flex items-center justify-center gap-1",e),...l,children:(0,r.jsx)(I.Provider,{value:{variant:n,size:t},children:a})}));S.displayName=x.displayName;let T=n.forwardRef(({className:e,children:n,...t},a)=>(0,r.jsx)(N,{ref:a,className:(0,k.cn)("relative inline-flex items-center justify-center whitespace-nowrap","text-sm font-medium transition-all","first:rounded-l-[7px] last:rounded-r-[7px]","border-l border-[hsl(var(--border)/0.6)]","first:border-l-0","data-[state=on]:border-l-transparent","[&[data-state=on]+*]:border-l-transparent","ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","hover:bg-[hsl(var(--muted)/0.6)] hover:text-[hsl(var(--foreground))]","data-[state=on]:bg-[hsl(var(--background))] data-[state=on]:text-[hsl(var(--foreground))] data-[state=on]:shadow-sm",e),...t,children:n}));T.displayName=N.displayName,e.s(["ToggleGroup",0,S,"ToggleGroupItem",0,T],3106);var R=e.i(46398);e.s(["TagInput",0,function({value:e,onChange:t,placeholder:a="输入后按回车添加"}){let[l,o]=(0,n.useState)(""),i=(0,n.useCallback)(r=>{let n=r.trim();n&&!e.includes(n)&&t([...e,n]),o("")},[e,t]),s=(0,n.useCallback)(r=>{t(e.filter((e,n)=>n!==r))},[e,t]);return(0,r.jsxs)("div",{className:(0,k.cn)("flex flex-wrap items-center gap-1.5 rounded-md border border-[hsl(var(--input))] bg-background px-3 py-2","focus-within:border-[hsl(var(--ring))] focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-0","min-h-10 transition-colors"),children:[e.map((e,n)=>(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full border border-primary-200 bg-primary-100 px-2 py-0.5 text-xs font-medium text-primary-700",children:[e,(0,r.jsx)("button",{type:"button",onClick:()=>s(n),className:"inline-flex items-center justify-center rounded-full p-0.5 hover:opacity-70 transition-opacity","aria-label":`删除标签 ${e}`,children:(0,r.jsx)(R.X,{size:12})})]},`${e}-${n}`)),(0,r.jsx)("input",{type:"text",value:l,onChange:e=>o(e.target.value),onKeyDown:r=>{("Enter"===r.key||","===r.key)&&(r.preventDefault(),i(l)),"Backspace"===r.key&&""===l&&e.length>0&&s(e.length-1)},placeholder:0===e.length?a:"",className:"flex-1 min-w-20 bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]})}],96359)},64209,e=>{"use strict";var r=e.i(17635),n=e.i(91967),t=e.i(43250),a=e.i(17256),l=e.i(72687),o=e.i(67928),i=e.i(80939),s=e.i(90088),d=e.i(33616),c=e.i(44501),u="Collapsible",[m,g]=(0,t.createContextScope)(u),[h,x]=m(u),p=r.forwardRef((e,n)=>{let{__scopeCollapsible:t,open:l,defaultOpen:o,disabled:s,onOpenChange:m,...g}=e,[x,p]=(0,a.useControllableState)({prop:l,defaultProp:o??!1,onChange:m,caller:u});return(0,c.jsx)(h,{scope:t,disabled:s,contentId:(0,d.useId)(),open:x,onOpenToggle:r.useCallback(()=>p(e=>!e),[p]),children:(0,c.jsx)(i.Primitive.div,{"data-state":F(x),"data-disabled":s?"":void 0,...g,ref:n})})});p.displayName=u;var f="CollapsibleTrigger",b=r.forwardRef((e,r)=>{let{__scopeCollapsible:t,...a}=e,l=x(f,t);return(0,c.jsx)(i.Primitive.button,{type:"button","aria-controls":l.contentId,"aria-expanded":l.open||!1,"data-state":F(l.open),"data-disabled":l.disabled?"":void 0,disabled:l.disabled,...a,ref:r,onClick:(0,n.composeEventHandlers)(e.onClick,l.onOpenToggle)})});b.displayName=f;var j="CollapsibleContent",v=r.forwardRef((e,r)=>{let{forceMount:n,...t}=e,a=x(j,e.__scopeCollapsible);return(0,c.jsx)(s.Presence,{present:n||a.open,children:({present:e})=>(0,c.jsx)(C,{...t,ref:r,present:e})})});v.displayName=j;var C=r.forwardRef((e,n)=>{let{__scopeCollapsible:t,present:a,children:s,...d}=e,u=x(j,t),[m,g]=r.useState(a),h=r.useRef(null),p=(0,o.useComposedRefs)(n,h),f=r.useRef(0),b=f.current,v=r.useRef(0),C=v.current,y=u.open||m,N=r.useRef(y),w=r.useRef(void 0);return r.useEffect(()=>{let e=requestAnimationFrame(()=>N.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,l.useLayoutEffect)(()=>{let e=h.current;if(e){w.current=w.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let r=e.getBoundingClientRect();f.current=r.height,v.current=r.width,N.current||(e.style.transitionDuration=w.current.transitionDuration,e.style.animationName=w.current.animationName),g(a)}},[u.open,a]),(0,c.jsx)(i.Primitive.div,{"data-state":F(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!y,...d,ref:p,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":C?`${C}px`:void 0,...e.style},children:y&&s})});function F(e){return e?"open":"closed"}e.s(["Collapsible",0,p,"CollapsibleContent",0,v,"CollapsibleTrigger",0,b],64209)},72238,7187,e=>{"use strict";e.s(["handleNumberInput",0,function(e){return r=>{e(r.target.value?Number(r.target.value):void 0)}}],72238);var r=e.i(32356);let n=r.z.enum(["string","long","double","boolean","date","string_list","long_list","double_list","boolean_list","date_list"]),t=r.z.object({name:r.z.string().min(1).max(128),type:n}),a=r.z.object({provider:r.z.enum(["bailian","custom"]),model:r.z.string().min(1),dimension:r.z.number().int().positive(),apiKey:r.z.string().optional(),url:r.z.string().url().optional()}),l=r.z.object({type:r.z.enum(["RRF","WEIGHT","MODEL"]),numberOfResults:r.z.number().int().positive().optional(),rrfConfiguration:r.z.object({denseVectorSearchWeight:r.z.number().min(0),fullTextSearchWeight:r.z.number().min(0),k:r.z.number().int().positive()}).optional(),weightConfiguration:r.z.object({denseVectorSearchWeight:r.z.number().min(0).max(1),fullTextSearchWeight:r.z.number().min(0).max(1)}).optional(),modelConfiguration:r.z.object({provider:r.z.string().min(1),model:r.z.string().min(1)}).optional()}),o=r.z.object({searchType:r.z.array(r.z.enum(["DENSE_VECTOR","FULL_TEXT"])).min(1).optional(),denseVectorSearchConfiguration:r.z.object({numberOfResults:r.z.number().int().positive()}).optional(),fullTextSearchConfiguration:r.z.object({numberOfResults:r.z.number().int().positive()}).optional(),rerankingConfiguration:l.optional()}),i=r.z.object({knowledgeBaseName:r.z.string().min(1,"Knowledge base name is required").max(64,"Name must be at most 64 characters").regex(/^[a-zA-Z][a-zA-Z0-9_-]{1,62}[a-zA-Z0-9]$/,"名称必须以字母开头,仅允许字母、数字、下划线和连字符,长度 3-64 字符,不能以下划线或连字符结尾"),description:r.z.string().max(4096).optional(),subspace:r.z.boolean().optional(),tags:r.z.array(r.z.string()).optional(),metadata:r.z.array(t).max(200).optional(),embeddingConfiguration:a.optional(),retrievalConfiguration:o.optional()}),s=r.z.object({knowledgeBaseName:r.z.string().min(1),description:r.z.string().max(4096).optional(),tags:r.z.array(r.z.string()).optional(),retrievalConfiguration:o.optional()});e.s(["createKBSchema",0,i,"updateKBSchema",0,s],7187)},8897,e=>{"use strict";var r=e.i(44501),n=e.i(70978),t=e.i(53552),a=e.i(23516),l=e.i(65581),o=e.i(80883),i=e.i(88310),s=e.i(87014),d=e.i(20268),c=e.i(6703),u=e.i(72238),m=e.i(42595),g=e.i(23888),h=e.i(45123),x=e.i(17635),p=e.i(76490);let f=x.forwardRef(({className:e,checked:n=!1,onCheckedChange:t,disabled:a,...l},o)=>(0,r.jsx)("button",{ref:o,type:"button",role:"switch","aria-checked":n,"data-state":n?"checked":"unchecked",disabled:a,onClick:()=>t?.(!n),className:(0,p.cn)("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full transition-colors duration-200","shadow-[inset_0_0_0_1px_rgba(0,0,0,0.04),inset_0_1px_2px_rgba(0,0,0,0.06)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50",n?"bg-[hsl(var(--primary-600))]":"bg-[hsl(var(--muted))] hover:bg-[hsl(var(--muted)/0.8)]",e),...l,children:(0,r.jsx)("span",{"aria-hidden":!0,className:(0,p.cn)("pointer-events-none block h-5 w-5 rounded-full bg-white transition-transform duration-200","shadow-[0_1px_2px_rgba(0,0,0,0.1),0_2px_6px_rgba(0,0,0,0.15)] ring-1 ring-black/4","ease-[cubic-bezier(0.34,1.56,0.64,1)]",n?"translate-x-5":"translate-x-0.5")})}));f.displayName="Switch";var b=e.i(21562),j=e.i(64209),v=e.i(66473),C=e.i(3106),F=e.i(96359),y=e.i(58204),N=e.i(30363);let w=[{value:"string",label:"String"},{value:"long",label:"Long"},{value:"double",label:"Double"},{value:"boolean",label:"Boolean"},{value:"date",label:"Date"},{value:"string_list",label:"String List"},{value:"long_list",label:"Long List"},{value:"double_list",label:"Double List"},{value:"boolean_list",label:"Boolean List"},{value:"date_list",label:"Date List"}];function k({value:e,onChange:n}){let t=(0,x.useCallback)(()=>{n([...e,{name:"",type:"string"}])},[e,n]),a=(0,x.useCallback)(r=>{n(e.filter((e,n)=>n!==r))},[e,n]),l=(0,x.useCallback)((r,t)=>{n(e.map((e,n)=>n===r?{...e,...t}:e))},[e,n]);return(0,r.jsxs)("div",{className:"space-y-2",children:[e.map((e,n)=>(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(g.Input,{value:e.name,onChange:e=>l(n,{name:e.target.value}),placeholder:"字段名",className:"h-9 flex-1"}),(0,r.jsxs)(v.Select,{value:e.type,onValueChange:e=>l(n,{type:e}),children:[(0,r.jsx)(v.SelectTrigger,{className:"h-9 w-[140px]",children:(0,r.jsx)(v.SelectValue,{})}),(0,r.jsx)(v.SelectContent,{children:w.map(e=>(0,r.jsx)(v.SelectItem,{value:e.value,children:e.label},e.value))})]}),(0,r.jsx)(m.Button,{type:"button",variant:"ghost",size:"icon",onClick:()=>a(n),className:"h-9 w-9 text-muted-foreground hover:text-destructive hover:bg-destructive/10","aria-label":`删除字段 ${e.name||n+1}`,children:(0,r.jsx)(N.Trash2,{size:16})})]},n)),(0,r.jsxs)(m.Button,{type:"button",variant:"ghost",onClick:t,className:"gap-1.5 text-primary hover:bg-primary/10",children:[(0,r.jsx)(y.Plus,{size:16}),"添加字段"]})]})}let I=[1024,768,512,256,128,64],S=[2048,1536,1024,768,512,256,128,64];function T({form:e}){let n=(0,o.useWatch)({control:e.control,name:"embeddingConfiguration.provider"}),t="text-embedding-v3"===(0,o.useWatch)({control:e.control,name:"embeddingConfiguration.model"})?I:S,a=r=>{e.setValue("embeddingConfiguration.model",r),e.setValue("embeddingConfiguration.dimension",1024)};return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(b.FormField,{control:e.control,name:"embeddingConfiguration.provider",render:({field:n})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"提供方"}),(0,r.jsxs)(v.Select,{onValueChange:r=>{n.onChange(r),"bailian"===r?(e.setValue("embeddingConfiguration.model","text-embedding-v4"),e.setValue("embeddingConfiguration.dimension",1024)):e.setValue("embeddingConfiguration.model","")},defaultValue:n.value,children:[(0,r.jsx)(b.FormControl,{children:(0,r.jsx)(v.SelectTrigger,{children:(0,r.jsx)(v.SelectValue,{placeholder:"选择 Embedding 提供方"})})}),(0,r.jsxs)(v.SelectContent,{children:[(0,r.jsx)(v.SelectItem,{value:"bailian",children:"百炼 (Bailian)"}),(0,r.jsx)(v.SelectItem,{value:"custom",children:"自定义 (Custom)"})]})]}),(0,r.jsx)(b.FormMessage,{})]})}),(0,r.jsx)(b.FormField,{control:e.control,name:"embeddingConfiguration.model",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"模型名称"}),(0,r.jsx)(b.FormControl,{children:"bailian"===n?(0,r.jsxs)(v.Select,{onValueChange:a,value:e.value,children:[(0,r.jsx)(v.SelectTrigger,{children:(0,r.jsx)(v.SelectValue,{placeholder:"选择模型"})}),(0,r.jsxs)(v.SelectContent,{children:[(0,r.jsx)(v.SelectItem,{value:"text-embedding-v3",children:"text-embedding-v3"}),(0,r.jsx)(v.SelectItem,{value:"text-embedding-v4",children:"text-embedding-v4"})]})]}):(0,r.jsx)(g.Input,{placeholder:"输入模型名称",...e})}),(0,r.jsx)(b.FormMessage,{})]})}),(0,r.jsx)(b.FormField,{control:e.control,name:"embeddingConfiguration.dimension",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"向量维度"}),(0,r.jsx)(b.FormControl,{children:"bailian"===n?(0,r.jsxs)(v.Select,{onValueChange:r=>e.onChange(Number(r)),value:String(e.value),children:[(0,r.jsx)(v.SelectTrigger,{children:(0,r.jsx)(v.SelectValue,{placeholder:"选择维度"})}),(0,r.jsx)(v.SelectContent,{children:t.map(e=>(0,r.jsx)(v.SelectItem,{value:String(e),children:e.toLocaleString()},e))})]}):(0,r.jsx)(g.Input,{type:"number",placeholder:"例如: 1024",...e,onChange:r=>e.onChange(Number(r.target.value))})}),(0,r.jsx)(b.FormMessage,{})]})}),"custom"===n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.FormField,{control:e.control,name:"embeddingConfiguration.apiKey",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"API Key"}),(0,r.jsx)(b.FormControl,{children:(0,r.jsx)(g.Input,{type:"password",placeholder:"输入 API Key",...e,value:e.value??""})}),(0,r.jsx)(b.FormMessage,{})]})}),(0,r.jsx)(b.FormField,{control:e.control,name:"embeddingConfiguration.url",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"API URL"}),(0,r.jsx)(b.FormControl,{children:(0,r.jsx)(g.Input,{placeholder:"https://your-embedding-service.com/v1/embeddings",...e,value:e.value??""})}),(0,r.jsx)(b.FormMessage,{})]})})]})]})}var R=e.i(37500),z=e.i(12984),_=e.i(58770),L=e.i(47570),M=e.i(7187);function V(){let e,n=(0,l.useRouter)(),t=(e=(0,z.useQueryClient)(),(0,R.useMutation)({mutationFn:e=>(0,_.createKnowledgeBase)(e),onSuccess:()=>{(0,L.invalidateKnowledgeBaseQueries)(e)}})),a=(0,o.useForm)({resolver:(0,i.zodResolver)(M.createKBSchema),defaultValues:{knowledgeBaseName:"",description:"",subspace:!1,tags:[],metadata:[],embeddingConfiguration:{provider:"bailian",model:"text-embedding-v4",dimension:1024},retrievalConfiguration:{searchType:["DENSE_VECTOR","FULL_TEXT"],rerankingConfiguration:{type:"WEIGHT",numberOfResults:20,rrfConfiguration:{denseVectorSearchWeight:.5,fullTextSearchWeight:.5,k:60},weightConfiguration:{denseVectorSearchWeight:.7,fullTextSearchWeight:.3},modelConfiguration:{provider:"bailian",model:"gte-rerank-v2"}}}}}),x=a.watch("retrievalConfiguration.rerankingConfiguration.type"),p=e=>"space-y-4 rounded-md border p-4 transition-colors "+(e?"border-[hsl(var(--primary)/0.4)] bg-[hsl(var(--primary)/0.04)]":"border-border bg-transparent");async function y(e){try{let r={...e,retrievalConfiguration:e.retrievalConfiguration?{...e.retrievalConfiguration,rerankingConfiguration:e.retrievalConfiguration.rerankingConfiguration?{...e.retrievalConfiguration.rerankingConfiguration,numberOfResults:e.retrievalConfiguration.rerankingConfiguration.numberOfResults??20}:void 0}:void 0};await t.mutateAsync(r),s.toast.success("知识库创建成功"),n.push("/knowledge-base")}catch(r){let e=r instanceof Error?r.message:"创建知识库失败";s.toast.error(e)}}return(0,r.jsx)(b.Form,{...a,children:(0,r.jsxs)("form",{onSubmit:a.handleSubmit(y),className:"space-y-8",children:[(0,r.jsxs)("section",{className:"space-y-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"基本信息"}),(0,r.jsx)(b.FormField,{control:a.control,name:"knowledgeBaseName",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsxs)(b.FormLabel,{children:["名称 ",(0,r.jsx)("span",{className:"text-[hsl(var(--destructive))]",children:"*"})]}),(0,r.jsx)(b.FormControl,{children:(0,r.jsx)(g.Input,{placeholder:"my_knowledge_base",...e})}),(0,r.jsx)(b.FormDescription,{children:"以字母开头,仅包含字母、数字和下划线,最长 64 字符"}),(0,r.jsx)(b.FormMessage,{})]})}),(0,r.jsx)(b.FormField,{control:a.control,name:"description",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"描述"}),(0,r.jsx)(b.FormControl,{children:(0,r.jsx)(h.Textarea,{placeholder:"描述这个知识库的用途...",className:"resize-none",rows:3,...e})}),(0,r.jsx)(b.FormMessage,{})]})}),(0,r.jsx)(b.FormField,{control:a.control,name:"tags",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"标签"}),(0,r.jsx)(b.FormControl,{children:(0,r.jsx)(F.TagInput,{value:e.value??[],onChange:e.onChange,placeholder:"输入标签后按回车"})}),(0,r.jsx)(b.FormMessage,{})]})}),(0,r.jsx)(b.FormField,{control:a.control,name:"subspace",render:({field:e})=>(0,r.jsxs)(b.FormItem,{className:"flex flex-row items-center justify-between gap-4 space-y-0 rounded-md border border-border p-3",children:[(0,r.jsxs)("div",{className:"space-y-0.5",children:[(0,r.jsx)(b.FormLabel,{className:"text-sm",children:"启用 Subspace"}),(0,r.jsx)(b.FormDescription,{className:"text-xs",children:"为该知识库开启子空间隔离,不同业务线的数据互不干扰"})]}),(0,r.jsx)(b.FormControl,{children:(0,r.jsx)(f,{checked:e.value??!1,onCheckedChange:e.onChange})})]})})]}),(0,r.jsxs)("section",{className:"space-y-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Metadata Schema"}),(0,r.jsx)(b.FormField,{control:a.control,name:"metadata",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormControl,{children:(0,r.jsx)(k,{value:e.value??[],onChange:e.onChange})}),(0,r.jsx)(b.FormMessage,{})]})})]}),(0,r.jsxs)(j.Collapsible,{children:[(0,r.jsx)(j.CollapsibleTrigger,{asChild:!0,children:(0,r.jsxs)(m.Button,{type:"button",variant:"ghost",className:"flex w-full items-center justify-between p-0 text-lg font-semibold hover:bg-transparent",children:["高级配置",(0,r.jsx)(d.ChevronDown,{className:"h-4 w-4 transition-transform duration-200 [[data-state=open]>&]:rotate-180"})]})}),(0,r.jsxs)(j.CollapsibleContent,{className:"mt-4 space-y-6",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("h4",{className:"text-base font-medium text-foreground",children:"Embedding 配置"}),(0,r.jsx)(T,{form:a})]}),(0,r.jsx)("hr",{className:"border-border"}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("h4",{className:"text-base font-medium text-foreground",children:"检索配置"}),(0,r.jsx)(b.FormField,{control:a.control,name:"retrievalConfiguration.searchType",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"搜索类型"}),(0,r.jsx)(b.FormControl,{children:(0,r.jsxs)(C.ToggleGroup,{type:"multiple",value:e.value??[],onValueChange:r=>{r?.length&&e.onChange(r)},className:"grid w-full grid-cols-2 gap-0 overflow-hidden rounded-lg border border-border bg-[hsl(var(--muted)/0.4)] p-0 sm:max-w-md",children:[(0,r.jsxs)(C.ToggleGroupItem,{value:"DENSE_VECTOR",className:"h-9 gap-1.5",children:[e.value?.includes("DENSE_VECTOR")&&(0,r.jsx)(c.Check,{className:"h-3.5 w-3.5 text-[hsl(var(--primary))]"}),"向量检索"]}),(0,r.jsxs)(C.ToggleGroupItem,{value:"FULL_TEXT",className:"h-9 gap-1.5",children:[e.value?.includes("FULL_TEXT")&&(0,r.jsx)(c.Check,{className:"h-3.5 w-3.5 text-[hsl(var(--primary))]"}),"全文检索"]})]})}),(0,r.jsx)(b.FormMessage,{})]})}),(0,r.jsx)(b.FormField,{control:a.control,name:"retrievalConfiguration.rerankingConfiguration.numberOfResults",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"返回数量 (Top K)"}),(0,r.jsx)(b.FormControl,{children:(0,r.jsx)(g.Input,{type:"number",placeholder:"20",...e,value:e.value??"",onChange:r=>e.onChange(r.target.value?Number(r.target.value):void 0)})}),(0,r.jsx)(b.FormMessage,{})]})}),(0,r.jsx)(b.FormField,{control:a.control,name:"retrievalConfiguration.rerankingConfiguration.type",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"默认 Rerank 策略"}),(0,r.jsx)(b.FormControl,{children:(0,r.jsxs)(C.ToggleGroup,{type:"single",value:e.value??"",onValueChange:r=>{r&&e.onChange(r)},className:"grid w-full grid-cols-3 gap-0 overflow-hidden rounded-lg border border-border bg-[hsl(var(--muted)/0.4)] p-0 sm:max-w-md",children:[(0,r.jsx)(C.ToggleGroupItem,{value:"MODEL",className:"h-9",children:"Model"}),(0,r.jsx)(C.ToggleGroupItem,{value:"WEIGHT",className:"h-9",children:"Weight"}),(0,r.jsx)(C.ToggleGroupItem,{value:"RRF",className:"h-9",children:"RRF"})]})}),(0,r.jsx)(b.FormDescription,{className:"text-xs",children:"切换策略会影响检索时的默认行为;下方三套参数都会保存到知识库,方便临时切换"}),(0,r.jsx)(b.FormMessage,{})]})}),(0,r.jsxs)("div",{className:p("RRF"===x),children:[(0,r.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"RRF 参数"}),(0,r.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,r.jsx)(b.FormField,{control:a.control,name:"retrievalConfiguration.rerankingConfiguration.rrfConfiguration.denseVectorSearchWeight",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"向量检索权重"}),(0,r.jsx)(b.FormControl,{children:(0,r.jsx)(g.Input,{type:"number",step:"0.1",placeholder:"0.5",...e,value:e.value??"",onChange:(0,u.handleNumberInput)(e.onChange)})}),(0,r.jsx)(b.FormMessage,{})]})}),(0,r.jsx)(b.FormField,{control:a.control,name:"retrievalConfiguration.rerankingConfiguration.rrfConfiguration.fullTextSearchWeight",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"全文检索权重"}),(0,r.jsx)(b.FormControl,{children:(0,r.jsx)(g.Input,{type:"number",step:"0.1",placeholder:"0.5",...e,value:e.value??"",onChange:(0,u.handleNumberInput)(e.onChange)})}),(0,r.jsx)(b.FormMessage,{})]})}),(0,r.jsx)(b.FormField,{control:a.control,name:"retrievalConfiguration.rerankingConfiguration.rrfConfiguration.k",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"K 值"}),(0,r.jsx)(b.FormControl,{children:(0,r.jsx)(g.Input,{type:"number",placeholder:"60",...e,value:e.value??"",onChange:(0,u.handleNumberInput)(e.onChange)})}),(0,r.jsx)(b.FormMessage,{})]})})]})]}),(0,r.jsxs)("div",{className:p("WEIGHT"===x),children:[(0,r.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Weight 参数"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsx)(b.FormField,{control:a.control,name:"retrievalConfiguration.rerankingConfiguration.weightConfiguration.denseVectorSearchWeight",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"向量检索权重"}),(0,r.jsx)(b.FormControl,{children:(0,r.jsx)(g.Input,{type:"number",step:"0.1",min:"0",max:"1",placeholder:"0.5",...e,value:e.value??"",onChange:(0,u.handleNumberInput)(e.onChange)})}),(0,r.jsx)(b.FormDescription,{children:"0 ~ 1 之间"}),(0,r.jsx)(b.FormMessage,{})]})}),(0,r.jsx)(b.FormField,{control:a.control,name:"retrievalConfiguration.rerankingConfiguration.weightConfiguration.fullTextSearchWeight",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"全文检索权重"}),(0,r.jsx)(b.FormControl,{children:(0,r.jsx)(g.Input,{type:"number",step:"0.1",min:"0",max:"1",placeholder:"0.5",...e,value:e.value??"",onChange:(0,u.handleNumberInput)(e.onChange)})}),(0,r.jsx)(b.FormDescription,{children:"0 ~ 1 之间"}),(0,r.jsx)(b.FormMessage,{})]})})]})]}),(0,r.jsxs)("div",{className:p("MODEL"===x),children:[(0,r.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Model 参数"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsx)(b.FormField,{control:a.control,name:"retrievalConfiguration.rerankingConfiguration.modelConfiguration.provider",render:({field:e})=>(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"提供方"}),(0,r.jsxs)(v.Select,{onValueChange:e.onChange,value:e.value??"",children:[(0,r.jsx)(b.FormControl,{children:(0,r.jsx)(v.SelectTrigger,{children:(0,r.jsx)(v.SelectValue,{placeholder:"选择提供方"})})}),(0,r.jsx)(v.SelectContent,{children:(0,r.jsx)(v.SelectItem,{value:"bailian",children:"百炼 (Bailian)"})})]}),(0,r.jsx)(b.FormMessage,{})]})}),(0,r.jsx)(b.FormField,{control:a.control,name:"retrievalConfiguration.rerankingConfiguration.modelConfiguration.model",render:({field:e})=>{let n=a.watch("retrievalConfiguration.rerankingConfiguration.modelConfiguration.provider");return(0,r.jsxs)(b.FormItem,{children:[(0,r.jsx)(b.FormLabel,{children:"模型名称"}),(0,r.jsx)(b.FormControl,{children:"bailian"===n?(0,r.jsxs)(v.Select,{onValueChange:e.onChange,value:e.value??"",children:[(0,r.jsx)(v.SelectTrigger,{children:(0,r.jsx)(v.SelectValue,{placeholder:"选择模型"})}),(0,r.jsxs)(v.SelectContent,{children:[(0,r.jsx)(v.SelectItem,{value:"gte-rerank-v2",children:"gte-rerank-v2"}),(0,r.jsx)(v.SelectItem,{value:"qwen3-rerank",children:"qwen3-rerank"})]})]}):(0,r.jsx)(g.Input,{placeholder:"输入模型名称",...e,value:e.value??""})}),(0,r.jsx)(b.FormMessage,{})]})}})]})]})]})]})]}),(0,r.jsxs)("div",{className:"flex justify-end gap-3 pt-4 border-t",children:[(0,r.jsx)(m.Button,{type:"button",variant:"outline",onClick:()=>n.back(),children:"取消"}),(0,r.jsx)(m.Button,{type:"submit",disabled:t.isPending,children:t.isPending?"创建中...":"创建知识库"})]})]})})}e.s(["default",0,function(){return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)(n.default,{href:"/knowledge-base",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors mb-4",children:[(0,r.jsx)(t.ArrowLeft,{className:"h-4 w-4"}),"返回知识库列表"]}),(0,r.jsx)(a.PageHeader,{title:"创建知识库"})]}),(0,r.jsx)("div",{className:"max-w-2xl",children:(0,r.jsx)(V,{})})]})}],8897)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3106,96359,e=>{"use strict";var r=e.i(44501),a=e.i(17635),n=e.i(43250),t=e.i(80939),o=e.i(77275),l=e.i(91967),i=e.i(17256),s="Toggle",d=a.forwardRef((e,a)=>{let{pressed:n,defaultPressed:o,onPressedChange:d,...c}=e,[u,m]=(0,i.useControllableState)({prop:n,onChange:d,defaultProp:o??!1,caller:s});return(0,r.jsx)(t.Primitive.button,{type:"button","aria-pressed":u,"data-state":u?"on":"off","data-disabled":e.disabled?"":void 0,...c,ref:a,onClick:(0,l.composeEventHandlers)(e.onClick,()=>{e.disabled||m(!u)})})});d.displayName=s;var c=e.i(25486),u="ToggleGroup",[m,g]=(0,n.createContextScope)(u,[o.createRovingFocusGroupScope]),h=(0,o.createRovingFocusGroupScope)(),x=a.default.forwardRef((e,a)=>{let{type:n,...t}=e;if("single"===n)return(0,r.jsx)(b,{...t,ref:a});if("multiple"===n)return(0,r.jsx)(v,{...t,ref:a});throw Error(`Missing prop \`type\` expected on \`${u}\``)});x.displayName=u;var[f,p]=m(u),b=a.default.forwardRef((e,n)=>{let{value:t,defaultValue:o,onValueChange:l=()=>{},...s}=e,[d,c]=(0,i.useControllableState)({prop:t,defaultProp:o??"",onChange:l,caller:u});return(0,r.jsx)(f,{scope:e.__scopeToggleGroup,type:"single",value:a.default.useMemo(()=>d?[d]:[],[d]),onItemActivate:c,onItemDeactivate:a.default.useCallback(()=>c(""),[c]),children:(0,r.jsx)(y,{...s,ref:n})})}),v=a.default.forwardRef((e,n)=>{let{value:t,defaultValue:o,onValueChange:l=()=>{},...s}=e,[d,c]=(0,i.useControllableState)({prop:t,defaultProp:o??[],onChange:l,caller:u}),m=a.default.useCallback(e=>c((r=[])=>[...r,e]),[c]),g=a.default.useCallback(e=>c((r=[])=>r.filter(r=>r!==e)),[c]);return(0,r.jsx)(f,{scope:e.__scopeToggleGroup,type:"multiple",value:d,onItemActivate:m,onItemDeactivate:g,children:(0,r.jsx)(y,{...s,ref:n})})});x.displayName=u;var[j,C]=m(u),y=a.default.forwardRef((e,a)=>{let{__scopeToggleGroup:n,disabled:l=!1,rovingFocus:i=!0,orientation:s,dir:d,loop:u=!0,...m}=e,g=h(n),x=(0,c.useDirection)(d),f={role:"group",dir:x,...m};return(0,r.jsx)(j,{scope:n,rovingFocus:i,disabled:l,children:i?(0,r.jsx)(o.Root,{asChild:!0,...g,orientation:s,dir:x,loop:u,children:(0,r.jsx)(t.Primitive.div,{...f,ref:a})}):(0,r.jsx)(t.Primitive.div,{...f,ref:a})})}),N="ToggleGroupItem",F=a.default.forwardRef((e,n)=>{let t=p(N,e.__scopeToggleGroup),l=C(N,e.__scopeToggleGroup),i=h(e.__scopeToggleGroup),s=t.value.includes(e.value),d=l.disabled||e.disabled,c={...e,pressed:s,disabled:d},u=a.default.useRef(null);return l.rovingFocus?(0,r.jsx)(o.Item,{asChild:!0,...i,focusable:!d,active:s,ref:u,children:(0,r.jsx)(T,{...c,ref:n})}):(0,r.jsx)(T,{...c,ref:n})});F.displayName=N;var T=a.default.forwardRef((e,a)=>{let{__scopeToggleGroup:n,value:t,...o}=e,l=p(N,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s="single"===l.type?i:void 0;return(0,r.jsx)(d,{...s,...o,ref:a,onPressedChange:e=>{e?l.onItemActivate(t):l.onItemDeactivate(t)}})}),w=e.i(76490);let k=a.createContext({size:"default",variant:"default"}),R=a.forwardRef(({className:e,variant:a="default",size:n="default",children:t,...o},l)=>(0,r.jsx)(x,{ref:l,className:(0,w.cn)("inline-flex items-center justify-center gap-1",e),...o,children:(0,r.jsx)(k.Provider,{value:{variant:a,size:n},children:t})}));R.displayName=x.displayName;let S=a.forwardRef(({className:e,children:a,...n},t)=>(0,r.jsx)(F,{ref:t,className:(0,w.cn)("relative inline-flex items-center justify-center whitespace-nowrap","text-sm font-medium transition-all","first:rounded-l-[7px] last:rounded-r-[7px]","border-l border-[hsl(var(--border)/0.6)]","first:border-l-0","data-[state=on]:border-l-transparent","[&[data-state=on]+*]:border-l-transparent","ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","hover:bg-[hsl(var(--muted)/0.6)] hover:text-[hsl(var(--foreground))]","data-[state=on]:bg-[hsl(var(--background))] data-[state=on]:text-[hsl(var(--foreground))] data-[state=on]:shadow-sm",e),...n,children:a}));S.displayName=F.displayName,e.s(["ToggleGroup",0,R,"ToggleGroupItem",0,S],3106);var z=e.i(46398);e.s(["TagInput",0,function({value:e,onChange:n,placeholder:t="输入后按回车添加"}){let[o,l]=(0,a.useState)(""),i=(0,a.useCallback)(r=>{let a=r.trim();a&&!e.includes(a)&&n([...e,a]),l("")},[e,n]),s=(0,a.useCallback)(r=>{n(e.filter((e,a)=>a!==r))},[e,n]);return(0,r.jsxs)("div",{className:(0,w.cn)("flex flex-wrap items-center gap-1.5 rounded-md border border-[hsl(var(--input))] bg-background px-3 py-2","focus-within:border-[hsl(var(--ring))] focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-0","min-h-10 transition-colors"),children:[e.map((e,a)=>(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full border border-primary-200 bg-primary-100 px-2 py-0.5 text-xs font-medium text-primary-700",children:[e,(0,r.jsx)("button",{type:"button",onClick:()=>s(a),className:"inline-flex items-center justify-center rounded-full p-0.5 hover:opacity-70 transition-opacity","aria-label":`删除标签 ${e}`,children:(0,r.jsx)(z.X,{size:12})})]},`${e}-${a}`)),(0,r.jsx)("input",{type:"text",value:o,onChange:e=>l(e.target.value),onKeyDown:r=>{("Enter"===r.key||","===r.key)&&(r.preventDefault(),i(o)),"Backspace"===r.key&&""===o&&e.length>0&&s(e.length-1)},placeholder:0===e.length?t:"",className:"flex-1 min-w-20 bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]})}],96359)},22740,e=>{"use strict";var r=e.i(44501),a=e.i(17635),n=e.i(76490);let t=a.forwardRef(({className:e,...a},t)=>(0,r.jsx)("div",{className:"relative w-full overflow-auto",children:(0,r.jsx)("table",{ref:t,className:(0,n.cn)("w-full caption-bottom text-sm",e),...a})}));t.displayName="Table";let o=a.forwardRef(({className:e,...a},t)=>(0,r.jsx)("thead",{ref:t,className:(0,n.cn)("[&_tr]:border-b [&_tr]:border-[hsl(var(--border))] [&_tr]:bg-[hsl(var(--secondary))]",e),...a}));o.displayName="TableHeader";let l=a.forwardRef(({className:e,...a},t)=>(0,r.jsx)("tbody",{ref:t,className:(0,n.cn)("[&_tr:last-child]:border-0",e),...a}));l.displayName="TableBody",a.forwardRef(({className:e,...a},t)=>(0,r.jsx)("tfoot",{ref:t,className:(0,n.cn)("border-t border-[hsl(var(--border))] bg-[hsl(var(--secondary)/0.5)] font-medium [&>tr]:last:border-b-0",e),...a})).displayName="TableFooter";let i=a.forwardRef(({className:e,...a},t)=>(0,r.jsx)("tr",{ref:t,className:(0,n.cn)("border-b border-[hsl(var(--border-light))] transition-colors hover:bg-[hsl(var(--secondary)/0.5)] data-[state=selected]:bg-[hsl(var(--primary-soft))]",e),...a}));i.displayName="TableRow";let s=a.forwardRef(({className:e,...a},t)=>(0,r.jsx)("th",{ref:t,className:(0,n.cn)("h-9 px-3 text-left align-middle text-xs font-medium text-[hsl(var(--muted-foreground))] [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));s.displayName="TableHead";let d=a.forwardRef(({className:e,...a},t)=>(0,r.jsx)("td",{ref:t,className:(0,n.cn)("px-3 py-2 align-middle text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));d.displayName="TableCell",a.forwardRef(({className:e,...a},t)=>(0,r.jsx)("caption",{ref:t,className:(0,n.cn)("mt-4 text-sm text-[hsl(var(--muted-foreground))]",e),...a})).displayName="TableCaption",e.s(["Table",0,t,"TableBody",0,l,"TableCell",0,d,"TableHead",0,s,"TableHeader",0,o,"TableRow",0,i])},72238,7187,e=>{"use strict";e.s(["handleNumberInput",0,function(e){return r=>{e(r.target.value?Number(r.target.value):void 0)}}],72238);var r=e.i(32356);let a=r.z.enum(["string","long","double","boolean","date","string_list","long_list","double_list","boolean_list","date_list"]),n=r.z.object({name:r.z.string().min(1).max(128),type:a}),t=r.z.object({provider:r.z.enum(["bailian","custom"]),model:r.z.string().min(1),dimension:r.z.number().int().positive(),apiKey:r.z.string().optional(),url:r.z.string().url().optional()}),o=r.z.object({type:r.z.enum(["RRF","WEIGHT","MODEL"]),numberOfResults:r.z.number().int().positive().optional(),rrfConfiguration:r.z.object({denseVectorSearchWeight:r.z.number().min(0),fullTextSearchWeight:r.z.number().min(0),k:r.z.number().int().positive()}).optional(),weightConfiguration:r.z.object({denseVectorSearchWeight:r.z.number().min(0).max(1),fullTextSearchWeight:r.z.number().min(0).max(1)}).optional(),modelConfiguration:r.z.object({provider:r.z.string().min(1),model:r.z.string().min(1)}).optional()}),l=r.z.object({searchType:r.z.array(r.z.enum(["DENSE_VECTOR","FULL_TEXT"])).min(1).optional(),denseVectorSearchConfiguration:r.z.object({numberOfResults:r.z.number().int().positive()}).optional(),fullTextSearchConfiguration:r.z.object({numberOfResults:r.z.number().int().positive()}).optional(),rerankingConfiguration:o.optional()}),i=r.z.object({knowledgeBaseName:r.z.string().min(1,"Knowledge base name is required").max(64,"Name must be at most 64 characters").regex(/^[a-zA-Z][a-zA-Z0-9_-]{1,62}[a-zA-Z0-9]$/,"名称必须以字母开头,仅允许字母、数字、下划线和连字符,长度 3-64 字符,不能以下划线或连字符结尾"),description:r.z.string().max(4096).optional(),subspace:r.z.boolean().optional(),tags:r.z.array(r.z.string()).optional(),metadata:r.z.array(n).max(200).optional(),embeddingConfiguration:t.optional(),retrievalConfiguration:l.optional()}),s=r.z.object({knowledgeBaseName:r.z.string().min(1),description:r.z.string().max(4096).optional(),tags:r.z.array(r.z.string()).optional(),retrievalConfiguration:l.optional()});e.s(["createKBSchema",0,i,"updateKBSchema",0,s],7187)},25590,e=>{"use strict";var r=e.i(44501),a=e.i(65581),n=e.i(31211),t=e.i(42410),o=e.i(80883),l=e.i(88310),i=e.i(87014),s=e.i(6703),d=e.i(72238),c=e.i(42595),u=e.i(23888),m=e.i(45123),g=e.i(21562),h=e.i(66473),x=e.i(3106),f=e.i(22740),p=e.i(96359),b=e.i(37500),v=e.i(12984),j=e.i(58770),C=e.i(47570),y=e.i(7187);function N({knowledgeBase:e}){let a,n=(a=(0,v.useQueryClient)(),(0,b.useMutation)({mutationFn:e=>(0,j.updateKnowledgeBase)(e),onSuccess:()=>{(0,C.invalidateKnowledgeBaseQueries)(a)}})),t=(0,o.useForm)({resolver:(0,l.zodResolver)(y.updateKBSchema),defaultValues:{knowledgeBaseName:e.knowledgeBaseName,description:e.description??"",tags:e.tags??[],retrievalConfiguration:{searchType:e.retrievalConfiguration?.searchType??["DENSE_VECTOR"],rerankingConfiguration:{type:e.retrievalConfiguration?.rerankingConfiguration?.type??"RRF",numberOfResults:e.retrievalConfiguration?.rerankingConfiguration?.numberOfResults??5,rrfConfiguration:e.retrievalConfiguration?.rerankingConfiguration?.rrfConfiguration??{denseVectorSearchWeight:.6,fullTextSearchWeight:.4,k:60},weightConfiguration:e.retrievalConfiguration?.rerankingConfiguration?.weightConfiguration??{denseVectorSearchWeight:.7,fullTextSearchWeight:.3},modelConfiguration:e.retrievalConfiguration?.rerankingConfiguration?.modelConfiguration??{provider:"bailian",model:"gte-rerank-v2"}}}}}),T=t.watch("retrievalConfiguration.rerankingConfiguration.type"),w=e=>"space-y-4 rounded-md border p-4 transition-colors "+(e?"border-[hsl(var(--primary)/0.4)] bg-[hsl(var(--primary)/0.04)]":"border-[hsl(var(--border))] bg-[hsl(var(--background))]");async function k(e){try{let r={...e,retrievalConfiguration:e.retrievalConfiguration?{...e.retrievalConfiguration,rerankingConfiguration:e.retrievalConfiguration.rerankingConfiguration?{...e.retrievalConfiguration.rerankingConfiguration,numberOfResults:e.retrievalConfiguration.rerankingConfiguration.numberOfResults??5}:void 0}:void 0};await n.mutateAsync(r),i.toast.success("知识库设置已更新")}catch(r){let e=r instanceof Error?r.message:"更新设置失败";i.toast.error(e)}}let R=e.embeddingConfiguration,S=e.metadata??[];return(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsxs)("section",{className:"space-y-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"基本信息"}),(0,r.jsx)(g.Form,{...t,children:(0,r.jsxs)("form",{onSubmit:t.handleSubmit(k),className:"space-y-4",children:[(0,r.jsx)(g.FormField,{control:t.control,name:"description",render:({field:e})=>(0,r.jsxs)(g.FormItem,{children:[(0,r.jsx)(g.FormLabel,{children:"描述"}),(0,r.jsx)(g.FormControl,{children:(0,r.jsx)(m.Textarea,{placeholder:"描述这个知识库的用途...",className:"resize-none",rows:3,...e})}),(0,r.jsx)(g.FormMessage,{})]})}),(0,r.jsx)(g.FormField,{control:t.control,name:"tags",render:({field:e})=>(0,r.jsxs)(g.FormItem,{children:[(0,r.jsx)(g.FormLabel,{children:"标签"}),(0,r.jsx)(g.FormControl,{children:(0,r.jsx)(p.TagInput,{value:e.value??[],onChange:e.onChange,placeholder:"输入标签后按回车"})}),(0,r.jsx)(g.FormMessage,{})]})}),(0,r.jsxs)("div",{className:"space-y-4 pt-4 border-t border-[hsl(var(--border))]",children:[(0,r.jsx)("h4",{className:"text-sm font-medium",children:"检索配置"}),(0,r.jsx)(g.FormField,{control:t.control,name:"retrievalConfiguration.searchType",render:({field:e})=>(0,r.jsxs)(g.FormItem,{children:[(0,r.jsx)(g.FormLabel,{children:"搜索类型"}),(0,r.jsx)(g.FormControl,{children:(0,r.jsxs)(x.ToggleGroup,{type:"multiple",value:e.value??[],onValueChange:r=>{r?.length&&e.onChange(r)},className:"grid w-full grid-cols-2 gap-0 overflow-hidden rounded-lg border border-border bg-[hsl(var(--muted)/0.4)] p-0 sm:max-w-md",children:[(0,r.jsxs)(x.ToggleGroupItem,{value:"DENSE_VECTOR",className:"h-9 gap-1.5",children:[e.value?.includes("DENSE_VECTOR")&&(0,r.jsx)(s.Check,{className:"h-3.5 w-3.5 text-[hsl(var(--primary))]"}),"向量检索"]}),(0,r.jsxs)(x.ToggleGroupItem,{value:"FULL_TEXT",className:"h-9 gap-1.5",children:[e.value?.includes("FULL_TEXT")&&(0,r.jsx)(s.Check,{className:"h-3.5 w-3.5 text-[hsl(var(--primary))]"}),"全文检索"]})]})}),(0,r.jsx)(g.FormMessage,{})]})}),(0,r.jsx)(g.FormField,{control:t.control,name:"retrievalConfiguration.rerankingConfiguration.type",render:({field:e})=>(0,r.jsxs)(g.FormItem,{children:[(0,r.jsx)(g.FormLabel,{children:"Rerank 策略"}),(0,r.jsx)(g.FormControl,{children:(0,r.jsxs)(x.ToggleGroup,{type:"single",value:e.value??"",onValueChange:r=>{r&&e.onChange(r)},className:"grid w-full grid-cols-3 gap-0 overflow-hidden rounded-lg border border-border bg-[hsl(var(--muted)/0.4)] p-0 sm:max-w-md",children:[(0,r.jsx)(x.ToggleGroupItem,{value:"MODEL",className:"h-9",children:"Model"}),(0,r.jsx)(x.ToggleGroupItem,{value:"WEIGHT",className:"h-9",children:"Weight"}),(0,r.jsx)(x.ToggleGroupItem,{value:"RRF",className:"h-9",children:"RRF"})]})}),(0,r.jsx)(g.FormMessage,{})]})}),(0,r.jsxs)("div",{className:w("RRF"===T),children:[(0,r.jsx)("p",{className:"text-sm font-medium text-[hsl(var(--muted-foreground))]",children:"RRF 参数"}),(0,r.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,r.jsx)(g.FormField,{control:t.control,name:"retrievalConfiguration.rerankingConfiguration.rrfConfiguration.denseVectorSearchWeight",render:({field:e})=>(0,r.jsxs)(g.FormItem,{children:[(0,r.jsx)(g.FormLabel,{children:"向量检索权重"}),(0,r.jsx)(g.FormControl,{children:(0,r.jsx)(u.Input,{type:"number",step:"0.1",placeholder:"0.6",...e,value:e.value??"",onChange:(0,d.handleNumberInput)(e.onChange)})}),(0,r.jsx)(g.FormMessage,{})]})}),(0,r.jsx)(g.FormField,{control:t.control,name:"retrievalConfiguration.rerankingConfiguration.rrfConfiguration.fullTextSearchWeight",render:({field:e})=>(0,r.jsxs)(g.FormItem,{children:[(0,r.jsx)(g.FormLabel,{children:"全文检索权重"}),(0,r.jsx)(g.FormControl,{children:(0,r.jsx)(u.Input,{type:"number",step:"0.1",placeholder:"0.4",...e,value:e.value??"",onChange:(0,d.handleNumberInput)(e.onChange)})}),(0,r.jsx)(g.FormMessage,{})]})}),(0,r.jsx)(g.FormField,{control:t.control,name:"retrievalConfiguration.rerankingConfiguration.rrfConfiguration.k",render:({field:e})=>(0,r.jsxs)(g.FormItem,{children:[(0,r.jsx)(g.FormLabel,{children:"K 值"}),(0,r.jsx)(g.FormControl,{children:(0,r.jsx)(u.Input,{type:"number",placeholder:"60",...e,value:e.value??"",onChange:(0,d.handleNumberInput)(e.onChange)})}),(0,r.jsx)(g.FormMessage,{})]})})]})]}),(0,r.jsxs)("div",{className:w("WEIGHT"===T),children:[(0,r.jsx)("p",{className:"text-sm font-medium text-[hsl(var(--muted-foreground))]",children:"Weight 参数"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsx)(g.FormField,{control:t.control,name:"retrievalConfiguration.rerankingConfiguration.weightConfiguration.denseVectorSearchWeight",render:({field:e})=>(0,r.jsxs)(g.FormItem,{children:[(0,r.jsx)(g.FormLabel,{children:"向量检索权重"}),(0,r.jsx)(g.FormControl,{children:(0,r.jsx)(u.Input,{type:"number",step:"0.1",min:"0",max:"1",placeholder:"0.7",...e,value:e.value??"",onChange:(0,d.handleNumberInput)(e.onChange)})}),(0,r.jsx)(g.FormMessage,{})]})}),(0,r.jsx)(g.FormField,{control:t.control,name:"retrievalConfiguration.rerankingConfiguration.weightConfiguration.fullTextSearchWeight",render:({field:e})=>(0,r.jsxs)(g.FormItem,{children:[(0,r.jsx)(g.FormLabel,{children:"全文检索权重"}),(0,r.jsx)(g.FormControl,{children:(0,r.jsx)(u.Input,{type:"number",step:"0.1",min:"0",max:"1",placeholder:"0.3",...e,value:e.value??"",onChange:(0,d.handleNumberInput)(e.onChange)})}),(0,r.jsx)(g.FormMessage,{})]})})]})]}),(0,r.jsxs)("div",{className:w("MODEL"===T),children:[(0,r.jsx)("p",{className:"text-sm font-medium text-[hsl(var(--muted-foreground))]",children:"Model 参数"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsx)(g.FormField,{control:t.control,name:"retrievalConfiguration.rerankingConfiguration.modelConfiguration.provider",render:({field:e})=>(0,r.jsxs)(g.FormItem,{children:[(0,r.jsx)(g.FormLabel,{children:"提供方"}),(0,r.jsxs)(h.Select,{onValueChange:e.onChange,value:e.value??"",children:[(0,r.jsx)(g.FormControl,{children:(0,r.jsx)(h.SelectTrigger,{children:(0,r.jsx)(h.SelectValue,{placeholder:"选择提供方"})})}),(0,r.jsx)(h.SelectContent,{children:(0,r.jsx)(h.SelectItem,{value:"bailian",children:"百炼 (Bailian)"})})]}),(0,r.jsx)(g.FormMessage,{})]})}),(0,r.jsx)(g.FormField,{control:t.control,name:"retrievalConfiguration.rerankingConfiguration.modelConfiguration.model",render:({field:e})=>{let a=t.watch("retrievalConfiguration.rerankingConfiguration.modelConfiguration.provider");return(0,r.jsxs)(g.FormItem,{children:[(0,r.jsx)(g.FormLabel,{children:"模型名称"}),(0,r.jsx)(g.FormControl,{children:"bailian"===a?(0,r.jsxs)(h.Select,{onValueChange:e.onChange,value:e.value??"",children:[(0,r.jsx)(h.SelectTrigger,{children:(0,r.jsx)(h.SelectValue,{placeholder:"选择模型"})}),(0,r.jsxs)(h.SelectContent,{children:[(0,r.jsx)(h.SelectItem,{value:"gte-rerank-v2",children:"gte-rerank-v2"}),(0,r.jsx)(h.SelectItem,{value:"qwen3-rerank",children:"qwen3-rerank"})]})]}):(0,r.jsx)(u.Input,{placeholder:"输入模型名称",...e,value:e.value??""})}),(0,r.jsx)(g.FormMessage,{})]})}})]})]})]}),(0,r.jsx)("div",{className:"flex justify-end pt-2",children:(0,r.jsx)(c.Button,{type:"submit",disabled:n.isPending,children:n.isPending?"保存中...":"保存更改"})})]})})]}),(0,r.jsxs)("section",{className:"space-y-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Embedding 配置"}),(0,r.jsxs)("div",{className:"rounded-lg border border-[hsl(var(--border))] p-4 space-y-3 bg-[hsl(var(--muted))]/30",children:[(0,r.jsx)(F,{label:"提供方",value:R?.provider==="bailian"?"百炼 (Bailian)":"自定义 (Custom)"}),(0,r.jsx)(F,{label:"模型",value:R?.model??"—"}),(0,r.jsx)(F,{label:"维度",value:R?.dimension?.toString()??"—"}),R?.provider==="custom"&&R?.url&&(0,r.jsx)(F,{label:"API URL",value:R.url})]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"Embedding 配置在创建后不可修改"})]}),(0,r.jsxs)("section",{className:"space-y-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Metadata Schema"}),S.length>0?(0,r.jsx)("div",{className:"rounded-lg border",children:(0,r.jsxs)(f.Table,{children:[(0,r.jsx)(f.TableHeader,{children:(0,r.jsxs)(f.TableRow,{children:[(0,r.jsx)(f.TableHead,{children:"字段名"}),(0,r.jsx)(f.TableHead,{children:"类型"})]})}),(0,r.jsx)(f.TableBody,{children:S.map(e=>(0,r.jsxs)(f.TableRow,{children:[(0,r.jsx)(f.TableCell,{className:"font-mono text-sm",children:e.name}),(0,r.jsx)(f.TableCell,{className:"text-sm text-muted-foreground",children:e.type})]},e.name))})]})}):(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"未定义 Metadata Schema"}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"Metadata Schema 在创建后不可修改"})]})]})}function F({label:e,value:a}){return(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-sm text-muted-foreground",children:e}),(0,r.jsx)("span",{className:"text-sm font-medium",children:a})]})}e.s(["default",0,function(){let e=decodeURIComponent((0,a.useParams)().name),{data:o,isLoading:l}=(0,t.useKnowledgeBase)(e);return l?(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)(n.Skeleton,{className:"h-8 w-48"}),(0,r.jsx)(n.Skeleton,{className:"h-32 w-full"}),(0,r.jsx)(n.Skeleton,{className:"h-32 w-full"})]}):o?(0,r.jsx)("div",{className:"space-y-8 max-w-2xl",children:(0,r.jsx)(N,{knowledgeBase:o})}):(0,r.jsx)("div",{className:"text-center py-12 text-[hsl(var(--muted-foreground))]",children:"知识库不存在"})}],25590)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70666,e=>{"use strict";var t=e.i(44501),s=e.i(65581),i=e.i(31211),r=e.i(65958),n=e.i(17635),a=e.i(87014),d=e.i(42595),c=e.i(66476),o=e.i(45123),l=e.i(37500),m=e.i(12984),u=e.i(64204),x=e.i(47570);function h({memoryStore:e}){let s,i=(s=(0,m.useQueryClient)(),(0,l.useMutation)({mutationFn:e=>(0,u.updateMemoryStore)(e),onSuccess:()=>{(0,x.invalidateMemoryQueries)(s)}})),[r,g]=(0,n.useState)(e.description??"");async function j(t){t.preventDefault();try{await i.mutateAsync({memoryStoreName:e.memoryStoreName,description:r.trim()||void 0}),a.toast.success("记忆库设置已更新")}catch(e){a.toast.error(e instanceof Error?e.message:"更新记忆库失败")}}return(0,t.jsxs)("form",{onSubmit:j,className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(c.Label,{htmlFor:"memory-settings-description",children:"描述"}),(0,t.jsx)(o.Textarea,{id:"memory-settings-description",value:r,onChange:e=>g(e.target.value),rows:5,placeholder:"描述这个记忆库的用途..."})]}),(0,t.jsx)(d.Button,{type:"submit",disabled:i.isPending,children:i.isPending?"保存中...":"保存设置"})]})}function g(e){if(!e)return"-";try{let t=new Date(e);if(isNaN(t.getTime()))return String(e);return t.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return String(e)}}e.s(["default",0,function(){let e=decodeURIComponent((0,s.useParams)().store),{data:n,isLoading:a}=(0,r.useMemoryStore)(e);return a?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(i.Skeleton,{className:"h-8 w-48"}),(0,t.jsx)(i.Skeleton,{className:"h-32 w-full"})]}):n?(0,t.jsxs)("div",{className:"max-w-2xl space-y-8",children:[(0,t.jsx)(h,{memoryStore:n}),(0,t.jsxs)("div",{className:"rounded-lg border p-4",children:[(0,t.jsx)("h3",{className:"mb-4 text-sm font-semibold",children:"记忆库信息"}),(0,t.jsxs)("dl",{className:"grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs text-muted-foreground",children:"OTS 实例"}),(0,t.jsx)("dd",{className:"mt-0.5 text-sm font-mono",children:n.otsInstance??"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs text-muted-foreground",children:"创建时间"}),(0,t.jsx)("dd",{className:"mt-0.5 text-sm",children:g(n.createdAt)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs text-muted-foreground",children:"更新时间"}),(0,t.jsx)("dd",{className:"mt-0.5 text-sm",children:g(n.updatedAt)})]})]})]})]}):(0,t.jsx)("div",{className:"py-12 text-center text-muted-foreground",children:"记忆库不存在"})}],70666)}]);
|