@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
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { useCallback, useSyncExternalStore } from "react";
|
|
3
|
+
import { useCallback, useMemo, useSyncExternalStore } from "react";
|
|
4
4
|
|
|
5
5
|
import type { ChatMessage } from "@/types/llm-chat";
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
/** Legacy global key kept for read-only migration. */
|
|
8
|
+
export const CHAT_HISTORY_LEGACY_STORAGE_KEY = "tsagent.chat.sessions.v1";
|
|
9
|
+
/** Backwards-compatible alias for older tests/imports. */
|
|
10
|
+
export const CHAT_HISTORY_STORAGE_KEY = CHAT_HISTORY_LEGACY_STORAGE_KEY;
|
|
11
|
+
/** v2 stores sessions under a project-scoped localStorage key. */
|
|
12
|
+
export const CHAT_HISTORY_STORAGE_KEY_PREFIX = "tsagent.chat.sessions.v2";
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
const UNBOUND_SCOPE = "unbound";
|
|
15
|
+
|
|
16
|
+
/** Soft cap on the number of retained sessions per project; the oldest ones
|
|
17
|
+
* are dropped on upsert to keep localStorage usage bounded. */
|
|
13
18
|
const MAX_SESSIONS = 50;
|
|
14
19
|
|
|
15
20
|
/** Upper bound on messages preserved per session. Long-running chats would
|
|
@@ -29,8 +34,8 @@ const TITLE_MAX_LENGTH = 24;
|
|
|
29
34
|
* NOTE: previous versions of this schema carried `retrievalConfiguration` and
|
|
30
35
|
* `topK` on each mount; both fields were dropped in favour of a single
|
|
31
36
|
* session-wide retrieval config, because per-mount scoring makes the global
|
|
32
|
-
* aggregate ranking meaningless. The
|
|
33
|
-
*
|
|
37
|
+
* aggregate ranking meaningless. The read path tolerates and migrates legacy
|
|
38
|
+
* entries silently. */
|
|
34
39
|
export interface ChatSessionMount {
|
|
35
40
|
id: string;
|
|
36
41
|
knowledgeBaseName: string;
|
|
@@ -70,54 +75,98 @@ export interface ChatSession {
|
|
|
70
75
|
id: string;
|
|
71
76
|
title: string;
|
|
72
77
|
updatedAt: number;
|
|
73
|
-
/** Active
|
|
74
|
-
* the user switches instances. */
|
|
78
|
+
/** Active project at the time of the save. `null` means raw-token/env mode. */
|
|
75
79
|
activeInstance?: string | null;
|
|
76
80
|
config: ChatSessionConfig;
|
|
77
81
|
messages: ChatMessage[];
|
|
78
82
|
}
|
|
79
83
|
|
|
84
|
+
export interface ChatHistoryScope {
|
|
85
|
+
activeInstance: string | null;
|
|
86
|
+
ready: boolean;
|
|
87
|
+
}
|
|
88
|
+
|
|
80
89
|
// ---------------------------------------------------------------------------
|
|
81
|
-
//
|
|
90
|
+
// Scope + migration helpers
|
|
82
91
|
// ---------------------------------------------------------------------------
|
|
83
92
|
|
|
84
|
-
function
|
|
93
|
+
function normalizeActiveInstance(activeInstance: string | null | undefined) {
|
|
94
|
+
return activeInstance && activeInstance.length > 0 ? activeInstance : null;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function scopeSuffix(activeInstance: string | null | undefined): string {
|
|
98
|
+
const normalized = normalizeActiveInstance(activeInstance);
|
|
99
|
+
return normalized ? `project.${encodeURIComponent(normalized)}` : UNBOUND_SCOPE;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function getChatHistoryStorageKey(
|
|
103
|
+
activeInstance: string | null | undefined,
|
|
104
|
+
): string {
|
|
105
|
+
return `${CHAT_HISTORY_STORAGE_KEY_PREFIX}.${scopeSuffix(activeInstance)}`;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function belongsToScope(
|
|
109
|
+
session: ChatSession,
|
|
110
|
+
activeInstance: string | null | undefined,
|
|
111
|
+
): boolean {
|
|
112
|
+
return (
|
|
113
|
+
normalizeActiveInstance(session.activeInstance) ===
|
|
114
|
+
normalizeActiveInstance(activeInstance)
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function sanitizeSessions(parsed: unknown): ChatSession[] {
|
|
119
|
+
if (!Array.isArray(parsed)) return [];
|
|
120
|
+
const sessions = parsed.filter(
|
|
121
|
+
(s): s is ChatSession =>
|
|
122
|
+
!!s &&
|
|
123
|
+
typeof s === "object" &&
|
|
124
|
+
typeof (s as ChatSession).id === "string" &&
|
|
125
|
+
Array.isArray((s as ChatSession).messages),
|
|
126
|
+
);
|
|
127
|
+
return sessions.map((s) => ({
|
|
128
|
+
...s,
|
|
129
|
+
activeInstance: normalizeActiveInstance(s.activeInstance),
|
|
130
|
+
config: {
|
|
131
|
+
...s.config,
|
|
132
|
+
mounts: (s.config?.mounts ?? []).map((m) => ({
|
|
133
|
+
id: m.id,
|
|
134
|
+
knowledgeBaseName: m.knowledgeBaseName,
|
|
135
|
+
...(m.subspace && m.subspace.length ? { subspace: m.subspace } : {}),
|
|
136
|
+
})),
|
|
137
|
+
},
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function readStorageKey(storageKey: string): ChatSession[] {
|
|
85
142
|
if (typeof window === "undefined") return [];
|
|
86
143
|
try {
|
|
87
|
-
const raw = window.localStorage.getItem(
|
|
144
|
+
const raw = window.localStorage.getItem(storageKey);
|
|
88
145
|
if (!raw) return [];
|
|
89
|
-
|
|
90
|
-
if (!Array.isArray(parsed)) return [];
|
|
91
|
-
// Defensive: filter out entries missing required fields, which can happen
|
|
92
|
-
// if an older schema leaked through.
|
|
93
|
-
const sessions = parsed.filter(
|
|
94
|
-
(s): s is ChatSession =>
|
|
95
|
-
!!s &&
|
|
96
|
-
typeof s === "object" &&
|
|
97
|
-
typeof (s as ChatSession).id === "string" &&
|
|
98
|
-
Array.isArray((s as ChatSession).messages),
|
|
99
|
-
);
|
|
100
|
-
// Migration (read-only, not persisted back): drop per-mount
|
|
101
|
-
// `retrievalConfiguration` and `topK` fields. These were stored by
|
|
102
|
-
// earlier builds and are no longer meaningful now that retrieval params
|
|
103
|
-
// live at the session level. The on-disk blob is only rewritten on the
|
|
104
|
-
// next `upsertSession`, so we avoid a thundering-herd write on load.
|
|
105
|
-
return sessions.map((s) => ({
|
|
106
|
-
...s,
|
|
107
|
-
config: {
|
|
108
|
-
...s.config,
|
|
109
|
-
mounts: (s.config?.mounts ?? []).map((m) => ({
|
|
110
|
-
id: m.id,
|
|
111
|
-
knowledgeBaseName: m.knowledgeBaseName,
|
|
112
|
-
...(m.subspace && m.subspace.length ? { subspace: m.subspace } : {}),
|
|
113
|
-
})),
|
|
114
|
-
},
|
|
115
|
-
}));
|
|
146
|
+
return sanitizeSessions(JSON.parse(raw));
|
|
116
147
|
} catch {
|
|
117
148
|
return [];
|
|
118
149
|
}
|
|
119
150
|
}
|
|
120
151
|
|
|
152
|
+
function migrateLegacyIfNeeded(activeInstance: string | null): void {
|
|
153
|
+
if (typeof window === "undefined") return;
|
|
154
|
+
const scopedKey = getChatHistoryStorageKey(activeInstance);
|
|
155
|
+
if (window.localStorage.getItem(scopedKey) !== null) return;
|
|
156
|
+
const migrated = readStorageKey(CHAT_HISTORY_LEGACY_STORAGE_KEY).filter((s) =>
|
|
157
|
+
belongsToScope(s, activeInstance),
|
|
158
|
+
);
|
|
159
|
+
if (migrated.length === 0) return;
|
|
160
|
+
writeStorageKey(scopedKey, migrated);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function readAll(activeInstance: string | null): ChatSession[] {
|
|
164
|
+
migrateLegacyIfNeeded(activeInstance);
|
|
165
|
+
return readStorageKey(getChatHistoryStorageKey(activeInstance)).filter((s) =>
|
|
166
|
+
belongsToScope(s, activeInstance),
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
121
170
|
function isQuotaError(err: unknown): boolean {
|
|
122
171
|
// Firefox uses `NS_ERROR_DOM_QUOTA_REACHED`, Safari/Chrome use
|
|
123
172
|
// `QuotaExceededError`; both surface as a DOMException with one of those
|
|
@@ -129,7 +178,16 @@ function isQuotaError(err: unknown): boolean {
|
|
|
129
178
|
);
|
|
130
179
|
}
|
|
131
180
|
|
|
132
|
-
function
|
|
181
|
+
function dispatchStorageEvent(storageKey: string): void {
|
|
182
|
+
if (typeof window === "undefined") return;
|
|
183
|
+
try {
|
|
184
|
+
window.dispatchEvent(new StorageEvent("storage", { key: storageKey }));
|
|
185
|
+
} catch {
|
|
186
|
+
window.dispatchEvent(new Event("storage"));
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function writeStorageKey(storageKey: string, sessions: ChatSession[]): void {
|
|
133
191
|
if (typeof window === "undefined") return;
|
|
134
192
|
// Try the full list first; on quota failure, progressively drop the
|
|
135
193
|
// oldest sessions and retry. We bottom out at the newest single session
|
|
@@ -139,12 +197,10 @@ function writeAll(sessions: ChatSession[]): void {
|
|
|
139
197
|
for (let attempt = 0; attempt < 3; attempt += 1) {
|
|
140
198
|
try {
|
|
141
199
|
const serialized = JSON.stringify(remaining);
|
|
142
|
-
window.localStorage.setItem(
|
|
200
|
+
window.localStorage.setItem(storageKey, serialized);
|
|
143
201
|
// Manually dispatch so same-tab subscribers react without relying on
|
|
144
202
|
// the native `storage` event, which only fires cross-tab.
|
|
145
|
-
|
|
146
|
-
new StorageEvent("storage", { key: CHAT_HISTORY_STORAGE_KEY }),
|
|
147
|
-
);
|
|
203
|
+
dispatchStorageEvent(storageKey);
|
|
148
204
|
return;
|
|
149
205
|
} catch (err) {
|
|
150
206
|
if (!isQuotaError(err) || remaining.length <= 1) {
|
|
@@ -154,13 +210,17 @@ function writeAll(sessions: ChatSession[]): void {
|
|
|
154
210
|
}
|
|
155
211
|
// Drop the oldest quarter and retry. `remaining` is assumed sorted
|
|
156
212
|
// newest-first by the caller (`upsertSession` trims and sorts
|
|
157
|
-
// before calling
|
|
213
|
+
// before calling writeStorageKey).
|
|
158
214
|
const keep = Math.max(1, Math.floor(remaining.length * 0.75));
|
|
159
215
|
remaining = remaining.slice(0, keep);
|
|
160
216
|
}
|
|
161
217
|
}
|
|
162
218
|
}
|
|
163
219
|
|
|
220
|
+
function writeAll(activeInstance: string | null, sessions: ChatSession[]): void {
|
|
221
|
+
writeStorageKey(getChatHistoryStorageKey(activeInstance), sessions);
|
|
222
|
+
}
|
|
223
|
+
|
|
164
224
|
// ---------------------------------------------------------------------------
|
|
165
225
|
// Pure helpers
|
|
166
226
|
// ---------------------------------------------------------------------------
|
|
@@ -176,26 +236,38 @@ export function deriveSessionTitle(messages: ChatMessage[]): string {
|
|
|
176
236
|
: clean;
|
|
177
237
|
}
|
|
178
238
|
|
|
179
|
-
export function listSessions(
|
|
239
|
+
export function listSessions(
|
|
240
|
+
activeInstance: string | null | undefined,
|
|
241
|
+
): ChatSession[] {
|
|
180
242
|
// Always return sorted by updatedAt desc so the sidebar can render directly.
|
|
181
|
-
return readAll().sort(
|
|
243
|
+
return readAll(normalizeActiveInstance(activeInstance)).sort(
|
|
244
|
+
(a, b) => b.updatedAt - a.updatedAt,
|
|
245
|
+
);
|
|
182
246
|
}
|
|
183
247
|
|
|
184
|
-
export function getSession(
|
|
185
|
-
|
|
248
|
+
export function getSession(
|
|
249
|
+
id: string,
|
|
250
|
+
activeInstance: string | null | undefined,
|
|
251
|
+
): ChatSession | null {
|
|
252
|
+
return listSessions(activeInstance).find((s) => s.id === id) ?? null;
|
|
186
253
|
}
|
|
187
254
|
|
|
188
|
-
export function upsertSession(
|
|
189
|
-
|
|
255
|
+
export function upsertSession(
|
|
256
|
+
session: ChatSession,
|
|
257
|
+
activeInstance: string | null | undefined,
|
|
258
|
+
): void {
|
|
259
|
+
const scope = normalizeActiveInstance(activeInstance);
|
|
260
|
+
const all = readAll(scope);
|
|
190
261
|
// Truncate the session's message list to the tail so a single runaway
|
|
191
262
|
// conversation cannot consume the whole localStorage budget.
|
|
263
|
+
const scopedSession = { ...session, activeInstance: scope };
|
|
192
264
|
const capped: ChatSession =
|
|
193
|
-
|
|
265
|
+
scopedSession.messages.length > MAX_MESSAGES_PER_SESSION
|
|
194
266
|
? {
|
|
195
|
-
...
|
|
196
|
-
messages:
|
|
267
|
+
...scopedSession,
|
|
268
|
+
messages: scopedSession.messages.slice(-MAX_MESSAGES_PER_SESSION),
|
|
197
269
|
}
|
|
198
|
-
:
|
|
270
|
+
: scopedSession;
|
|
199
271
|
const idx = all.findIndex((s) => s.id === capped.id);
|
|
200
272
|
if (idx >= 0) {
|
|
201
273
|
all[idx] = capped;
|
|
@@ -206,16 +278,22 @@ export function upsertSession(session: ChatSession): void {
|
|
|
206
278
|
const trimmed = all
|
|
207
279
|
.sort((a, b) => b.updatedAt - a.updatedAt)
|
|
208
280
|
.slice(0, MAX_SESSIONS);
|
|
209
|
-
writeAll(trimmed);
|
|
281
|
+
writeAll(scope, trimmed);
|
|
210
282
|
}
|
|
211
283
|
|
|
212
|
-
export function deleteSession(
|
|
213
|
-
|
|
214
|
-
|
|
284
|
+
export function deleteSession(
|
|
285
|
+
id: string,
|
|
286
|
+
activeInstance: string | null | undefined,
|
|
287
|
+
): void {
|
|
288
|
+
const scope = normalizeActiveInstance(activeInstance);
|
|
289
|
+
const all = readAll(scope).filter((s) => s.id !== id);
|
|
290
|
+
writeAll(scope, all);
|
|
215
291
|
}
|
|
216
292
|
|
|
217
|
-
export function clearAllSessions(
|
|
218
|
-
|
|
293
|
+
export function clearAllSessions(
|
|
294
|
+
activeInstance: string | null | undefined,
|
|
295
|
+
): void {
|
|
296
|
+
writeAll(normalizeActiveInstance(activeInstance), []);
|
|
219
297
|
}
|
|
220
298
|
|
|
221
299
|
// ---------------------------------------------------------------------------
|
|
@@ -223,42 +301,44 @@ export function clearAllSessions(): void {
|
|
|
223
301
|
// ---------------------------------------------------------------------------
|
|
224
302
|
|
|
225
303
|
type Listener = () => void;
|
|
226
|
-
const listeners = new Set<Listener>();
|
|
227
304
|
|
|
228
|
-
function
|
|
229
|
-
|
|
305
|
+
function subscribeToStorageKey(
|
|
306
|
+
storageKey: string | null,
|
|
307
|
+
listener: Listener,
|
|
308
|
+
): () => void {
|
|
309
|
+
if (!storageKey || typeof window === "undefined") return () => {};
|
|
230
310
|
const handler = (event: StorageEvent) => {
|
|
231
|
-
if (event.key && event.key !==
|
|
311
|
+
if (event.key && event.key !== storageKey) return;
|
|
232
312
|
listener();
|
|
233
313
|
};
|
|
234
|
-
|
|
235
|
-
window.addEventListener("storage", handler);
|
|
236
|
-
}
|
|
314
|
+
window.addEventListener("storage", handler);
|
|
237
315
|
return () => {
|
|
238
|
-
|
|
239
|
-
if (typeof window !== "undefined") {
|
|
240
|
-
window.removeEventListener("storage", handler);
|
|
241
|
-
}
|
|
316
|
+
window.removeEventListener("storage", handler);
|
|
242
317
|
};
|
|
243
318
|
}
|
|
244
319
|
|
|
245
|
-
// Cache
|
|
246
|
-
// reference when nothing changed
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
if (
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
320
|
+
// Cache snapshots per storage key so `useSyncExternalStore` can return a
|
|
321
|
+
// stable reference when nothing changed.
|
|
322
|
+
const snapshotCache = new Map<string, { raw: string; snapshot: ChatSession[] }>();
|
|
323
|
+
const EMPTY_SESSIONS: ChatSession[] = [];
|
|
324
|
+
|
|
325
|
+
function getSnapshotFor(
|
|
326
|
+
activeInstance: string | null,
|
|
327
|
+
ready: boolean,
|
|
328
|
+
): ChatSession[] {
|
|
329
|
+
if (!ready || typeof window === "undefined") return EMPTY_SESSIONS;
|
|
330
|
+
migrateLegacyIfNeeded(activeInstance);
|
|
331
|
+
const storageKey = getChatHistoryStorageKey(activeInstance);
|
|
332
|
+
const raw = window.localStorage.getItem(storageKey) ?? "";
|
|
333
|
+
const cached = snapshotCache.get(storageKey);
|
|
334
|
+
if (cached?.raw === raw) return cached.snapshot;
|
|
335
|
+
const snapshot = listSessions(activeInstance);
|
|
336
|
+
snapshotCache.set(storageKey, { raw, snapshot });
|
|
337
|
+
return snapshot;
|
|
258
338
|
}
|
|
259
339
|
|
|
260
340
|
function getServerSnapshot(): ChatSession[] {
|
|
261
|
-
return
|
|
341
|
+
return EMPTY_SESSIONS;
|
|
262
342
|
}
|
|
263
343
|
|
|
264
344
|
export interface UseChatHistoryResult {
|
|
@@ -269,19 +349,52 @@ export interface UseChatHistoryResult {
|
|
|
269
349
|
get(id: string): ChatSession | null;
|
|
270
350
|
}
|
|
271
351
|
|
|
272
|
-
export function useChatHistory(): UseChatHistoryResult {
|
|
273
|
-
const
|
|
352
|
+
export function useChatHistory(scope: ChatHistoryScope): UseChatHistoryResult {
|
|
353
|
+
const activeInstance = normalizeActiveInstance(scope.activeInstance);
|
|
354
|
+
const storageKey = scope.ready
|
|
355
|
+
? getChatHistoryStorageKey(activeInstance)
|
|
356
|
+
: null;
|
|
357
|
+
|
|
358
|
+
const subscribe = useCallback(
|
|
359
|
+
(listener: Listener) => subscribeToStorageKey(storageKey, listener),
|
|
360
|
+
[storageKey],
|
|
361
|
+
);
|
|
362
|
+
const getSnapshot = useCallback(
|
|
363
|
+
() => getSnapshotFor(activeInstance, scope.ready),
|
|
364
|
+
[activeInstance, scope.ready],
|
|
365
|
+
);
|
|
366
|
+
const sessions = useSyncExternalStore(
|
|
367
|
+
subscribe,
|
|
368
|
+
getSnapshot,
|
|
369
|
+
getServerSnapshot,
|
|
370
|
+
);
|
|
274
371
|
|
|
275
|
-
const upsert = useCallback(
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
372
|
+
const upsert = useCallback(
|
|
373
|
+
(session: ChatSession) => {
|
|
374
|
+
if (!scope.ready) return;
|
|
375
|
+
upsertSession(session, activeInstance);
|
|
376
|
+
},
|
|
377
|
+
[activeInstance, scope.ready],
|
|
378
|
+
);
|
|
379
|
+
const remove = useCallback(
|
|
380
|
+
(id: string) => {
|
|
381
|
+
if (!scope.ready) return;
|
|
382
|
+
deleteSession(id, activeInstance);
|
|
383
|
+
},
|
|
384
|
+
[activeInstance, scope.ready],
|
|
385
|
+
);
|
|
281
386
|
const clear = useCallback(() => {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
387
|
+
if (!scope.ready) return;
|
|
388
|
+
clearAllSessions(activeInstance);
|
|
389
|
+
}, [activeInstance, scope.ready]);
|
|
390
|
+
const get = useCallback(
|
|
391
|
+
(id: string) =>
|
|
392
|
+
scope.ready ? getSession(id, activeInstance) : null,
|
|
393
|
+
[activeInstance, scope.ready],
|
|
394
|
+
);
|
|
285
395
|
|
|
286
|
-
return
|
|
396
|
+
return useMemo(
|
|
397
|
+
() => ({ sessions, upsert, remove, clear, get }),
|
|
398
|
+
[sessions, upsert, remove, clear, get],
|
|
399
|
+
);
|
|
287
400
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
2
2
|
import { createKnowledgeBase } from "@/services/knowledge-base";
|
|
3
3
|
import type { CreateKBRequest } from "@/types/knowledge-base";
|
|
4
|
+
import { invalidateKnowledgeBaseQueries } from "@/lib/query-keys";
|
|
4
5
|
|
|
5
6
|
export function useCreateKB() {
|
|
6
7
|
const queryClient = useQueryClient();
|
|
@@ -8,7 +9,7 @@ export function useCreateKB() {
|
|
|
8
9
|
return useMutation({
|
|
9
10
|
mutationFn: (request: CreateKBRequest) => createKnowledgeBase(request),
|
|
10
11
|
onSuccess: () => {
|
|
11
|
-
queryClient
|
|
12
|
+
invalidateKnowledgeBaseQueries(queryClient);
|
|
12
13
|
},
|
|
13
14
|
});
|
|
14
15
|
}
|
|
@@ -2,15 +2,14 @@ import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
|
2
2
|
|
|
3
3
|
import { createProvider } from "@/services/llm-providers";
|
|
4
4
|
import type { CreateLLMProviderInput } from "@/types/llm-provider";
|
|
5
|
-
|
|
6
|
-
import { LLM_PROVIDERS_QUERY_KEY } from "./use-llm-providers";
|
|
5
|
+
import { invalidateLLMProviderQueries } from "@/lib/query-keys";
|
|
7
6
|
|
|
8
7
|
export function useCreateLLMProvider() {
|
|
9
8
|
const queryClient = useQueryClient();
|
|
10
9
|
return useMutation({
|
|
11
10
|
mutationFn: (input: CreateLLMProviderInput) => createProvider(input),
|
|
12
11
|
onSuccess: () => {
|
|
13
|
-
queryClient
|
|
12
|
+
invalidateLLMProviderQueries(queryClient);
|
|
14
13
|
},
|
|
15
14
|
});
|
|
16
15
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
2
2
|
import { createMemoryStore } from "@/services/memory";
|
|
3
3
|
import type { CreateMemoryStoreRequest } from "@/types/memory";
|
|
4
|
+
import { invalidateMemoryQueries } from "@/lib/query-keys";
|
|
4
5
|
|
|
5
6
|
export function useCreateMemoryStore() {
|
|
6
7
|
const queryClient = useQueryClient();
|
|
@@ -8,7 +9,7 @@ export function useCreateMemoryStore() {
|
|
|
8
9
|
return useMutation({
|
|
9
10
|
mutationFn: (request: CreateMemoryStoreRequest) => createMemoryStore(request),
|
|
10
11
|
onSuccess: () => {
|
|
11
|
-
queryClient
|
|
12
|
+
invalidateMemoryQueries(queryClient);
|
|
12
13
|
},
|
|
13
14
|
});
|
|
14
15
|
}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
2
2
|
import { deleteDocuments } from "@/services/documents";
|
|
3
3
|
import type { DeleteDocumentsRequest } from "@/services/documents";
|
|
4
|
+
import { invalidateKnowledgeBaseQueries } from "@/lib/query-keys";
|
|
5
|
+
|
|
6
|
+
interface DeleteDocumentsVariables {
|
|
7
|
+
request: DeleteDocumentsRequest;
|
|
8
|
+
onProgress?: (completed: number, total: number) => void;
|
|
9
|
+
}
|
|
4
10
|
|
|
5
11
|
export function useDeleteDocuments() {
|
|
6
12
|
const queryClient = useQueryClient();
|
|
7
13
|
|
|
8
14
|
return useMutation({
|
|
9
|
-
mutationFn: (request:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
15
|
+
mutationFn: ({ request, onProgress }: DeleteDocumentsVariables) =>
|
|
16
|
+
deleteDocuments(request, onProgress),
|
|
17
|
+
onSuccess: () => {
|
|
18
|
+
invalidateKnowledgeBaseQueries(queryClient);
|
|
14
19
|
},
|
|
15
20
|
});
|
|
16
21
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
2
2
|
import { deleteKnowledgeBase } from "@/services/knowledge-base";
|
|
3
|
+
import { invalidateKnowledgeBaseQueries } from "@/lib/query-keys";
|
|
3
4
|
|
|
4
5
|
export function useDeleteKB() {
|
|
5
6
|
const queryClient = useQueryClient();
|
|
@@ -7,7 +8,7 @@ export function useDeleteKB() {
|
|
|
7
8
|
return useMutation({
|
|
8
9
|
mutationFn: (name: string) => deleteKnowledgeBase(name),
|
|
9
10
|
onSuccess: () => {
|
|
10
|
-
queryClient
|
|
11
|
+
invalidateKnowledgeBaseQueries(queryClient);
|
|
11
12
|
},
|
|
12
13
|
});
|
|
13
14
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
2
2
|
|
|
3
3
|
import { deleteProvider } from "@/services/llm-providers";
|
|
4
|
-
|
|
5
|
-
import { LLM_PROVIDERS_QUERY_KEY } from "./use-llm-providers";
|
|
4
|
+
import { invalidateLLMProviderQueries } from "@/lib/query-keys";
|
|
6
5
|
|
|
7
6
|
export function useDeleteLLMProvider() {
|
|
8
7
|
const queryClient = useQueryClient();
|
|
9
8
|
return useMutation({
|
|
10
9
|
mutationFn: (id: string) => deleteProvider(id),
|
|
11
10
|
onSuccess: () => {
|
|
12
|
-
queryClient
|
|
11
|
+
invalidateLLMProviderQueries(queryClient);
|
|
13
12
|
},
|
|
14
13
|
});
|
|
15
14
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
2
2
|
import { deleteMemoryStore } from "@/services/memory";
|
|
3
|
+
import { invalidateMemoryQueries } from "@/lib/query-keys";
|
|
3
4
|
|
|
4
5
|
export function useDeleteMemoryStore() {
|
|
5
6
|
const queryClient = useQueryClient();
|
|
@@ -7,7 +8,7 @@ export function useDeleteMemoryStore() {
|
|
|
7
8
|
return useMutation({
|
|
8
9
|
mutationFn: (memoryStoreName: string) => deleteMemoryStore(memoryStoreName),
|
|
9
10
|
onSuccess: () => {
|
|
10
|
-
queryClient
|
|
11
|
+
invalidateMemoryQueries(queryClient);
|
|
11
12
|
},
|
|
12
13
|
});
|
|
13
14
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
2
2
|
import { deleteMemoryUnit } from "@/services/memory";
|
|
3
3
|
import type { DeleteMemoryUnitRequest } from "@/types/memory";
|
|
4
|
+
import { invalidateMemoryQueries } from "@/lib/query-keys";
|
|
4
5
|
|
|
5
6
|
export function useDeleteMemoryUnit() {
|
|
6
7
|
const queryClient = useQueryClient();
|
|
7
8
|
|
|
8
9
|
return useMutation({
|
|
9
10
|
mutationFn: (request: DeleteMemoryUnitRequest) => deleteMemoryUnit(request),
|
|
10
|
-
onSuccess: (
|
|
11
|
-
queryClient
|
|
12
|
-
queryClient.invalidateQueries({ queryKey: ["memory", "stores", variables.memoryStoreName, "requests"] });
|
|
11
|
+
onSuccess: () => {
|
|
12
|
+
invalidateMemoryQueries(queryClient);
|
|
13
13
|
},
|
|
14
14
|
});
|
|
15
15
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { useQuery } from "@tanstack/react-query";
|
|
2
2
|
import { listDocuments } from "@/services/documents";
|
|
3
|
+
import { queryKeys } from "@/lib/query-keys";
|
|
4
|
+
import { useRuntimeContext } from "@/providers/runtime-context-provider";
|
|
3
5
|
|
|
4
6
|
export function useDocuments(
|
|
5
7
|
knowledgeBaseName: string,
|
|
@@ -10,18 +12,18 @@ export function useDocuments(
|
|
|
10
12
|
enabled?: boolean;
|
|
11
13
|
},
|
|
12
14
|
) {
|
|
15
|
+
const { context, ready } = useRuntimeContext();
|
|
13
16
|
const { nextToken, maxResults = 20, subspace, enabled = true } = options ?? {};
|
|
14
17
|
return useQuery({
|
|
15
|
-
queryKey:
|
|
16
|
-
|
|
18
|
+
queryKey: queryKeys.documents(
|
|
19
|
+
context.dataScopeKey,
|
|
17
20
|
knowledgeBaseName,
|
|
18
|
-
"documents",
|
|
19
21
|
nextToken,
|
|
20
22
|
maxResults,
|
|
21
23
|
subspace,
|
|
22
|
-
|
|
24
|
+
),
|
|
23
25
|
queryFn: () => listDocuments(knowledgeBaseName, { maxResults, nextToken, subspace }),
|
|
24
|
-
enabled: !!knowledgeBaseName && enabled,
|
|
26
|
+
enabled: ready && !!knowledgeBaseName && enabled,
|
|
25
27
|
staleTime: 30_000,
|
|
26
28
|
});
|
|
27
29
|
}
|