@tablestore/tablestore-agent-cli 0.2.11 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +3 -0
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +10 -11
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/memory-items.d.ts +3 -0
- package/dist/commands/memory-items.d.ts.map +1 -0
- package/dist/commands/memory-items.js +375 -0
- package/dist/commands/memory-items.js.map +1 -0
- package/dist/commands/memory.d.ts.map +1 -1
- package/dist/commands/memory.js +131 -196
- package/dist/commands/memory.js.map +1 -1
- package/dist/dashboard-runtime/dashboard/.next/BUILD_ID +1 -1
- package/dist/dashboard-runtime/dashboard/.next/app-path-routes-manifest.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/build-manifest.json +3 -3
- package/dist/dashboard-runtime/dashboard/.next/prerender-manifest.json +3 -3
- package/dist/dashboard-runtime/dashboard/.next/required-server-files.json +4 -4
- package/dist/dashboard-runtime/dashboard/.next/routes-manifest.json +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/api-keys/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/api-keys/page_client-reference-manifest.js +1 -1
- 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.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.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.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.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.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.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.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.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.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.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]/dream/[dreamId]/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/dream/[dreamId]/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/dream/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/dream/page_client-reference-manifest.js +1 -1
- 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.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.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.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.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]/tasks/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/tasks/page_client-reference-manifest.js +1 -1
- 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.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.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.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.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_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 +16 -16
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +16 -16
- 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 +11 -11
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
- 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/api-keys/[id]/custom-policy/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/custom-policy/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/effective-permissions/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/effective-permissions/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/policies/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/policies/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/filter-by-permission/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/filter-by-permission/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/status/route.js +1 -1
- 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 +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/token/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/token/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/token/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/use/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/use/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/connectivity/route/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/connectivity/route/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/connectivity/route/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/connectivity/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/connectivity/route.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/connectivity/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/connectivity/route_client-reference-manifest.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/chunks/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/chunks/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/upload/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/upload/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/retrieve/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/retrieve/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/chat/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/chat/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/models/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/models/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/test/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/test/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-kb-sync/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-kb-sync/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/actions/apply/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/actions/apply/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/actions/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/actions/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/cancel/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/cancel/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/[action]/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/[action]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/requests/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/requests/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/scopes/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/scopes/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/search/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/search/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/tasks/[requestId]/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/tasks/[requestId]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/tasks/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/tasks/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/[memoryId]/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/[memoryId]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.rsc +15 -15
- 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 +15 -15
- 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 +11 -11
- 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.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 +18 -18
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_full.segment.rsc +18 -18
- 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 +11 -11
- 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_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app-paths-manifest.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0e95__next-internal_server_app_api_v1_instances_connectivity_route_actions_0hc.k~w.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0n~ec7s.js +8 -8
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0-pbmiq._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0-wmyic._.js +40 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.li3cj._.js +40 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/{[root-of-the-server]__0w56nne._.js → [root-of-the-server]__0sa.9zr._.js} +6 -6
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0tc-.6s._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0y0w3mg._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0b1r_app_(dashboard)_knowledge-base_[name]_documents_documents-client_tsx_0g2uxmt._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0.ooo1s._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__07fsbff._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0b5cw4e._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0p1cst6._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0xza7lz._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0.6x0yu._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0.pa1e6._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_01snuz~._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0251rsp._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_02waf76._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06_hoj_._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0brqbty._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0csuit-._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0eps5jg._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ez3yia._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0k7q0ug._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0pwlb77._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0t.h859._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0thp9l5._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0_z9696._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0grv2wq._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{dashboard_src_0bhjp9s._.js → dashboard_src_0jrh7xy._.js} +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0x60pxf._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0y49vhd._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_10dsqx~._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_dream_[dreamId]_page_tsx_0wy3tv6._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_dream_page_tsx_0uzzpvs._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_layout_tsx_0rbi41w._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_memory_memory-files-browser_tsx_0o2~94-._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_i18n_i18n-context_tsx_0c39ewr._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0ymj2~2._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/functions-config-manifest.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/middleware-build-manifest.js +3 -3
- 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-xwobg-a6si1.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/01bokygf48bnj.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/04a.1c2rygy08.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/05.2q9f0yx4e_.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/09v-qczj__g1x.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{08nzc9sye_0~h.js → 0_8~9zgfm5f.8.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0_zw2y~vb_52n.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0a2f-mxepv-y7.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0jjiw-agnutux.js → 0amex7bwxnme9.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0apfhv-v7oy7u.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0bxt5icwb83xt.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0dpi1comd-thc.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{08h7wustf~cl4.js → 0eerrv808~6bh.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0j6agpotrd_n4.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jbcdgtcgqemd.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{01xcynczarvq~.js → 0jp7zmwvyv0bn.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k8mhea24d_kj.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0krt75we1wtcy.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0prl9yrb8ksp8.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{01xuyqw7ivp3n.js → 0r4azm.3hswcs.js} +3 -3
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0uj7ezedkm6ou.css +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x5qtkdg2trq9.js +5 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0zhfdjby7cj-q.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0~a4ig2x9z8uq.js → 13__t3s3ipfzl.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/16uky1ro-t_~9.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0hnqmb1a7y7x1.js → 18absak_u0d85.js} +3 -3
- package/dist/dashboard-runtime/dashboard/server.js +1 -1
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/dream/[dreamId]/page.tsx +187 -2
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/dream/page.tsx +14 -1
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/projects/page.tsx +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/instances/connectivity/route.ts +66 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/file-memory-curator.ts +57 -52
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/actions/apply/route.ts +39 -6
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/file-memory/[action]/route.ts +22 -28
- package/dist/dashboard-runtime/dashboard/src/app/onboarding/page.tsx +1 -3
- package/dist/dashboard-runtime/dashboard/src/components/chat/mount-picker.tsx +5 -1
- package/dist/dashboard-runtime/dashboard/src/components/instance/instance-connectivity-dot.tsx +96 -0
- package/dist/dashboard-runtime/dashboard/src/components/instance/project-card.tsx +5 -1
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/subspace-gate.tsx +23 -5
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/subspace-switcher.tsx +23 -5
- package/dist/dashboard-runtime/dashboard/src/components/layout/instance-switcher.tsx +13 -1
- package/dist/dashboard-runtime/dashboard/src/components/layout/sidebar-instance-card.tsx +29 -4
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-details-panel.tsx +4 -4
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-editor.tsx +9 -4
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-version-history.tsx +107 -57
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-dream-create-dialog.tsx +253 -68
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-dream-plan-approval-dialog.tsx +172 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-files-browser.tsx +104 -56
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-scope-bar.tsx +204 -52
- package/dist/dashboard-runtime/dashboard/src/components/memory/scope-combobox.tsx +169 -42
- package/dist/dashboard-runtime/dashboard/src/components/qa/qa-message.tsx +4 -3
- package/dist/dashboard-runtime/dashboard/src/components/shared/llm-model-selector.tsx +5 -1
- package/dist/dashboard-runtime/dashboard/src/components/ui/dialog.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/contexts/subspace-context.tsx +144 -30
- package/dist/dashboard-runtime/dashboard/src/hooks/use-approve-dream-plan.ts +25 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-file-memory.ts +73 -72
- package/dist/dashboard-runtime/dashboard/src/hooks/use-instances.ts +40 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-subspace-history.ts +64 -75
- package/dist/dashboard-runtime/dashboard/src/i18n/locales/en.ts +82 -7
- package/dist/dashboard-runtime/dashboard/src/i18n/locales/zh.ts +80 -7
- package/dist/dashboard-runtime/dashboard/src/lib/browser-file-memory.ts +31 -25
- package/dist/dashboard-runtime/dashboard/src/lib/memory-scope-history.ts +165 -0
- package/dist/dashboard-runtime/dashboard/src/lib/memory.ts +13 -0
- package/dist/dashboard-runtime/dashboard/src/lib/query-keys.ts +10 -14
- package/dist/dashboard-runtime/dashboard/src/lib/server/api-helpers.ts +5 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/instance-connectivity.ts +136 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/sdk-client.ts +25 -3
- package/dist/dashboard-runtime/dashboard/src/lib/subspace-history.ts +151 -0
- package/dist/dashboard-runtime/dashboard/src/services/file-memory.ts +48 -56
- package/dist/dashboard-runtime/dashboard/src/services/instances.ts +5 -0
- package/dist/dashboard-runtime/dashboard/src/services/memory.ts +45 -5
- package/dist/dashboard-runtime/dashboard/src/types/file-memory.ts +96 -43
- package/dist/dashboard-runtime/dashboard/src/types/instance.ts +17 -0
- package/dist/dashboard-runtime/dashboard/src/types/memory.ts +50 -3
- package/dist/dashboard-runtime/dashboard/tsconfig.tsbuildinfo +1 -1
- package/dist/dashboard-runtime/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
- package/dist/dashboard-runtime/node_modules/@img/{sharp-linux-x64 → sharp-darwin-arm64}/package.json +7 -13
- package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/README.md +2 -2
- package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/lib/glib-2.0/include/glibconfig.h +8 -9
- package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3 → sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib} +0 -0
- package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/package.json +5 -11
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +9 -55
- 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 +25 -93
- 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/response.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/response.js +4 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/response.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-sdk/package.json +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/main.js +0 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +9 -55
- 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 +25 -93
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/response.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/response.js +4 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/response.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/package.json +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0dzh4cj._.js +0 -40
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0k7ex0r._.js +0 -40
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__01f7est._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0cj2gsm._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_05bw0~2._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_071hi50._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0hy21o9._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0xrd8-1._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0y7vx.d._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_13ctfae._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0sr_ner._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-~e5~2eoun8n.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/029zyc1pxa~4m.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/05vzt~ml0z7~9.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/08o2~c-80nbla.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0_osn.dm_85jw.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0aj~rx1m.91ur.js +0 -5
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0dx_8pb_z_xy6.css +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k9guaejnlc0r.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ll488v66ycn1.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0pxisu-1mnehf.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0vn5pp.3keyh5.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0wbozn0wq-4ls.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/12iur8ibdfi5_.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/13kxz9vygidrz.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/165fwg-5at5cq.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/17b4md7atp39z.js +0 -1
- package/dist/dashboard-runtime/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.d.ts +0 -153
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.d.ts.map +0 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.js +0 -451
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.js.map +0 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.d.ts +0 -56
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.d.ts.map +0 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js +0 -120
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js.map +0 -1
- package/dist/dashboard-runtime/node_modules/semver/node_modules/.bin/semver +0 -21
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.d.ts +0 -153
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.d.ts.map +0 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.js +0 -451
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.js.map +0 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.d.ts +0 -56
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.d.ts.map +0 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js +0 -120
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js.map +0 -1
- /package/dist/dashboard-runtime/dashboard/.next/static/{AgybWIwFBY3-L1V2Copiq → 8G6beqTEKH_-N0JljpgWT}/_buildManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{AgybWIwFBY3-L1V2Copiq → 8G6beqTEKH_-N0JljpgWT}/_clientMiddlewareManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{AgybWIwFBY3-L1V2Copiq → 8G6beqTEKH_-N0JljpgWT}/_ssgManifest.js +0 -0
- /package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/lib/index.js +0 -0
- /package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/versions.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { useState } from "react";
|
|
3
|
+
import { useMemo, useState } from "react";
|
|
4
4
|
import { Check, ChevronsUpDown } from "lucide-react";
|
|
5
5
|
|
|
6
6
|
import { Button } from "@/components/ui/button";
|
|
@@ -18,8 +18,9 @@ import {
|
|
|
18
18
|
PopoverTrigger,
|
|
19
19
|
} from "@/components/ui/popover";
|
|
20
20
|
import { useAllMemoryStoreScopes } from "@/hooks/use-memory-store-scopes";
|
|
21
|
+
import { scopeLabel } from "@/lib/memory";
|
|
21
22
|
import { cn } from "@/lib/utils";
|
|
22
|
-
import { useI18n } from "@/i18n/i18n-context";
|
|
23
|
+
import { useI18n, type MessageKey } from "@/i18n/i18n-context";
|
|
23
24
|
import type { MemoryScope } from "@/types/memory";
|
|
24
25
|
|
|
25
26
|
const WILDCARD: MemoryScope = {
|
|
@@ -29,16 +30,77 @@ const WILDCARD: MemoryScope = {
|
|
|
29
30
|
runId: "*",
|
|
30
31
|
};
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
/** Stable identity so the memoized filter isn't invalidated every render. */
|
|
34
|
+
const NO_SCOPES: MemoryScope[] = [];
|
|
35
|
+
|
|
36
|
+
/** How many rows to render at once, and how many more each "show more" adds. */
|
|
37
|
+
export const SCOPE_WINDOW_SIZE = 100;
|
|
38
|
+
|
|
39
|
+
/** Distance from the bottom (px) at which scrolling grows the window. */
|
|
40
|
+
const NEAR_BOTTOM_PX = 64;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Case-insensitive substring match over the scope label, where every
|
|
44
|
+
* whitespace-separated term must hit somewhere — so `ots claude` narrows
|
|
45
|
+
* across two dimensions without caring about their order.
|
|
46
|
+
*
|
|
47
|
+
* We filter here rather than letting cmdk do it because cmdk's default is a
|
|
48
|
+
* fuzzy subsequence score, and run ids are uuids: almost any short query
|
|
49
|
+
* finds scattered hex characters in an unrelated tuple, so the "matches"
|
|
50
|
+
* drown out the real ones. Owning the filter also keeps DOM order equal to
|
|
51
|
+
* JSX order, which is what lets the window below stay correct.
|
|
52
|
+
*/
|
|
53
|
+
export function filterScopes(
|
|
54
|
+
scopes: readonly MemoryScope[],
|
|
55
|
+
query: string,
|
|
56
|
+
): MemoryScope[] {
|
|
57
|
+
const terms = query.toLowerCase().split(/\s+/).filter(Boolean);
|
|
58
|
+
if (terms.length === 0) return [...scopes];
|
|
59
|
+
return scopes.filter((scope) => {
|
|
60
|
+
const label = scopeLabel(scope).toLowerCase();
|
|
61
|
+
return terms.every((term) => label.includes(term));
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function isNearListBottom(el: {
|
|
66
|
+
scrollTop: number;
|
|
67
|
+
clientHeight: number;
|
|
68
|
+
scrollHeight: number;
|
|
69
|
+
}): boolean {
|
|
70
|
+
return el.scrollHeight - el.scrollTop - el.clientHeight <= NEAR_BOTTOM_PX;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Which message the status bar shows. Windowing and server-side truncation are
|
|
75
|
+
* independent and, on a big enough store, simultaneous — truncation in fact
|
|
76
|
+
* implies windowing — so they get a combined message rather than an either/or
|
|
77
|
+
* that would hide "· 已截断" in the one case it matters.
|
|
78
|
+
*/
|
|
79
|
+
export function scopeStatusKey(state: {
|
|
80
|
+
loading: boolean;
|
|
81
|
+
error: boolean;
|
|
82
|
+
hasMore: boolean;
|
|
83
|
+
truncated: boolean;
|
|
84
|
+
}): MessageKey {
|
|
85
|
+
if (state.loading) return "memory.common.querying";
|
|
86
|
+
if (state.error) return "memory.scopeCombobox.loadFailed";
|
|
87
|
+
if (state.hasMore) {
|
|
88
|
+
return state.truncated
|
|
89
|
+
? "memory.scopeCombobox.windowCountTruncated"
|
|
90
|
+
: "memory.scopeCombobox.windowCount";
|
|
91
|
+
}
|
|
92
|
+
return state.truncated
|
|
93
|
+
? "memory.common.scopeCountTruncated"
|
|
94
|
+
: "memory.common.scopeCount";
|
|
36
95
|
}
|
|
37
96
|
|
|
38
97
|
/**
|
|
39
98
|
* 通过 ListScopes 拉取某记忆库里真实存在的 scope 元组,供下拉选择。选中后回调
|
|
40
99
|
* `onPick(完整 scope)`,由上层决定填哪些字段。对话配置的记忆 scope、Dream 任务
|
|
41
100
|
* 的 scope 输入共用它,避免用户手动逐字段敲。
|
|
101
|
+
*
|
|
102
|
+
* scope 多起来时的三件事:列表本身要能滚(见下方 `modal` 注释)、一次只渲染
|
|
103
|
+
* 一屏窗口(滚到底或点「显示更多」再追加),以及搜索由本组件负责而不是 cmdk。
|
|
42
104
|
*/
|
|
43
105
|
export function ScopeCombobox({
|
|
44
106
|
memoryStoreName,
|
|
@@ -55,14 +117,44 @@ export function ScopeCombobox({
|
|
|
55
117
|
}) {
|
|
56
118
|
const { t } = useI18n();
|
|
57
119
|
const [open, setOpen] = useState(false);
|
|
58
|
-
const
|
|
59
|
-
const
|
|
120
|
+
const [search, setSearch] = useState("");
|
|
121
|
+
const [windowSize, setWindowSize] = useState(SCOPE_WINDOW_SIZE);
|
|
122
|
+
|
|
123
|
+
// 只在弹层打开时才查。Dream 创建对话框最多同时挂 20 个 ScopeCombobox,
|
|
124
|
+
// 抽屉/对话框一打开就全量拉 scope 是白花的往返。
|
|
125
|
+
const query = useAllMemoryStoreScopes(memoryStoreName ?? "", WILDCARD, {
|
|
126
|
+
enabled: open,
|
|
127
|
+
});
|
|
128
|
+
const scopes = query.data?.items ?? NO_SCOPES;
|
|
60
129
|
const truncated = query.data?.truncated ?? false;
|
|
61
130
|
const resolvedPlaceholder =
|
|
62
131
|
placeholder ?? t("memory.scopeCombobox.defaultPlaceholder");
|
|
63
132
|
|
|
133
|
+
const matches = useMemo(() => filterScopes(scopes, search), [scopes, search]);
|
|
134
|
+
const visible = matches.slice(0, windowSize);
|
|
135
|
+
const hasMore = visible.length < matches.length;
|
|
136
|
+
|
|
137
|
+
const showMore = () => setWindowSize((n) => n + SCOPE_WINDOW_SIZE);
|
|
138
|
+
|
|
139
|
+
const handleOpenChange = (next: boolean) => {
|
|
140
|
+
setOpen(next);
|
|
141
|
+
if (!next) {
|
|
142
|
+
setSearch("");
|
|
143
|
+
setWindowSize(SCOPE_WINDOW_SIZE);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
|
|
64
147
|
return (
|
|
65
|
-
|
|
148
|
+
// `modal` is load-bearing, not decoration. Both call sites live inside a
|
|
149
|
+
// Radix Dialog (the chat config Sheet / the Dream create dialog), whose
|
|
150
|
+
// overlay wraps everything in <RemoveScroll shards={[content]}> with no
|
|
151
|
+
// `noIsolation`. That cancels wheel events on any portalled node the
|
|
152
|
+
// dialog doesn't own — and PopoverContent portals to document.body, so
|
|
153
|
+
// the list silently refused to scroll and only the first ~10 rows were
|
|
154
|
+
// ever reachable. `modal` gives the popover its own scroll lock, which
|
|
155
|
+
// sits on top of react-remove-scroll's lockStack and hands scrolling
|
|
156
|
+
// back. See components/ui/__tests__/popover-in-dialog.test.ts.
|
|
157
|
+
<Popover open={open} onOpenChange={handleOpenChange} modal>
|
|
66
158
|
<PopoverTrigger asChild>
|
|
67
159
|
<Button
|
|
68
160
|
type="button"
|
|
@@ -76,28 +168,40 @@ export function ScopeCombobox({
|
|
|
76
168
|
</Button>
|
|
77
169
|
</PopoverTrigger>
|
|
78
170
|
<PopoverContent align="start" className="w-[420px] p-0">
|
|
79
|
-
<Command shouldFilter>
|
|
171
|
+
<Command shouldFilter={false}>
|
|
80
172
|
<CommandInput
|
|
81
173
|
placeholder={t("memory.common.searchScopePlaceholder")}
|
|
82
174
|
className="text-xs"
|
|
175
|
+
value={search}
|
|
176
|
+
onValueChange={(v) => {
|
|
177
|
+
setSearch(v);
|
|
178
|
+
setWindowSize(SCOPE_WINDOW_SIZE);
|
|
179
|
+
}}
|
|
83
180
|
/>
|
|
84
|
-
<CommandList
|
|
181
|
+
<CommandList
|
|
182
|
+
className="max-h-[min(52vh,420px)]"
|
|
183
|
+
onScroll={(e) => {
|
|
184
|
+
if (hasMore && isNearListBottom(e.currentTarget)) showMore();
|
|
185
|
+
}}
|
|
186
|
+
>
|
|
85
187
|
<CommandEmpty>
|
|
86
188
|
{query.isLoading
|
|
87
189
|
? t("common.loading")
|
|
88
|
-
:
|
|
190
|
+
: query.isError
|
|
191
|
+
? t("memory.scopeCombobox.loadFailed")
|
|
192
|
+
: search
|
|
193
|
+
? t("memory.common.noMatchingScope")
|
|
194
|
+
: t("memory.scopeCombobox.empty")}
|
|
89
195
|
</CommandEmpty>
|
|
90
|
-
{
|
|
196
|
+
{visible.length > 0 && (
|
|
197
|
+
// 标题只报命中数;服务端截断由状态条统一表达,避免「仅前 3 条」
|
|
198
|
+
// 这种把搜索命中数说成服务端上限的读法。
|
|
91
199
|
<CommandGroup
|
|
92
|
-
heading={
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
count: scopes.length,
|
|
96
|
-
})
|
|
97
|
-
: t("memory.common.knownScopes", { count: scopes.length })
|
|
98
|
-
}
|
|
200
|
+
heading={t("memory.common.knownScopes", {
|
|
201
|
+
count: matches.length,
|
|
202
|
+
})}
|
|
99
203
|
>
|
|
100
|
-
{
|
|
204
|
+
{visible.map((scope, idx) => {
|
|
101
205
|
const label = scopeLabel(scope);
|
|
102
206
|
return (
|
|
103
207
|
<CommandItem
|
|
@@ -105,7 +209,7 @@ export function ScopeCombobox({
|
|
|
105
209
|
value={label}
|
|
106
210
|
onSelect={() => {
|
|
107
211
|
onPick(scope);
|
|
108
|
-
|
|
212
|
+
handleOpenChange(false);
|
|
109
213
|
}}
|
|
110
214
|
className="text-xs"
|
|
111
215
|
>
|
|
@@ -119,27 +223,50 @@ export function ScopeCombobox({
|
|
|
119
223
|
</CommandGroup>
|
|
120
224
|
)}
|
|
121
225
|
</CommandList>
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
226
|
+
{/* 状态条留在 CommandList 之外:它不属于 [cmdk-list],因此永远不会
|
|
227
|
+
被搜索过滤掉或被 cmdk 的排序搬走。 */}
|
|
228
|
+
<div className="flex items-center justify-between gap-2 border-t border-[hsl(var(--border-light))] px-2 py-1.5 text-[10px] text-muted-foreground">
|
|
229
|
+
<span className="truncate">
|
|
230
|
+
{t(
|
|
231
|
+
scopeStatusKey({
|
|
232
|
+
loading: query.isLoading,
|
|
233
|
+
error: query.isError,
|
|
234
|
+
hasMore,
|
|
235
|
+
truncated,
|
|
236
|
+
}),
|
|
237
|
+
// 各 key 只会用到其中一部分占位符,多余的会被 interpolate 忽略。
|
|
238
|
+
{
|
|
239
|
+
shown: visible.length,
|
|
240
|
+
total: matches.length,
|
|
241
|
+
count: matches.length,
|
|
242
|
+
},
|
|
243
|
+
)}
|
|
244
|
+
</span>
|
|
245
|
+
<span className="flex shrink-0 items-center gap-1">
|
|
246
|
+
{hasMore ? (
|
|
247
|
+
<button
|
|
248
|
+
type="button"
|
|
249
|
+
onClick={(e) => {
|
|
250
|
+
e.preventDefault();
|
|
251
|
+
showMore();
|
|
252
|
+
}}
|
|
253
|
+
className="rounded px-1.5 py-0.5 font-medium text-[hsl(var(--primary))] hover:bg-[hsl(var(--accent))]"
|
|
254
|
+
>
|
|
255
|
+
{t("memory.scopeCombobox.showMore")}
|
|
256
|
+
</button>
|
|
257
|
+
) : null}
|
|
258
|
+
<button
|
|
259
|
+
type="button"
|
|
260
|
+
onClick={(e) => {
|
|
261
|
+
e.preventDefault();
|
|
262
|
+
query.refetch();
|
|
263
|
+
}}
|
|
264
|
+
disabled={query.isFetching}
|
|
265
|
+
className="rounded px-1.5 py-0.5 hover:bg-[hsl(var(--accent))] disabled:opacity-50"
|
|
266
|
+
>
|
|
267
|
+
{t("common.refresh")}
|
|
268
|
+
</button>
|
|
131
269
|
</span>
|
|
132
|
-
<button
|
|
133
|
-
type="button"
|
|
134
|
-
onClick={(e) => {
|
|
135
|
-
e.preventDefault();
|
|
136
|
-
query.refetch();
|
|
137
|
-
}}
|
|
138
|
-
disabled={query.isFetching}
|
|
139
|
-
className="rounded px-1.5 py-0.5 hover:bg-[hsl(var(--accent))] disabled:opacity-50"
|
|
140
|
-
>
|
|
141
|
-
{t("common.refresh")}
|
|
142
|
-
</button>
|
|
143
270
|
</div>
|
|
144
271
|
</Command>
|
|
145
272
|
</PopoverContent>
|
|
@@ -34,7 +34,7 @@ import { Textarea } from "@/components/ui/textarea";
|
|
|
34
34
|
import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";
|
|
35
35
|
import { ConfirmDialog } from "@/components/shared/confirm-dialog";
|
|
36
36
|
import { useI18n, type TranslateFn } from "@/i18n/i18n-context";
|
|
37
|
-
import {
|
|
37
|
+
import { useAddItem } from "@/hooks/use-file-memory";
|
|
38
38
|
import { cn, extractFileName } from "@/lib/utils";
|
|
39
39
|
import { IMAGE_FALLBACK_DATA_PREFIX } from "@/lib/constants";
|
|
40
40
|
import type {
|
|
@@ -563,7 +563,7 @@ function AssistantBlock({
|
|
|
563
563
|
const [touched, setTouched] = useState(false);
|
|
564
564
|
const [confirmDeleteOpen, setConfirmDeleteOpen] = useState(false);
|
|
565
565
|
const [confirmRegenOpen, setConfirmRegenOpen] = useState(false);
|
|
566
|
-
const
|
|
566
|
+
const addItem = useAddItem();
|
|
567
567
|
|
|
568
568
|
const isStreaming = message.status === "streaming";
|
|
569
569
|
const hasError = message.status === "error";
|
|
@@ -639,11 +639,12 @@ function AssistantBlock({
|
|
|
639
639
|
return;
|
|
640
640
|
}
|
|
641
641
|
try {
|
|
642
|
-
await
|
|
642
|
+
await addItem.mutateAsync({
|
|
643
643
|
memoryStoreName: message.memoryFilesStoreName,
|
|
644
644
|
scope: message.memoryFilesScope,
|
|
645
645
|
path,
|
|
646
646
|
content: message.content,
|
|
647
|
+
view: "full",
|
|
647
648
|
});
|
|
648
649
|
toast.success(t("qa.message.savedToFile", { path }));
|
|
649
650
|
} catch (error) {
|
|
@@ -206,7 +206,11 @@ function LLMModelCombobox({
|
|
|
206
206
|
};
|
|
207
207
|
|
|
208
208
|
return (
|
|
209
|
-
|
|
209
|
+
// `modal` is load-bearing: this selector is rendered inside the chat config
|
|
210
|
+
// Sheet, and a Radix Dialog's scroll lock cancels wheel events on portalled
|
|
211
|
+
// content it doesn't own — without it the model list refuses to scroll.
|
|
212
|
+
// See components/ui/__tests__/popover-in-dialog.test.ts.
|
|
213
|
+
<Popover open={open} onOpenChange={setOpen} modal>
|
|
210
214
|
<PopoverTrigger asChild>
|
|
211
215
|
<Button
|
|
212
216
|
type="button"
|
|
@@ -36,7 +36,7 @@ const DialogContent = React.forwardRef<
|
|
|
36
36
|
<DialogPrimitive.Content
|
|
37
37
|
ref={ref}
|
|
38
38
|
className={cn(
|
|
39
|
-
"fixed left-[50%] top-[50%] z-50 grid w-
|
|
39
|
+
"fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-h-[calc(100dvh-2rem)] max-w-[480px] translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto rounded-lg border border-[hsl(var(--border))] p-6 shadow-md",
|
|
40
40
|
"duration-200 ease-[cubic-bezier(0.34,1.56,0.64,1)]",
|
|
41
41
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
42
42
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
@@ -10,11 +10,34 @@ import {
|
|
|
10
10
|
} from "react";
|
|
11
11
|
import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
|
12
12
|
import {
|
|
13
|
-
|
|
14
|
-
getActiveSubspace,
|
|
15
|
-
setActiveSubspace,
|
|
13
|
+
getSubspaceScopeId,
|
|
16
14
|
useSubspaceHistory,
|
|
17
15
|
} from "@/hooks/use-subspace-history";
|
|
16
|
+
import {
|
|
17
|
+
clearActiveSubspace,
|
|
18
|
+
readActiveSubspace,
|
|
19
|
+
writeActiveSubspace,
|
|
20
|
+
} from "@/lib/subspace-history";
|
|
21
|
+
import { useDataScopeKey } from "@/providers/runtime-context-provider";
|
|
22
|
+
|
|
23
|
+
type ActiveSubspaceStorage = Pick<
|
|
24
|
+
Storage,
|
|
25
|
+
"getItem" | "setItem" | "removeItem"
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
const unavailableSessionStorage: ActiveSubspaceStorage = {
|
|
29
|
+
getItem: () => null,
|
|
30
|
+
setItem: () => {},
|
|
31
|
+
removeItem: () => {},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export function getSessionStorage(): ActiveSubspaceStorage {
|
|
35
|
+
try {
|
|
36
|
+
return window.sessionStorage;
|
|
37
|
+
} catch {
|
|
38
|
+
return unavailableSessionStorage;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
18
41
|
|
|
19
42
|
export interface SubspaceContextValue {
|
|
20
43
|
subspace: string | null;
|
|
@@ -22,6 +45,7 @@ export interface SubspaceContextValue {
|
|
|
22
45
|
clearSubspace: () => void;
|
|
23
46
|
history: string[];
|
|
24
47
|
addToHistory: (subspace: string) => void;
|
|
48
|
+
clearHistory: () => void;
|
|
25
49
|
}
|
|
26
50
|
|
|
27
51
|
export const SubspaceContext = createContext<SubspaceContextValue | null>(null);
|
|
@@ -52,12 +76,68 @@ interface SubspaceProviderProps {
|
|
|
52
76
|
children: ReactNode;
|
|
53
77
|
}
|
|
54
78
|
|
|
79
|
+
export interface ActiveSubspaceReconcileState {
|
|
80
|
+
scopeId: string | null;
|
|
81
|
+
pendingRestore: string | null;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export type ActiveSubspaceReconcileResult = {
|
|
85
|
+
state: ActiveSubspaceReconcileState;
|
|
86
|
+
effect:
|
|
87
|
+
| { type: "restore"; subspace: string }
|
|
88
|
+
| { type: "persist"; subspace: string }
|
|
89
|
+
| { type: "clear" }
|
|
90
|
+
| { type: "none" };
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export function reconcileActiveSubspace(
|
|
94
|
+
state: ActiveSubspaceReconcileState,
|
|
95
|
+
scopeId: string,
|
|
96
|
+
urlSubspace: string | null,
|
|
97
|
+
storedSubspace: string | null,
|
|
98
|
+
): ActiveSubspaceReconcileResult {
|
|
99
|
+
if (state.scopeId !== scopeId) {
|
|
100
|
+
if (urlSubspace) {
|
|
101
|
+
return {
|
|
102
|
+
state: { scopeId, pendingRestore: null },
|
|
103
|
+
effect: { type: "persist", subspace: urlSubspace },
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
if (storedSubspace) {
|
|
107
|
+
return {
|
|
108
|
+
state: { scopeId, pendingRestore: storedSubspace },
|
|
109
|
+
effect: { type: "restore", subspace: storedSubspace },
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
state: { scopeId, pendingRestore: null },
|
|
114
|
+
effect: { type: "clear" },
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (state.pendingRestore && !urlSubspace) {
|
|
119
|
+
return { state, effect: { type: "none" } };
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (urlSubspace) {
|
|
123
|
+
return {
|
|
124
|
+
state: { scopeId, pendingRestore: null },
|
|
125
|
+
effect: { type: "persist", subspace: urlSubspace },
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return {
|
|
130
|
+
state: { scopeId, pendingRestore: null },
|
|
131
|
+
effect: { type: "clear" },
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
55
135
|
/**
|
|
56
136
|
* Subspace state container backed by the URL as the single source of truth.
|
|
57
137
|
* The `?subspace=` query parameter drives every read; writes only call
|
|
58
138
|
* router.replace and let the URL change propagate. A per-tab sessionStorage
|
|
59
|
-
* preference is
|
|
60
|
-
* without a query string
|
|
139
|
+
* preference is reconciled into the URL once per runtime/KB identity so
|
|
140
|
+
* revisiting without a query string lands on the previously chosen scope.
|
|
61
141
|
*/
|
|
62
142
|
export function SubspaceProvider({
|
|
63
143
|
knowledgeBaseName,
|
|
@@ -67,38 +147,65 @@ export function SubspaceProvider({
|
|
|
67
147
|
const searchParamsKey = searchParams.toString();
|
|
68
148
|
const pathname = usePathname();
|
|
69
149
|
const router = useRouter();
|
|
70
|
-
const
|
|
150
|
+
const dataScopeKey = useDataScopeKey();
|
|
151
|
+
const { history, addToHistory, clearHistory } = useSubspaceHistory(
|
|
152
|
+
dataScopeKey,
|
|
153
|
+
knowledgeBaseName,
|
|
154
|
+
);
|
|
155
|
+
const activeScopeId = getSubspaceScopeId(dataScopeKey, knowledgeBaseName);
|
|
71
156
|
|
|
72
157
|
// URL is the single source of truth — derive directly, no local state.
|
|
73
158
|
const subspace = searchParams.get("subspace");
|
|
74
159
|
|
|
75
|
-
//
|
|
76
|
-
//
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
160
|
+
// Reconcile once per runtime/KB identity. A pending restore suppresses the
|
|
161
|
+
// persistence branch until router.replace has replayed it into the URL.
|
|
162
|
+
const reconcileRef = useRef<ActiveSubspaceReconcileState>({
|
|
163
|
+
scopeId: null,
|
|
164
|
+
pendingRestore: null,
|
|
165
|
+
});
|
|
80
166
|
useEffect(() => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
167
|
+
const storage = getSessionStorage();
|
|
168
|
+
const stored =
|
|
169
|
+
reconcileRef.current.scopeId !== activeScopeId && !subspace
|
|
170
|
+
? readActiveSubspace(storage, dataScopeKey, knowledgeBaseName)
|
|
171
|
+
: null;
|
|
172
|
+
const result = reconcileActiveSubspace(
|
|
173
|
+
reconcileRef.current,
|
|
174
|
+
activeScopeId,
|
|
175
|
+
subspace,
|
|
176
|
+
stored,
|
|
177
|
+
);
|
|
178
|
+
reconcileRef.current = result.state;
|
|
90
179
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (!subspace) {
|
|
96
|
-
clearActiveSubspace(knowledgeBaseName);
|
|
180
|
+
if (result.effect.type === "restore") {
|
|
181
|
+
const params = new URLSearchParams(searchParamsKey);
|
|
182
|
+
params.set("subspace", result.effect.subspace);
|
|
183
|
+
router.replace(`${pathname}?${params.toString()}`);
|
|
97
184
|
return;
|
|
98
185
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
186
|
+
if (result.effect.type === "persist") {
|
|
187
|
+
writeActiveSubspace(
|
|
188
|
+
storage,
|
|
189
|
+
dataScopeKey,
|
|
190
|
+
knowledgeBaseName,
|
|
191
|
+
result.effect.subspace,
|
|
192
|
+
);
|
|
193
|
+
addToHistory(result.effect.subspace);
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
if (result.effect.type === "clear") {
|
|
197
|
+
clearActiveSubspace(storage, dataScopeKey, knowledgeBaseName);
|
|
198
|
+
}
|
|
199
|
+
}, [
|
|
200
|
+
activeScopeId,
|
|
201
|
+
dataScopeKey,
|
|
202
|
+
knowledgeBaseName,
|
|
203
|
+
subspace,
|
|
204
|
+
searchParamsKey,
|
|
205
|
+
pathname,
|
|
206
|
+
router,
|
|
207
|
+
addToHistory,
|
|
208
|
+
]);
|
|
102
209
|
|
|
103
210
|
const setSubspace = useCallback(
|
|
104
211
|
(next: string) => {
|
|
@@ -120,7 +227,14 @@ export function SubspaceProvider({
|
|
|
120
227
|
|
|
121
228
|
return (
|
|
122
229
|
<SubspaceContext.Provider
|
|
123
|
-
value={{
|
|
230
|
+
value={{
|
|
231
|
+
subspace,
|
|
232
|
+
setSubspace,
|
|
233
|
+
clearSubspace,
|
|
234
|
+
history,
|
|
235
|
+
addToHistory,
|
|
236
|
+
clearHistory,
|
|
237
|
+
}}
|
|
124
238
|
>
|
|
125
239
|
{children}
|
|
126
240
|
</SubspaceContext.Provider>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
2
|
+
|
|
3
|
+
import { approveDreamPlan } from "@/services/memory";
|
|
4
|
+
|
|
5
|
+
export function useApproveDreamPlan(memoryStoreName: string) {
|
|
6
|
+
const queryClient = useQueryClient();
|
|
7
|
+
return useMutation({
|
|
8
|
+
mutationFn: ({
|
|
9
|
+
dreamId,
|
|
10
|
+
approver,
|
|
11
|
+
}: {
|
|
12
|
+
dreamId: string;
|
|
13
|
+
approver: string;
|
|
14
|
+
}) => approveDreamPlan(memoryStoreName, dreamId, approver),
|
|
15
|
+
onSuccess: () => {
|
|
16
|
+
queryClient.invalidateQueries({
|
|
17
|
+
queryKey: ["memory"],
|
|
18
|
+
predicate: (query) =>
|
|
19
|
+
Array.isArray(query.queryKey) &&
|
|
20
|
+
query.queryKey.includes("dream-tasks") &&
|
|
21
|
+
query.queryKey.includes(memoryStoreName),
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
}
|