@tablestore/tablestore-agent-cli 0.2.10 → 0.2.11
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/memory.d.ts.map +1 -1
- package/dist/commands/memory.js +171 -95
- 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 -3
- 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 +5 -20
- 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.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 +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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +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 +4 -4
- 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.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/[action]/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/{sync → [action]}/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/[action]/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]/scopes/route.js +2 -2
- 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 +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]/tasks/[requestId]/route.js +2 -2
- 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 +2 -2
- 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 +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/oss/list/route.js +2 -2
- 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 +2 -2
- 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.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 +1 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/05a2_app_api_v1_memory_stores_[store]_file-memory_[action]_route_actions_0m70if_.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0n~ec7s.js +19 -12
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0--nu07._.js +3 -0
- 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]__03og44p._.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]__0-3~.bv._.js → [root-of-the-server]__052epg.._.js} +3 -3
- 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]__08_2avk._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0acvvri._.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]__0dzh4cj._.js +40 -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]__0es0s_~._.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]__0g3yw6w._.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]__0is6qso._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0k7ex0r._.js +40 -0
- 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]__0q8vcw8._.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]__0tc-.6s._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0u03tze._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ua_nqs._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0uebf40._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0v0il3n._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/{[root-of-the-server]__089es3y._.js → [root-of-the-server]__0w56nne._.js} +10 -10
- 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]__0y0w3mg._.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]__10m-wmo._.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]__13q2wbt._.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/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 +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__01f7est._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__07fsbff._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0b5cw4e._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0cj2gsm._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0.pa1e6._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_01snuz~._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_05bw0~2._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_071hi50._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0_aw2vr._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ep_q37._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ez3yia._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0fttf6a._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0fz3kge._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0hx2079._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0hy21o9._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0oiggmj._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0p0sh02._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0uc_gmf._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0wce254._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ww5s91._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0xrd8-1._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0y4mxf8._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0y7vx.d._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_12l8jkb._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_079nj-_._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0_z9696._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0bhjp9s._.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_app_(dashboard)_api-keys_page_tsx_0lb6fu7._.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_app_(dashboard)_memory_[store]_messages_page_tsx_0votz-n._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_tasks_page_tsx_0a_bgx4._.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_components_memory_memory-files-browser_tsx_0o2~94-._.js +3 -0
- 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/dashboard_src_providers_runtime-context-provider_tsx_0wmj66z._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0sr_ner._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/functions-config-manifest.json +1 -3
- 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-~e5~2eoun8n.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0.hi0qmo.f-h4.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/01xcynczarvq~.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/01xuyqw7ivp3n.js +138 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/026lyw-ynx1og.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/029zyc1pxa~4m.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/05_iqjh-v2gej.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/05f4mjbi6x-tm.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/05vzt~ml0z7~9.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07twdccs42b_-.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{010bpq~3ntjcm.js → 08h7wustf~cl4.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/08o2~c-80nbla.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/090n1_814n.n~.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0_osn.dm_85jw.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0aj~rx1m.91ur.js +5 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0dx_8pb_z_xy6.css +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0eafb9pun~54k.js +9 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0hnqmb1a7y7x1.js +138 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jjiw-agnutux.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k9guaejnlc0r.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0l~3_bvic.da3.js → 0ogrq_r43je48.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0pxisu-1mnehf.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0r6utd8g~.cc1.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u6c8q4k~6aiy.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0uu2cjfwvbn3y.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0vn5pp.3keyh5.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0wbozn0wq-4ls.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0yvc~t7p88wsf.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{02u9ocsl0a12t.js → 0~naqbx3873~r.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/12iur8ibdfi5_.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/13kxz9vygidrz.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/14.8mq880kjoc.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/145hqnc~4wc~n.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/14rpr3z1.lmgj.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/165fwg-5at5cq.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/17b4md7atp39z.js +1 -0
- package/dist/dashboard-runtime/dashboard/server.js +1 -1
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/chat/page.tsx +1 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/qa/page.tsx +1 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/layout.tsx +59 -8
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/messages/page.tsx +15 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/tasks/page.tsx +9 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/units/page.tsx +123 -24
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/file-memory-curator.ts +491 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/file-memory-helpers.ts +12 -81
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/memory-helpers.ts +3 -3
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/route.ts +200 -39
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/file-memory/[action]/route.ts +92 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/file-memory/_helpers.ts +26 -36
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/file-memory/_request.ts +49 -0
- package/dist/dashboard-runtime/dashboard/src/components/chat/chat-config-context.tsx +48 -9
- package/dist/dashboard-runtime/dashboard/src/components/chat/memory-bind-section.tsx +66 -18
- package/dist/dashboard-runtime/dashboard/src/components/chat/memory-files-dialog.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-details-panel.tsx +91 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-editor.tsx +139 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-mutation-dialogs.tsx +181 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-scope-onboarding.tsx +154 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-version-history.tsx +201 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-workspace-toolbar.tsx +101 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-create-form.tsx +166 -75
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-dream-create-dialog.tsx +147 -20
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-files-browser.tsx +452 -168
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-scope-bar.tsx +27 -21
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-search-form.tsx +51 -14
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-search-results.tsx +5 -1
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-settings-form.tsx +54 -46
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-store-card.tsx +126 -69
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-unit-table.tsx +5 -1
- package/dist/dashboard-runtime/dashboard/src/components/qa/qa-message.tsx +232 -38
- package/dist/dashboard-runtime/dashboard/src/components/shared/error-state.tsx +3 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-chat-history.ts +125 -47
- package/dist/dashboard-runtime/dashboard/src/hooks/use-file-memory.ts +184 -29
- package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-store-scopes.ts +2 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-qa-chat.ts +188 -23
- package/dist/dashboard-runtime/dashboard/src/i18n/locales/en.ts +123 -14
- package/dist/dashboard-runtime/dashboard/src/i18n/locales/zh.ts +115 -14
- package/dist/dashboard-runtime/dashboard/src/lib/api-error-toast.ts +9 -1
- package/dist/dashboard-runtime/dashboard/src/lib/browser-file-memory.ts +391 -0
- package/dist/dashboard-runtime/dashboard/src/lib/file-scope-history.ts +108 -0
- package/dist/dashboard-runtime/dashboard/src/lib/memory-storage-mode.ts +193 -31
- package/dist/dashboard-runtime/dashboard/src/lib/memory.ts +16 -4
- package/dist/dashboard-runtime/dashboard/src/lib/query-keys.ts +67 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/llm-chat.ts +58 -13
- package/dist/dashboard-runtime/dashboard/src/services/file-memory.ts +88 -46
- package/dist/dashboard-runtime/dashboard/src/types/file-memory.ts +97 -0
- package/dist/dashboard-runtime/dashboard/src/types/llm-chat.ts +49 -13
- package/dist/dashboard-runtime/dashboard/src/types/memory.ts +9 -2
- package/dist/dashboard-runtime/dashboard/tsconfig.tsbuildinfo +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts +0 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js +0 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +55 -8
- 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 +93 -11
- 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/oss-uploader.d.ts +56 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.d.ts.map +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js +120 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js.map +1 -0
- 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 +1 -0
- 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/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/types.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/semver/node_modules/.bin/semver +21 -0
- package/dist/main.js +0 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts +0 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js +0 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +55 -8
- 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 +93 -11
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.d.ts +56 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.d.ts.map +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js +120 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js.map +1 -0
- 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 +1 -0
- 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/dist/node_modules/@tablestore/tablestore-agent-shared/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/file/route/app-paths-manifest.json +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/file/route.js +0 -6
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/file/route.js.nft.json +0 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/file/route_client-reference-manifest.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/sync/route/app-paths-manifest.json +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/sync/route/build-manifest.json +0 -9
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/sync/route/server-reference-manifest.json +0 -4
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/sync/route.js +0 -6
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/sync/route.js.map +0 -5
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/sync/route_client-reference-manifest.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/tree/route/app-paths-manifest.json +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/tree/route/build-manifest.json +0 -9
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/tree/route/server-reference-manifest.json +0 -4
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/tree/route.js +0 -6
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/tree/route.js.map +0 -5
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/tree/route.js.nft.json +0 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/tree/route_client-reference-manifest.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_file-memory_file_route_actions_06~k01v.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_file-memory_sync_route_actions_0rt6p8e.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_file-memory_tree_route_actions_0wl_n8b.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0-dt7~s._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.-~ff4._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.l706t._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.nejw_._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__00_mrad._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__00i.7se._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__00r7uqs._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__02~yw7n._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04kpzpa._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04p1a88._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__05x0k4d._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__060s~oe._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__06fanvv._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__06tci88._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__08bzgzm._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__08d7wb.._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__08p_m_c._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__095xiwn._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__09h95i6._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ai2k_o._.js +0 -40
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0alcygi._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0aspytx._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0cq-9s~._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0cyiuai._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0d4zrpj._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0d~m09k._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0f1lugp._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0g1cfb7._.js +0 -40
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0gpz.~y._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0i3u9x3._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0iromt6._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0j8.u0y._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0k-pfaj._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0kcbz7k._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0nrl-.g._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0o5mf4h._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0omyr40._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ty8jgt._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ug_2kc._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0v98i9~._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0wt0ksb._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ya_8d2._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0zfg-ml._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0~9ru5n._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0~f7ckz._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__109i6ps._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__10o5zq5._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12ls5l8._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0w-2_lucide-react_dist_esm_icons_0h-3_0x._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0k0es2c._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0ky8i.~._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0ocsrt0._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0ys4x_n._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__10rkv6z._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_002mc1c._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_04f2u4t._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06ny.4k._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0b9pl2d._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0e.ehti._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0f8moq0._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0f8yv4v._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0fvg_xo._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0h9c.8m._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ip4ncy._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0izjcsk._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0j.62sb._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0mdbcju._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0p_s55v._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0qiamjd._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0t.h859._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0xp94lc._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_13730cz._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_00.1.s_._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_04o7mfc._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0qlyj-q._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_00usyu3._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0791f2k._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0--dupndun7xc.css +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0.uxk~hsm6yi8.js +0 -138
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/00eggrx~.4c55.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/00lvoeu_v3253.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/00o9vmhspv._3.js +0 -138
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/00x1.t633f041.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/02p7gke47s.2~.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/03dth-av1gl-h.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07s0f6938um2v.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/09y30vyml4r.b.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0au0pbejtwahz.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0b-ei8-g7ceug.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0chiv044h3u58.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0fcdli-~wmvvx.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0fz_9~-rxluly.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0i55cqygnl-a9.js +0 -5
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0j8p7vk~awgs..js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0j_.hkhjix9hw.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0naliud7av3p1.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0pbfl~23ac79y.js +0 -9
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u3qx.qasmdx9.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0vuh8jgeqqdy..js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0wbevjtr1_grz.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0y-gjpq3kxsbz.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0z_pq4ttgotxw.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/10i~m4_8ainxw.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/12535rmhzbk63.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/13uk2uuzuop5e.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/13vd4hv~l95-c.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/16.2aecdwo6w_.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/16yu0g~7n~33c.js +0 -1
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/file-memory/file/route.ts +0 -69
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/file-memory/sync/route.ts +0 -69
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/file-memory/tree/route.ts +0 -44
- /package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/{file → [action]}/route/build-manifest.json +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/{file → [action]}/route/server-reference-manifest.json +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/{file → [action]}/route.js.map +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{5irIRCYtKcYh5T_Bewihp → AgybWIwFBY3-L1V2Copiq}/_buildManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{5irIRCYtKcYh5T_Bewihp → AgybWIwFBY3-L1V2Copiq}/_clientMiddlewareManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{5irIRCYtKcYh5T_Bewihp → AgybWIwFBY3-L1V2Copiq}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,323516,e=>{"use strict";var r=e.i(44501),t=e.i(861403),s=e.i(465581),o=e.i(979980),a=e.i(515793),i=e.i(856717),l=e.i(876490);let n=new Set(Object.keys(i.messages.header.segments));e.s(["PageHeader",0,function({title:e,description:i,hideBreadcrumb:c,children:m,className:d}){let u=(0,s.usePathname)()??"/",{t:h}=(0,a.useI18n)(),x=c?[]:function(e,r){if(/^\/knowledge-base\/[^/]+(?:\/.*)?$/.test(e)||/^\/memory\/[^/]+(?:\/.*)?$/.test(e))return[];let t=e.split("/").filter(Boolean);if(0===t.length)return[];let s=[],o="";return t.forEach((e,a)=>{o+=`/${e}`;let i=decodeURIComponent(e),l=n.has(i)?r(`header.segments.${i}`):i;s.push({label:l,href:a<t.length-1?o:void 0})}),s}(u,h);return(0,r.jsxs)("div",{className:(0,l.cn)("mb-5 flex flex-col gap-2",d),children:[x.length>1&&(0,r.jsxs)("nav",{"aria-label":h("header.breadcrumb"),className:"flex items-center gap-1 text-[13px] text-[hsl(var(--muted-foreground))]",children:[(0,r.jsx)(t.default,{href:"/",className:"transition-colors hover:text-[hsl(var(--foreground))]",children:h("common.home")}),x.map((e,s)=>(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(o.ChevronRight,{className:"h-3 w-3 opacity-60"}),e.href?(0,r.jsx)(t.default,{href:e.href,className:"transition-colors hover:text-[hsl(var(--foreground))]",children:e.label}):(0,r.jsx)("span",{className:"font-medium text-[hsl(var(--foreground))]",children:e.label})]},`${e.label}-${s}`))]}),(0,r.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)("h1",{className:"text-xl font-semibold leading-tight text-[hsl(var(--foreground))]",children:e}),i&&(0,r.jsx)("p",{className:"text-[13px] text-[hsl(var(--muted-foreground))]",children:i})]}),m&&(0,r.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:m})]})]})}])},828772,906962,e=>{"use strict";function r(e="id"){return"u">typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():`${e}_${Date.now()}_${Math.random().toString(36).slice(2)}`}e.s(["newId",0,r],906962);let t="__default__";function s(){return r("run")}let o=["units","search","messages","tasks","requests","dream","settings"],a=["units","settings"],i=["longTerm","shortTerm","extract","consolidate"],l=["files"],n=["units","search","settings"],c=["units","settings"];function m(e){return"filemem"===e?"filemem":"file+ots"===e||"oss+ots"===e?"file+ots":"ots"}function d(e){return"file"===e?{inputType:e,storageStructures:["file"]}:{inputType:e,storageStructures:["structured"]}}function u(e){let r=m(e),t="filemem"!==r;return{mode:r,files:"ots"!==r,structured:t,writableFiles:"filemem"===r,forceLocalRetrieval:"filemem"===r,structuredAutoSave:t,supportsExtraction:t,detailSegments:[...t?o:a],cardShortcuts:[...t?i:l],cardActions:[...t?n:c]}}e.s(["FILEMEM_DEFAULT_RUN_ID",0,t,"memoryStorageSelectionForInput",0,d,"normalizeMemoryRunId",0,function(e,r,o=s){return"filemem"===e?t:r&&r!==t?r:o()},"normalizeStorageMode",0,m,"resolveMemoryDetailSegment",0,function(e,r){let{detailSegments:t}=u(e);return t.includes(r)?r:"units"},"resolveRetrievalMode",0,function(e,r){let t="boolean"==typeof r?r?"file+ots":"ots":m(r);return"filemem"===t?"local":"ots"===t?"search":"local"===e?"local":"search"},"storageModeCapabilities",0,u,"storageModeLabel",0,function(e,r){let t=m(e);return r?r("filemem"===t?"memory.storageMode.writableFileLabel":"file+ots"===t?"memory.storageMode.projectedFileLabel":"memory.storageMode.apiOnlyLabel"):"filemem"===t?"Writable File Memory":"file+ots"===t?"Read-only File Projection":"API-only Memory"},"storageModeToSelection",0,function(e){let r=m(e);return"filemem"===r?d("file"):"file+ots"===r?{inputType:"short-term",storageStructures:["structured","file"]}:d("short-term")},"storageSelectionToMode",0,function(e){let r=new Set(e.storageStructures),t=r.size!==e.storageStructures.length;if(!t&&"file"===e.inputType&&1===r.size&&r.has("file"))return"filemem";if(!t&&"short-term"===e.inputType&&r.has("structured")){if(1===r.size)return"ots";if(2===r.size&&r.has("file"))return"file+ots"}throw Error("Invalid memory input and storage structure combination")},"toggleMemoryFileStorage",0,function(e){return"file"===e.inputType?d("file"):e.storageStructures.includes("file")?d("short-term"):{inputType:"short-term",storageStructures:["structured","file"]}}],828772)},229025,e=>{"use strict";let r=(0,e.i(801685).default)("folder-tree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);e.s(["FolderTree",0,r],229025)},322817,e=>{"use strict";var r=e.i(44501),t=e.i(323516),s=e.i(101685),o=e.i(465581),a=e.i(480883),i=e.i(988310),l=e.i(832356),n=e.i(187014),c=e.i(18722),m=e.i(377163);let d=(0,e.i(801685).default)("file-pen-line",[["path",{d:"M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z",key:"ukzhwg"}],["path",{d:"M14.487 7.858A1 1 0 0 1 14 7V2",key:"1klhew"}],["path",{d:"M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516",key:"rxaxab"}],["path",{d:"M8 18h1",key:"13wk12"}]]);var u=e.i(229025),h=e.i(234752),x=e.i(942595),p=e.i(723888),g=e.i(45123),f=e.i(321562),y=e.i(137500),b=e.i(712984),j=e.i(164204),v=e.i(247570),S=e.i(712912),N=e.i(876490),F=e.i(828772),M=e.i(515793);function I(){let e,t=(0,o.useRouter)(),c=(e=(0,b.useQueryClient)(),(0,y.useMutation)({mutationFn:e=>(0,j.createMemoryStore)(e),onSuccess:()=>{(0,v.invalidateMemoryQueries)(e)}})),{t:h}=(0,M.useI18n)(),N=(0,s.useMemo)(()=>(0,i.zodResolver)(l.z.object({memoryStoreName:l.z.string().trim().min(1,h("memory.create.nameRequired")).max(32,h("memory.create.nameMaxLength")).regex(/^[a-zA-Z0-9_]+$/,h("memory.create.namePattern")),description:l.z.string().trim().max(256,h("memory.create.descriptionMaxLength")).optional(),inputType:l.z.enum(["short-term","file"]),storageStructures:l.z.array(l.z.enum(["structured","file"])).min(1,h("memory.create.storageStructureRequired")),extractInstructions:l.z.string().trim().max(4096,h("memory.create.extractMaxLength")).optional()}).superRefine((e,r)=>{try{(0,F.storageSelectionToMode)(e)}catch{r.addIssue({code:l.z.ZodIssueCode.custom,path:["storageStructures"],message:h("memory.create.storageStructureInvalid")})}})),[h]),I=(0,a.useForm)({resolver:N,defaultValues:{memoryStoreName:"",description:"",inputType:"short-term",storageStructures:["structured"],extractInstructions:""}});(0,S.useLocaleRevalidation)(I);let L=I.watch("inputType");async function k(e){try{let r,s;await c.mutateAsync((r=(0,F.storageSelectionToMode)(e),s=e.extractInstructions?.trim(),{memoryStoreName:e.memoryStoreName,description:e.description?.length?e.description:void 0,storageMode:r,extractInstructions:"filemem"===r?void 0:s||void 0})),n.toast.success(h("memory.list.createSuccess")),t.push("/memory")}catch(e){n.toast.error(e instanceof Error?e.message:h("memory.list.createFailed"))}}return(0,r.jsx)(f.Form,{...I,children:(0,r.jsxs)("form",{onSubmit:I.handleSubmit(k),className:"space-y-6",children:[(0,r.jsx)(w,{}),(0,r.jsxs)("section",{className:"rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-5 shadow-sm",children:[(0,r.jsx)(D,{title:h("memory.create.basicInfo"),description:h("memory.create.basicInfoDesc")}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(f.FormField,{control:I.control,name:"memoryStoreName",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsxs)(f.FormLabel,{children:[h("memory.create.name")," ",(0,r.jsx)("span",{className:"text-[hsl(var(--destructive))]",children:"*"})]}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(p.Input,{placeholder:h("memory.create.namePlaceholder"),...e})}),(0,r.jsx)(f.FormDescription,{children:h("memory.create.nameDesc")}),(0,r.jsx)(f.FormMessage,{})]})}),(0,r.jsx)(f.FormField,{control:I.control,name:"description",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:h("memory.create.descriptionLabel")}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(g.Textarea,{placeholder:h("memory.create.descriptionPlaceholder"),className:"resize-none",rows:4,...e})}),(0,r.jsx)(f.FormMessage,{})]})})]})]}),(0,r.jsxs)("section",{className:"rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-5 shadow-sm",children:[(0,r.jsx)(D,{title:h("memory.create.inputTypeSection"),description:h("memory.create.inputTypeSectionDesc")}),(0,r.jsx)(f.FormField,{control:I.control,name:"inputType",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormControl,{children:(0,r.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,r.jsx)(T,{icon:(0,r.jsx)(m.Database,{className:"h-5 w-5"}),label:h("memory.create.shortTermInputLabel"),description:h("memory.create.shortTermInputDescription"),selected:"short-term"===e.value,onSelect:()=>{let r=(0,F.memoryStorageSelectionForInput)("short-term");e.onChange(r.inputType),I.setValue("storageStructures",r.storageStructures,{shouldDirty:!0,shouldValidate:!0})}}),(0,r.jsx)(T,{icon:(0,r.jsx)(d,{className:"h-5 w-5"}),label:h("memory.create.fileInputLabel"),description:h("memory.create.fileInputDescription"),selected:"file"===e.value,onSelect:()=>{let r=(0,F.memoryStorageSelectionForInput)("file");e.onChange(r.inputType),I.setValue("storageStructures",r.storageStructures,{shouldDirty:!0,shouldValidate:!0})}})]})}),(0,r.jsx)(f.FormMessage,{})]})})]}),(0,r.jsxs)("section",{className:"rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-5 shadow-sm",children:[(0,r.jsx)(D,{title:h("memory.create.storageStructureSection"),description:h("memory.create.storageStructureSectionDesc")}),(0,r.jsx)(f.FormField,{control:I.control,name:"storageStructures",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormControl,{children:(0,r.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,r.jsx)(T,{icon:(0,r.jsx)(m.Database,{className:"h-5 w-5"}),label:h("memory.create.structuredStorageLabel"),description:h("memory.create.structuredStorageDescription"),selected:e.value.includes("structured"),disabled:!0,onSelect:()=>void 0}),(0,r.jsx)(T,{icon:(0,r.jsx)(u.FolderTree,{className:"h-5 w-5"}),label:h("memory.create.fileStorageLabel"),description:h("memory.create.fileStorageDescription"),selected:e.value.includes("file"),disabled:"file"===L,onSelect:()=>{let r=(0,F.toggleMemoryFileStorage)({inputType:L,storageStructures:e.value});e.onChange(r.storageStructures)}})]})}),(0,r.jsx)(f.FormMessage,{})]})})]}),"short-term"===L&&(0,r.jsxs)("section",{className:"rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-5 shadow-sm",children:[(0,r.jsx)(D,{title:h("memory.create.extractSection"),description:h("memory.create.extractSectionDesc")}),(0,r.jsx)(f.FormField,{control:I.control,name:"extractInstructions",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:h("memory.create.extractLabel")}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(g.Textarea,{placeholder:h("memory.create.extractPlaceholder"),className:"resize-none",rows:5,...e})}),(0,r.jsx)(f.FormDescription,{children:h("memory.create.extractHelp")}),(0,r.jsx)(f.FormMessage,{})]})})]}),(0,r.jsxs)("div",{className:"flex justify-end gap-3 border-t border-[hsl(var(--border-light))] pt-4",children:[(0,r.jsx)(x.Button,{type:"button",variant:"outline",onClick:()=>t.push("/memory"),children:h("common.cancel")}),(0,r.jsx)(x.Button,{type:"submit",disabled:c.isPending,children:c.isPending?h("common.creating"):h("memory.create.submit")})]})]})})}function w(){let{t:e}=(0,M.useI18n)();return(0,r.jsxs)("div",{className:"animate-home-reveal relative overflow-hidden rounded-lg border border-dashed border-[hsl(var(--primary)/0.35)] bg-gradient-to-br from-[hsl(var(--primary-soft))] via-[hsl(var(--surface))] to-[hsl(var(--surface))] px-5 py-5",role:"region","aria-label":e("memory.create.heroAriaLabel"),children:[(0,r.jsx)(h.Sparkles,{className:"pointer-events-none absolute right-3 top-3 h-3.5 w-3.5 text-[hsl(var(--primary)/0.45)]","aria-hidden":!0}),(0,r.jsxs)("div",{className:"flex items-start gap-4",children:[(0,r.jsx)("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-[hsl(var(--primary-soft))] ring-1 ring-[hsl(var(--primary)/0.18)]",children:(0,r.jsx)(c.Brain,{className:"h-5 w-5 text-[hsl(var(--primary))]"})}),(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-[hsl(var(--foreground))]",children:e("memory.create.heroTitle")}),(0,r.jsxs)("p",{className:"text-xs leading-relaxed text-[hsl(var(--muted-foreground))]",children:[e("memory.create.heroBodyPrefix"),(0,r.jsx)("code",{className:"mx-1 rounded bg-[hsl(var(--muted))] px-1 py-0.5 font-mono text-[10px]",children:e("memory.scopeField.app")}),"+",(0,r.jsx)("code",{className:"mx-1 rounded bg-[hsl(var(--muted))] px-1 py-0.5 font-mono text-[10px]",children:e("memory.scopeField.tenant")}),e("memory.create.heroBodyMiddle")]})]})]})]})}function T({icon:e,label:t,description:s,selected:o,disabled:a=!1,onSelect:i}){return(0,r.jsxs)("button",{type:"button",onClick:i,"aria-pressed":o,disabled:a,className:(0,N.cn)("flex flex-col items-start gap-2 rounded-lg border p-4 text-left transition-colors",o?"border-[hsl(var(--primary)/0.5)] bg-[hsl(var(--primary-soft))] ring-1 ring-[hsl(var(--primary)/0.18)]":"border-[hsl(var(--border))] hover:bg-[hsl(var(--muted)/0.4)]",a&&"cursor-default opacity-75"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:(0,N.cn)("flex h-9 w-9 items-center justify-center rounded-lg",o?"bg-[hsl(var(--primary-soft))] text-[hsl(var(--primary))]":"bg-[hsl(var(--muted))] text-muted-foreground"),children:e}),(0,r.jsx)("span",{className:"text-sm font-semibold text-foreground",children:t})]}),(0,r.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:s})]})}function D({title:e,description:t}){return(0,r.jsxs)("header",{className:"mb-4 border-b border-[hsl(var(--border-light))] pb-3",children:[(0,r.jsx)("h3",{className:"text-[15px] font-semibold leading-tight text-[hsl(var(--foreground))]",children:e}),(0,r.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-[hsl(var(--muted-foreground))]",children:t})]})}e.s(["default",0,function(){let{t:e}=(0,M.useI18n)();return(0,r.jsxs)("div",{className:"mx-auto max-w-3xl space-y-6",children:[(0,r.jsx)(t.PageHeader,{title:e("memory.create.title"),description:e("memory.create.description")}),(0,r.jsx)(I,{})]})}],322817)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,330363,e=>{"use strict";let r=(0,e.i(801685).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,r],330363)},323516,e=>{"use strict";var r=e.i(44501),n=e.i(861403),a=e.i(465581),t=e.i(979980),o=e.i(515793),l=e.i(856717),i=e.i(876490);let s=new Set(Object.keys(l.messages.header.segments));e.s(["PageHeader",0,function({title:e,description:l,hideBreadcrumb:d,children:c,className:m}){let u=(0,a.usePathname)()??"/",{t:g}=(0,o.useI18n)(),h=d?[]:function(e,r){if(/^\/knowledge-base\/[^/]+(?:\/.*)?$/.test(e)||/^\/memory\/[^/]+(?:\/.*)?$/.test(e))return[];let n=e.split("/").filter(Boolean);if(0===n.length)return[];let a=[],t="";return n.forEach((e,o)=>{t+=`/${e}`;let l=decodeURIComponent(e),i=s.has(l)?r(`header.segments.${l}`):l;a.push({label:i,href:o<n.length-1?t:void 0})}),a}(u,g);return(0,r.jsxs)("div",{className:(0,i.cn)("mb-5 flex flex-col gap-2",m),children:[h.length>1&&(0,r.jsxs)("nav",{"aria-label":g("header.breadcrumb"),className:"flex items-center gap-1 text-[13px] text-[hsl(var(--muted-foreground))]",children:[(0,r.jsx)(n.default,{href:"/",className:"transition-colors hover:text-[hsl(var(--foreground))]",children:g("common.home")}),h.map((e,a)=>(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(t.ChevronRight,{className:"h-3 w-3 opacity-60"}),e.href?(0,r.jsx)(n.default,{href:e.href,className:"transition-colors hover:text-[hsl(var(--foreground))]",children:e.label}):(0,r.jsx)("span",{className:"font-medium text-[hsl(var(--foreground))]",children:e.label})]},`${e.label}-${a}`))]}),(0,r.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)("h1",{className:"text-xl font-semibold leading-tight text-[hsl(var(--foreground))]",children:e}),l&&(0,r.jsx)("p",{className:"text-[13px] text-[hsl(var(--muted-foreground))]",children:l})]}),c&&(0,r.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:c})]})]})}])},553552,e=>{"use strict";let r=(0,e.i(801685).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,r],553552)},64209,e=>{"use strict";var r=e.i(101685),n=e.i(291967),a=e.i(543250),t=e.i(417256),o=e.i(672687),l=e.i(967928),i=e.i(980939),s=e.i(190088),d=e.i(433616),c=e.i(44501),m="Collapsible",[u,g]=(0,a.createContextScope)(m),[h,x]=u(m),p=r.forwardRef((e,n)=>{let{__scopeCollapsible:a,open:o,defaultOpen:l,disabled:s,onOpenChange:u,...g}=e,[x,p]=(0,t.useControllableState)({prop:o,defaultProp:l??!1,onChange:u,caller:m});return(0,c.jsx)(h,{scope:a,disabled:s,contentId:(0,d.useId)(),open:x,onOpenToggle:r.useCallback(()=>p(e=>!e),[p]),children:(0,c.jsx)(i.Primitive.div,{"data-state":w(x),"data-disabled":s?"":void 0,...g,ref:n})})});p.displayName=m;var f="CollapsibleTrigger",b=r.forwardRef((e,r)=>{let{__scopeCollapsible:a,...t}=e,o=x(f,a);return(0,c.jsx)(i.Primitive.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":w(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...t,ref:r,onClick:(0,n.composeEventHandlers)(e.onClick,o.onOpenToggle)})});b.displayName=f;var v="CollapsibleContent",j=r.forwardRef((e,r)=>{let{forceMount:n,...a}=e,t=x(v,e.__scopeCollapsible);return(0,c.jsx)(s.Presence,{present:n||t.open,children:({present:e})=>(0,c.jsx)(C,{...a,ref:r,present:e})})});j.displayName=v;var C=r.forwardRef((e,n)=>{let{__scopeCollapsible:a,present:t,children:s,...d}=e,m=x(v,a),[u,g]=r.useState(t),h=r.useRef(null),p=(0,l.useComposedRefs)(n,h),f=r.useRef(0),b=f.current,j=r.useRef(0),C=j.current,k=m.open||u,F=r.useRef(k),y=r.useRef(void 0);return r.useEffect(()=>{let e=requestAnimationFrame(()=>F.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,o.useLayoutEffect)(()=>{let e=h.current;if(e){y.current=y.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let r=e.getBoundingClientRect();f.current=r.height,j.current=r.width,F.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),g(t)}},[m.open,t]),(0,c.jsx)(i.Primitive.div,{"data-state":w(m.open),"data-disabled":m.disabled?"":void 0,id:m.contentId,hidden:!k,...d,ref:p,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":C?`${C}px`:void 0,...e.style},children:k&&s})});function w(e){return e?"open":"closed"}e.s(["Collapsible",0,p,"CollapsibleContent",0,j,"CollapsibleTrigger",0,b],64209)},892362,e=>{"use strict";let r=(0,e.i(801685).default)("list-ordered",[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]);e.s(["ListOrdered",0,r],892362)},136283,e=>{"use strict";e.s(["IMAGE_FALLBACK_DATA_PREFIX",0,"data:image/jpeg;base64,","KB_NAME_REGEX",0,/^[a-zA-Z][a-zA-Z0-9_-]{1,62}[a-zA-Z0-9]$/])},603106,696359,420830,e=>{"use strict";var r=e.i(44501),n=e.i(101685),a=e.i(543250),t=e.i(980939),o=e.i(677275),l=e.i(291967),i=e.i(417256),s="Toggle",d=n.forwardRef((e,n)=>{let{pressed:a,defaultPressed:o,onPressedChange:d,...c}=e,[m,u]=(0,i.useControllableState)({prop:a,onChange:d,defaultProp:o??!1,caller:s});return(0,r.jsx)(t.Primitive.button,{type:"button","aria-pressed":m,"data-state":m?"on":"off","data-disabled":e.disabled?"":void 0,...c,ref:n,onClick:(0,l.composeEventHandlers)(e.onClick,()=>{e.disabled||u(!m)})})});d.displayName=s;var c=e.i(25486),m="ToggleGroup",[u,g]=(0,a.createContextScope)(m,[o.createRovingFocusGroupScope]),h=(0,o.createRovingFocusGroupScope)(),x=n.default.forwardRef((e,n)=>{let{type:a,...t}=e;if("single"===a)return(0,r.jsx)(b,{...t,ref:n});if("multiple"===a)return(0,r.jsx)(v,{...t,ref:n});throw Error(`Missing prop \`type\` expected on \`${m}\``)});x.displayName=m;var[p,f]=u(m),b=n.default.forwardRef((e,a)=>{let{value:t,defaultValue:o,onValueChange:l=()=>{},...s}=e,[d,c]=(0,i.useControllableState)({prop:t,defaultProp:o??"",onChange:l,caller:m});return(0,r.jsx)(p,{scope:e.__scopeToggleGroup,type:"single",value:n.default.useMemo(()=>d?[d]:[],[d]),onItemActivate:c,onItemDeactivate:n.default.useCallback(()=>c(""),[c]),children:(0,r.jsx)(w,{...s,ref:a})})}),v=n.default.forwardRef((e,a)=>{let{value:t,defaultValue:o,onValueChange:l=()=>{},...s}=e,[d,c]=(0,i.useControllableState)({prop:t,defaultProp:o??[],onChange:l,caller:m}),u=n.default.useCallback(e=>c((r=[])=>[...r,e]),[c]),g=n.default.useCallback(e=>c((r=[])=>r.filter(r=>r!==e)),[c]);return(0,r.jsx)(p,{scope:e.__scopeToggleGroup,type:"multiple",value:d,onItemActivate:u,onItemDeactivate:g,children:(0,r.jsx)(w,{...s,ref:a})})});x.displayName=m;var[j,C]=u(m),w=n.default.forwardRef((e,n)=>{let{__scopeToggleGroup:a,disabled:l=!1,rovingFocus:i=!0,orientation:s,dir:d,loop:m=!0,...u}=e,g=h(a),x=(0,c.useDirection)(d),p={role:"group",dir:x,...u};return(0,r.jsx)(j,{scope:a,rovingFocus:i,disabled:l,children:i?(0,r.jsx)(o.Root,{asChild:!0,...g,orientation:s,dir:x,loop:m,children:(0,r.jsx)(t.Primitive.div,{...p,ref:n})}):(0,r.jsx)(t.Primitive.div,{...p,ref:n})})}),k="ToggleGroupItem",F=n.default.forwardRef((e,a)=>{let t=f(k,e.__scopeToggleGroup),l=C(k,e.__scopeToggleGroup),i=h(e.__scopeToggleGroup),s=t.value.includes(e.value),d=l.disabled||e.disabled,c={...e,pressed:s,disabled:d},m=n.default.useRef(null);return l.rovingFocus?(0,r.jsx)(o.Item,{asChild:!0,...i,focusable:!d,active:s,ref:m,children:(0,r.jsx)(y,{...c,ref:a})}):(0,r.jsx)(y,{...c,ref:a})});F.displayName=k;var y=n.default.forwardRef((e,n)=>{let{__scopeToggleGroup:a,value:t,...o}=e,l=f(k,a),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s="single"===l.type?i:void 0;return(0,r.jsx)(d,{...s,...o,ref:n,onPressedChange:e=>{e?l.onItemActivate(t):l.onItemDeactivate(t)}})}),N=e.i(876490);let S=n.createContext({size:"default",variant:"default"}),T=n.forwardRef(({className:e,variant:n="default",size:a="default",children:t,...o},l)=>(0,r.jsx)(x,{ref:l,className:(0,N.cn)("inline-flex items-center justify-center gap-1",e),...o,children:(0,r.jsx)(S.Provider,{value:{variant:n,size:a},children:t})}));T.displayName=x.displayName;let B=n.forwardRef(({className:e,children:n,...a},t)=>(0,r.jsx)(F,{ref:t,className:(0,N.cn)("relative inline-flex items-center justify-center whitespace-nowrap","text-sm font-medium transition-all","first:rounded-l-[7px] last:rounded-r-[7px]","border-l border-[hsl(var(--border)/0.6)]","first:border-l-0","data-[state=on]:border-l-transparent","[&[data-state=on]+*]:border-l-transparent","ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","hover:bg-[hsl(var(--muted)/0.6)] hover:text-[hsl(var(--foreground))]","data-[state=on]:bg-[hsl(var(--background))] data-[state=on]:text-[hsl(var(--foreground))] data-[state=on]:shadow-sm",e),...a,children:n}));B.displayName=F.displayName,e.s(["ToggleGroup",0,T,"ToggleGroupItem",0,B],603106);var I=e.i(546398),R=e.i(515793);e.s(["TagInput",0,function({value:e,onChange:a,placeholder:t}){let{t:o}=(0,R.useI18n)(),[l,i]=(0,n.useState)(""),s=(0,n.useCallback)(r=>{let n=r.trim();n&&!e.includes(n)&&a([...e,n]),i("")},[e,a]),d=(0,n.useCallback)(r=>{a(e.filter((e,n)=>n!==r))},[e,a]);return(0,r.jsxs)("div",{className:(0,N.cn)("flex flex-wrap items-center gap-1.5 rounded-md border border-[hsl(var(--input))] bg-background px-3 py-2","focus-within:border-[hsl(var(--ring))] focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-0","min-h-10 transition-colors"),children:[e.map((e,n)=>(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full border border-primary-200 bg-primary-100 px-2 py-0.5 text-xs font-medium text-primary-700",children:[e,(0,r.jsx)("button",{type:"button",onClick:()=>d(n),className:"inline-flex items-center justify-center rounded-full p-0.5 hover:opacity-70 transition-opacity","aria-label":o("common.removeTag",{tag:e}),children:(0,r.jsx)(I.X,{size:12})})]},`${e}-${n}`)),(0,r.jsx)("input",{type:"text",value:l,onChange:e=>i(e.target.value),onKeyDown:r=>{("Enter"===r.key||","===r.key)&&(r.preventDefault(),s(l)),"Backspace"===r.key&&""===l&&e.length>0&&d(e.length-1)},placeholder:0===e.length?t??o("common.tagInputPlaceholder"):"",className:"flex-1 min-w-20 bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]})}],696359);var _=e.i(892362),z=e.i(321562),L=e.i(723888);e.s(["RetrievalResultCountField",0,function({control:e,name:n,label:a,description:t,min:o=0,max:l,muted:i=!1,className:s}){let{t:d}=(0,R.useI18n)(),c=a??d("knowledgeBase.resultCountField.label"),m=t??d("knowledgeBase.resultCountField.description");return(0,r.jsx)(z.FormField,{control:e,name:n,render:({field:e})=>{let n="number"==typeof e.value&&Number.isFinite(e.value)?String(e.value):"";return(0,r.jsxs)(z.FormItem,{className:(0,N.cn)("mb-0 rounded-md border border-[hsl(var(--border)/0.6)] bg-[hsl(var(--card)/0.72)] p-3 shadow-[0_1px_2px_hsl(var(--foreground)/0.04)]",i&&"opacity-65",s),children:[(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-center",children:[(0,r.jsxs)("div",{className:"flex min-w-0 gap-3",children:[(0,r.jsx)("span",{className:"mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-[hsl(var(--primary)/0.08)] text-[hsl(var(--primary))]",children:(0,r.jsx)(_.ListOrdered,{className:"h-3.5 w-3.5"})}),(0,r.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,r.jsx)(z.FormLabel,{className:"text-sm font-medium",children:c}),(0,r.jsx)("p",{className:"text-xs leading-relaxed text-[hsl(var(--muted-foreground))]",children:m})]})]}),(0,r.jsxs)("div",{className:"relative w-28 shrink-0",children:[(0,r.jsx)(z.FormControl,{children:(0,r.jsx)(L.Input,{ref:e.ref,name:e.name,type:"number",inputMode:"numeric",min:o,max:l,"aria-label":c,className:"h-9 w-full bg-[hsl(var(--background))] pr-8 text-right font-mono text-sm tabular-nums shadow-sm [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",value:n,onBlur:e.onBlur,onChange:r=>e.onChange(function(e){let r=e.trim();if(!r)return;let n=Number(r);return Number.isFinite(n)?n:void 0}(r.target.value))})}),(0,r.jsx)("span",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-xs text-[hsl(var(--muted-foreground))]",children:d("knowledgeBase.resultCountField.unit")})]})]}),(0,r.jsx)(z.FormMessage,{className:"pt-1"})]})}})}],420830)},162769,e=>{"use strict";var r=e.i(44501),n=e.i(101685),a=e.i(876490);let t=n.forwardRef(({className:e,checked:n=!1,onCheckedChange:t,disabled:o,...l},i)=>(0,r.jsx)("button",{ref:i,type:"button",role:"switch","aria-checked":n,"data-state":n?"checked":"unchecked",disabled:o,onClick:()=>t?.(!n),className:(0,a.cn)("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full transition-colors duration-200","shadow-[inset_0_0_0_1px_rgba(0,0,0,0.04),inset_0_1px_2px_rgba(0,0,0,0.06)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50",n?"bg-[hsl(var(--primary-600))]":"bg-[hsl(var(--muted))] hover:bg-[hsl(var(--muted)/0.8)]",e),...l,children:(0,r.jsx)("span",{"aria-hidden":!0,className:(0,a.cn)("pointer-events-none block h-5 w-5 rounded-full bg-white transition-transform duration-200","shadow-[0_1px_2px_rgba(0,0,0,0.1),0_2px_6px_rgba(0,0,0,0.15)] ring-1 ring-black/4","ease-[cubic-bezier(0.34,1.56,0.64,1)]",n?"translate-x-5":"translate-x-0.5")})}));t.displayName="Switch",e.s(["Switch",0,t])},772238,764297,507187,e=>{"use strict";e.s(["handleNumberInput",0,function(e){return r=>{e(r.target.value?Number(r.target.value):void 0)}}],772238),e.s(["buildKnowledgeBaseRetrievalConfiguration",0,function(e){if(!e)return;let r=e.rerankingConfiguration,n=e.rerankType??r?.type,a={searchType:e.searchType??[]},t=e.denseTopK??e.denseVectorSearchConfiguration?.numberOfResults,o=e.fullTextTopK??e.fullTextSearchConfiguration?.numberOfResults,l=e.rerankTopK??r?.numberOfResults;if(void 0!==t&&(a.denseVectorSearchConfiguration={numberOfResults:t}),void 0!==o&&(a.fullTextSearchConfiguration={numberOfResults:o}),n){let t={type:n};void 0!==l&&(t.numberOfResults=l),"RRF"===n?t.rrfConfiguration={denseVectorSearchWeight:e.rrfDenseWeight??r?.rrfConfiguration?.denseVectorSearchWeight??0,fullTextSearchWeight:e.rrfFullTextWeight??r?.rrfConfiguration?.fullTextSearchWeight??0,k:e.rrfK??r?.rrfConfiguration?.k??60}:"WEIGHT"===n?t.weightConfiguration={denseVectorSearchWeight:e.weightDense??r?.weightConfiguration?.denseVectorSearchWeight??0,fullTextSearchWeight:e.weightFullText??r?.weightConfiguration?.fullTextSearchWeight??0}:"MODEL"===n&&(t.modelConfiguration={provider:e.modelProvider??r?.modelConfiguration?.provider??"bailian",model:e.modelName??r?.modelConfiguration?.model??"gte-rerank-v2"}),a.rerankingConfiguration=t}return a}],764297);var r=e.i(832356),n=e.i(136283);let a=r.z.enum(["string","long","double","boolean","date","string_list","long_list","double_list","boolean_list","date_list"]),t=r.z.object({name:r.z.string().min(1).max(128),type:a}),o=r.z.object({provider:r.z.enum(["bailian","custom"]),model:r.z.string().min(1),dimension:r.z.number().int().positive(),apiKey:r.z.string().optional(),url:r.z.string().url().optional()}),l=r.z.object({type:r.z.enum(["RRF","WEIGHT","MODEL"]),numberOfResults:r.z.number().int().min(0).max(200).optional(),rrfConfiguration:r.z.object({denseVectorSearchWeight:r.z.number().min(0),fullTextSearchWeight:r.z.number().min(0),k:r.z.number().int().positive()}).optional(),weightConfiguration:r.z.object({denseVectorSearchWeight:r.z.number().min(0).max(1),fullTextSearchWeight:r.z.number().min(0).max(1)}).optional(),modelConfiguration:r.z.object({provider:r.z.string().min(1),model:r.z.string().min(1)}).optional()}),i=r.z.object({searchType:r.z.array(r.z.enum(["DENSE_VECTOR","FULL_TEXT"])).min(1).optional(),denseVectorSearchConfiguration:r.z.object({numberOfResults:r.z.number().int().min(0).max(100)}).optional(),fullTextSearchConfiguration:r.z.object({numberOfResults:r.z.number().int().min(0).max(100)}).optional(),rerankingConfiguration:l.optional()});function s(e){return r.z.object({knowledgeBaseName:r.z.string().min(1,e.required).max(64,e.maxLength).regex(n.KB_NAME_REGEX,e.pattern),description:r.z.string().max(4096).optional(),subspace:r.z.boolean().optional(),tags:r.z.array(r.z.string()).optional(),metadata:r.z.array(t).max(200).optional(),embeddingConfiguration:o.optional(),retrievalConfiguration:i.optional(),multimodal:r.z.boolean().optional(),ingestConfiguration:r.z.object({enableTableFormulaCaption:r.z.boolean().optional()}).optional()})}s({required:"Knowledge base name is required",maxLength:"Name must be at most 64 characters",pattern:"Name must start with a letter; only letters, digits, underscores and hyphens are allowed, 3-64 characters, and it cannot end with an underscore or hyphen"});let d=r.z.object({knowledgeBaseName:r.z.string().min(1),description:r.z.string().max(4096).optional(),tags:r.z.array(r.z.string()).optional(),retrievalConfiguration:i.optional()});e.s(["buildCreateKBSchema",0,function(e){return s({required:e("knowledgeBase.create.nameRequired"),maxLength:e("knowledgeBase.create.nameMaxLength"),pattern:e("knowledgeBase.create.namePattern")})},"updateKBSchema",0,d],507187)},608897,e=>{"use strict";var r=e.i(44501),n=e.i(861403),a=e.i(553552),t=e.i(323516),o=e.i(101685),l=e.i(465581),i=e.i(480883),s=e.i(988310),d=e.i(187014),c=e.i(820268),m=e.i(506703),u=e.i(772238),g=e.i(942595),h=e.i(723888),x=e.i(45123),p=e.i(162769),f=e.i(321562),b=e.i(64209),v=e.i(166473),j=e.i(603106),C=e.i(696359),w=e.i(358204),k=e.i(330363),F=e.i(515793);let y=[{value:"string",label:"String"},{value:"long",label:"Long"},{value:"double",label:"Double"},{value:"boolean",label:"Boolean"},{value:"date",label:"Date"},{value:"string_list",label:"String List"},{value:"long_list",label:"Long List"},{value:"double_list",label:"Double List"},{value:"boolean_list",label:"Boolean List"},{value:"date_list",label:"Date List"}];function N({value:e,onChange:n}){let{t:a}=(0,F.useI18n)(),t=(0,o.useCallback)(()=>{n([...e,{name:"",type:"string"}])},[e,n]),l=(0,o.useCallback)(r=>{n(e.filter((e,n)=>n!==r))},[e,n]),i=(0,o.useCallback)((r,a)=>{n(e.map((e,n)=>n===r?{...e,...a}:e))},[e,n]);return(0,r.jsxs)("div",{className:"space-y-2",children:[e.map((e,n)=>(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(h.Input,{value:e.name,onChange:e=>i(n,{name:e.target.value}),placeholder:a("common.fieldNamePlaceholder"),className:"h-9 flex-1"}),(0,r.jsxs)(v.Select,{value:e.type,onValueChange:e=>i(n,{type:e}),children:[(0,r.jsx)(v.SelectTrigger,{className:"h-9 w-[140px]",children:(0,r.jsx)(v.SelectValue,{})}),(0,r.jsx)(v.SelectContent,{children:y.map(e=>(0,r.jsx)(v.SelectItem,{value:e.value,children:e.label},e.value))})]}),(0,r.jsx)(g.Button,{type:"button",variant:"ghost",size:"icon",onClick:()=>l(n),className:"h-9 w-9 text-muted-foreground hover:text-destructive hover:bg-destructive/10","aria-label":a("common.removeField",{name:e.name||n+1}),children:(0,r.jsx)(k.Trash2,{size:16})})]},n)),(0,r.jsxs)(g.Button,{type:"button",variant:"ghost",onClick:t,className:"gap-1.5 text-primary hover:bg-primary/10",children:[(0,r.jsx)(w.Plus,{size:16}),a("common.addField")]})]})}let S=[2048,1536,1024,768,512,256,128,64],T={"text-embedding-v3":[1024,768,512,256,128,64],"text-embedding-v4":S,"qwen3-vl-embedding":[2560,2048,1536,1024,768,512,256]};function B({form:e}){let{t:n}=(0,F.useI18n)(),a=(0,i.useWatch)({control:e.control,name:"embeddingConfiguration.provider"}),t=T[(0,i.useWatch)({control:e.control,name:"embeddingConfiguration.model"})??""]??S,o=r=>{e.setValue("embeddingConfiguration.model",r),e.setValue("embeddingConfiguration.dimension",1024)};return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(f.FormField,{control:e.control,name:"embeddingConfiguration.provider",render:({field:a})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:n("knowledgeBase.provider.label")}),(0,r.jsxs)(v.Select,{onValueChange:r=>{a.onChange(r),"bailian"===r?(e.setValue("embeddingConfiguration.model","text-embedding-v4"),e.setValue("embeddingConfiguration.dimension",1024)):e.setValue("embeddingConfiguration.model","")},defaultValue:a.value,children:[(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(v.SelectTrigger,{children:(0,r.jsx)(v.SelectValue,{placeholder:n("knowledgeBase.embedding.selectProvider")})})}),(0,r.jsxs)(v.SelectContent,{children:[(0,r.jsx)(v.SelectItem,{value:"bailian",children:n("knowledgeBase.provider.bailian")}),(0,r.jsx)(v.SelectItem,{value:"custom",children:n("knowledgeBase.provider.custom")})]})]}),(0,r.jsx)(f.FormMessage,{})]})}),(0,r.jsx)(f.FormField,{control:e.control,name:"embeddingConfiguration.model",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:n("knowledgeBase.provider.modelName")}),(0,r.jsx)(f.FormControl,{children:"bailian"===a?(0,r.jsxs)(v.Select,{onValueChange:o,value:e.value,children:[(0,r.jsx)(v.SelectTrigger,{children:(0,r.jsx)(v.SelectValue,{placeholder:n("knowledgeBase.provider.selectModel")})}),(0,r.jsxs)(v.SelectContent,{children:[(0,r.jsx)(v.SelectItem,{value:"text-embedding-v3",children:"text-embedding-v3"}),(0,r.jsx)(v.SelectItem,{value:"text-embedding-v4",children:"text-embedding-v4"}),(0,r.jsxs)(v.SelectItem,{value:"qwen3-vl-embedding",children:["qwen3-vl-embedding",n("knowledgeBase.provider.multimodalSuffix")]})]})]}):(0,r.jsx)(h.Input,{placeholder:n("knowledgeBase.provider.inputModelName"),...e})}),(0,r.jsx)(f.FormMessage,{})]})}),(0,r.jsx)(f.FormField,{control:e.control,name:"embeddingConfiguration.dimension",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:n("knowledgeBase.embedding.dimension")}),(0,r.jsx)(f.FormControl,{children:"bailian"===a?(0,r.jsxs)(v.Select,{onValueChange:r=>e.onChange(Number(r)),value:String(e.value),children:[(0,r.jsx)(v.SelectTrigger,{children:(0,r.jsx)(v.SelectValue,{placeholder:n("knowledgeBase.embedding.selectDimension")})}),(0,r.jsx)(v.SelectContent,{children:t.map(e=>(0,r.jsx)(v.SelectItem,{value:String(e),children:e.toLocaleString()},e))})]}):(0,r.jsx)(h.Input,{type:"number",placeholder:n("knowledgeBase.embedding.dimensionPlaceholder"),...e,onChange:r=>e.onChange(Number(r.target.value))})}),(0,r.jsx)(f.FormMessage,{})]})}),"custom"===a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f.FormField,{control:e.control,name:"embeddingConfiguration.apiKey",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:"API Key"}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(h.Input,{type:"password",placeholder:n("knowledgeBase.embedding.apiKeyPlaceholder"),...e,value:e.value??""})}),(0,r.jsx)(f.FormMessage,{})]})}),(0,r.jsx)(f.FormField,{control:e.control,name:"embeddingConfiguration.url",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:"API URL"}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(h.Input,{placeholder:"https://your-embedding-service.com/v1/embeddings",...e,value:e.value??""})}),(0,r.jsx)(f.FormMessage,{})]})})]})]})}var I=e.i(420830),R=e.i(764297),_=e.i(137500),z=e.i(712984),L=e.i(458770),M=e.i(247570),V=e.i(507187);function D(){let{locale:e}=(0,F.useI18n)();return(0,r.jsx)(E,{},e)}function E(){let e,n=(0,l.useRouter)(),a=(e=(0,z.useQueryClient)(),(0,_.useMutation)({mutationFn:e=>(0,L.createKnowledgeBase)(e),onSuccess:()=>{(0,M.invalidateKnowledgeBaseQueries)(e)}})),{t}=(0,F.useI18n)(),w=(0,o.useMemo)(()=>(0,V.buildCreateKBSchema)(t),[t]),k=(0,i.useForm)({resolver:(0,s.zodResolver)(w),defaultValues:{knowledgeBaseName:"",description:"",subspace:!1,multimodal:!0,ingestConfiguration:{enableTableFormulaCaption:!1},tags:[],metadata:[],embeddingConfiguration:{provider:"bailian",model:"qwen3-vl-embedding",dimension:1024},retrievalConfiguration:{searchType:["DENSE_VECTOR","FULL_TEXT"],denseVectorSearchConfiguration:{numberOfResults:20},fullTextSearchConfiguration:{numberOfResults:20},rerankingConfiguration:{type:"WEIGHT",numberOfResults:20,rrfConfiguration:{denseVectorSearchWeight:.5,fullTextSearchWeight:.5,k:60},weightConfiguration:{denseVectorSearchWeight:.7,fullTextSearchWeight:.3},modelConfiguration:{provider:"bailian",model:"qwen3-vl-rerank"}}}}}),y=(0,o.useRef)(!0),S=k.watch("multimodal");(0,o.useEffect)(()=>{S!==y.current&&(y.current=S??!1,S?(k.setValue("embeddingConfiguration.model","qwen3-vl-embedding"),k.setValue("embeddingConfiguration.dimension",1024),k.setValue("retrievalConfiguration.rerankingConfiguration.modelConfiguration.model","qwen3-vl-rerank")):(k.setValue("embeddingConfiguration.model","text-embedding-v4"),k.setValue("embeddingConfiguration.dimension",1024),k.setValue("retrievalConfiguration.rerankingConfiguration.modelConfiguration.model","gte-rerank-v2")))},[S,k]);let T=k.watch("retrievalConfiguration.rerankingConfiguration.type"),D=e=>"space-y-4 rounded-md border p-4 transition-colors "+(e?"border-[hsl(var(--primary)/0.4)] bg-[hsl(var(--primary)/0.04)]":"border-border bg-transparent");async function E(e){try{let r={...e,multimodal:e.multimodal||void 0,ingestConfiguration:e.ingestConfiguration?.enableTableFormulaCaption?e.ingestConfiguration:void 0,retrievalConfiguration:e.retrievalConfiguration?(0,R.buildKnowledgeBaseRetrievalConfiguration)(e.retrievalConfiguration):void 0};await a.mutateAsync(r),d.toast.success(t("knowledgeBase.create.createSuccess")),n.push("/knowledge-base")}catch(r){let e=r instanceof Error?r.message:t("knowledgeBase.create.createFailed");d.toast.error(e)}}return(0,r.jsx)(f.Form,{...k,children:(0,r.jsxs)("form",{onSubmit:k.handleSubmit(E),className:"space-y-8",children:[(0,r.jsxs)("section",{className:"space-y-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:t("knowledgeBase.common.basicInfo")}),(0,r.jsx)(f.FormField,{control:k.control,name:"knowledgeBaseName",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsxs)(f.FormLabel,{children:[t("knowledgeBase.create.nameRequiredMark")," ",(0,r.jsx)("span",{className:"text-[hsl(var(--destructive))]",children:"*"})]}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(h.Input,{placeholder:t("knowledgeBase.create.namePlaceholder"),...e})}),(0,r.jsx)(f.FormDescription,{children:t("knowledgeBase.create.nameDesc")}),(0,r.jsx)(f.FormMessage,{})]})}),(0,r.jsx)(f.FormField,{control:k.control,name:"description",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:t("knowledgeBase.common.description")}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(x.Textarea,{placeholder:t("knowledgeBase.common.descriptionPlaceholder"),className:"resize-none",rows:3,...e})}),(0,r.jsx)(f.FormMessage,{})]})}),(0,r.jsx)(f.FormField,{control:k.control,name:"tags",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:t("knowledgeBase.common.tags")}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(C.TagInput,{value:e.value??[],onChange:e.onChange,placeholder:t("knowledgeBase.common.tagsPlaceholder")})}),(0,r.jsx)(f.FormMessage,{})]})}),(0,r.jsx)(f.FormField,{control:k.control,name:"subspace",render:({field:e})=>(0,r.jsxs)(f.FormItem,{className:"flex flex-row items-center justify-between gap-4 space-y-0 rounded-md border border-border p-3",children:[(0,r.jsxs)("div",{className:"space-y-0.5",children:[(0,r.jsx)(f.FormLabel,{className:"text-sm",children:t("knowledgeBase.create.enableSubspace")}),(0,r.jsx)(f.FormDescription,{className:"text-xs",children:t("knowledgeBase.create.enableSubspaceDesc")})]}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(p.Switch,{checked:e.value??!1,onCheckedChange:e.onChange})})]})}),(0,r.jsx)(f.FormField,{control:k.control,name:"multimodal",render:({field:e})=>(0,r.jsxs)(f.FormItem,{className:"flex flex-row items-center justify-between gap-4 space-y-0 rounded-md border border-border p-3",children:[(0,r.jsxs)("div",{className:"space-y-0.5",children:[(0,r.jsx)(f.FormLabel,{className:"text-sm",children:t("knowledgeBase.create.multimodal")}),(0,r.jsx)(f.FormDescription,{className:"text-xs",children:t("knowledgeBase.create.multimodalDesc")})]}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(p.Switch,{checked:e.value??!1,onCheckedChange:e.onChange})})]})}),(0,r.jsx)(f.FormField,{control:k.control,name:"ingestConfiguration.enableTableFormulaCaption",render:({field:e})=>(0,r.jsxs)(f.FormItem,{className:"flex flex-row items-center justify-between gap-4 space-y-0 rounded-md border border-border p-3",children:[(0,r.jsxs)("div",{className:"space-y-0.5",children:[(0,r.jsx)(f.FormLabel,{className:"text-sm",children:t("knowledgeBase.create.tableFormulaCaption")}),(0,r.jsx)(f.FormDescription,{className:"text-xs",children:t("knowledgeBase.create.tableFormulaCaptionDesc")})]}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(p.Switch,{checked:e.value??!1,onCheckedChange:e.onChange})})]})})]}),(0,r.jsxs)("section",{className:"space-y-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:t("knowledgeBase.common.metadataSchema")}),(0,r.jsx)(f.FormField,{control:k.control,name:"metadata",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(N,{value:e.value??[],onChange:e.onChange})}),(0,r.jsx)(f.FormMessage,{})]})})]}),(0,r.jsxs)(b.Collapsible,{children:[(0,r.jsx)(b.CollapsibleTrigger,{asChild:!0,children:(0,r.jsxs)(g.Button,{type:"button",variant:"ghost",className:"flex w-full items-center justify-between p-0 text-lg font-semibold hover:bg-transparent",children:[t("knowledgeBase.common.advancedConfig"),(0,r.jsx)(c.ChevronDown,{className:"h-4 w-4 transition-transform duration-200 [[data-state=open]>&]:rotate-180"})]})}),(0,r.jsxs)(b.CollapsibleContent,{className:"mt-4 space-y-6",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("h4",{className:"text-base font-medium text-foreground",children:t("knowledgeBase.common.embeddingConfig")}),k.watch("multimodal")&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground bg-muted/30 rounded-md p-2",children:[t("knowledgeBase.create.autoSwitchPrefix"),(0,r.jsx)("code",{children:"qwen3-vl-embedding"}),t("knowledgeBase.create.autoSwitchMiddle"),(0,r.jsx)("code",{children:"qwen3-vl-rerank"}),t("knowledgeBase.create.autoSwitchSuffix")]}),(0,r.jsx)(B,{form:k})]}),(0,r.jsx)("hr",{className:"border-border"}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("h4",{className:"text-base font-medium text-foreground",children:t("knowledgeBase.common.retrievalConfig")}),(0,r.jsx)(f.FormField,{control:k.control,name:"retrievalConfiguration.searchType",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:t("knowledgeBase.common.searchType")}),(0,r.jsx)(f.FormControl,{children:(0,r.jsxs)(j.ToggleGroup,{type:"multiple",value:e.value??[],onValueChange:r=>{r?.length&&e.onChange(r)},className:"grid w-full grid-cols-2 gap-0 overflow-hidden rounded-lg border border-border bg-[hsl(var(--muted)/0.4)] p-0 sm:max-w-md",children:[(0,r.jsxs)(j.ToggleGroupItem,{value:"DENSE_VECTOR",className:"h-9 gap-1.5",children:[e.value?.includes("DENSE_VECTOR")&&(0,r.jsx)(m.Check,{className:"h-3.5 w-3.5 text-[hsl(var(--primary))]"}),t("knowledgeBase.common.searchDense")]}),(0,r.jsxs)(j.ToggleGroupItem,{value:"FULL_TEXT",className:"h-9 gap-1.5",children:[e.value?.includes("FULL_TEXT")&&(0,r.jsx)(m.Check,{className:"h-3.5 w-3.5 text-[hsl(var(--primary))]"}),t("knowledgeBase.common.searchFullText")]})]})}),(0,r.jsx)(f.FormMessage,{})]})}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-[hsl(var(--foreground))]",children:t("knowledgeBase.create.resultCount")}),(0,r.jsx)("p",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:t("knowledgeBase.create.resultCountDesc")})]}),(0,r.jsxs)("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(min(260px,100%),1fr))] gap-3",children:[(0,r.jsx)(I.RetrievalResultCountField,{control:k.control,name:"retrievalConfiguration.denseVectorSearchConfiguration.numberOfResults",label:t("knowledgeBase.common.denseTopK"),description:t("knowledgeBase.common.denseTopKDesc"),max:100,muted:!k.watch("retrievalConfiguration.searchType")?.includes("DENSE_VECTOR")}),(0,r.jsx)(I.RetrievalResultCountField,{control:k.control,name:"retrievalConfiguration.fullTextSearchConfiguration.numberOfResults",label:t("knowledgeBase.common.fullTextTopK"),description:t("knowledgeBase.common.fullTextTopKDesc"),max:100,muted:!k.watch("retrievalConfiguration.searchType")?.includes("FULL_TEXT")})]}),(0,r.jsx)(I.RetrievalResultCountField,{control:k.control,name:"retrievalConfiguration.rerankingConfiguration.numberOfResults",label:t("knowledgeBase.common.rerankTopK"),description:t("knowledgeBase.common.rerankTopKDesc"),max:200})]}),(0,r.jsx)(f.FormField,{control:k.control,name:"retrievalConfiguration.rerankingConfiguration.type",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:t("knowledgeBase.create.defaultRerankStrategy")}),(0,r.jsx)(f.FormControl,{children:(0,r.jsxs)(j.ToggleGroup,{type:"single",value:e.value??"",onValueChange:r=>{r&&e.onChange(r)},className:"grid w-full grid-cols-3 gap-0 overflow-hidden rounded-lg border border-border bg-[hsl(var(--muted)/0.4)] p-0 sm:max-w-md",children:[(0,r.jsx)(j.ToggleGroupItem,{value:"MODEL",className:"h-9",children:"Model"}),(0,r.jsx)(j.ToggleGroupItem,{value:"WEIGHT",className:"h-9",children:"Weight"}),(0,r.jsx)(j.ToggleGroupItem,{value:"RRF",className:"h-9",children:"RRF"})]})}),(0,r.jsx)(f.FormDescription,{className:"text-xs",children:t("knowledgeBase.create.rerankStrategyDesc")}),(0,r.jsx)(f.FormMessage,{})]})}),(0,r.jsxs)("div",{className:D("MODEL"===T),children:[(0,r.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:t("knowledgeBase.common.modelParams")}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsx)(f.FormField,{control:k.control,name:"retrievalConfiguration.rerankingConfiguration.modelConfiguration.provider",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:t("knowledgeBase.provider.label")}),(0,r.jsxs)(v.Select,{onValueChange:e.onChange,value:e.value??"",children:[(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(v.SelectTrigger,{children:(0,r.jsx)(v.SelectValue,{placeholder:t("knowledgeBase.provider.selectProvider")})})}),(0,r.jsx)(v.SelectContent,{children:(0,r.jsx)(v.SelectItem,{value:"bailian",children:t("knowledgeBase.provider.bailian")})})]}),(0,r.jsx)(f.FormMessage,{})]})}),(0,r.jsx)(f.FormField,{control:k.control,name:"retrievalConfiguration.rerankingConfiguration.modelConfiguration.model",render:({field:e})=>{let n=k.watch("retrievalConfiguration.rerankingConfiguration.modelConfiguration.provider");return(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:t("knowledgeBase.provider.modelName")}),(0,r.jsx)(f.FormControl,{children:"bailian"===n?(0,r.jsxs)(v.Select,{onValueChange:e.onChange,value:e.value??"",children:[(0,r.jsx)(v.SelectTrigger,{children:(0,r.jsx)(v.SelectValue,{placeholder:t("knowledgeBase.provider.selectModel")})}),(0,r.jsxs)(v.SelectContent,{children:[(0,r.jsx)(v.SelectItem,{value:"gte-rerank-v2",children:"gte-rerank-v2"}),(0,r.jsx)(v.SelectItem,{value:"qwen3-rerank",children:"qwen3-rerank"}),(0,r.jsxs)(v.SelectItem,{value:"qwen3-vl-rerank",children:["qwen3-vl-rerank",t("knowledgeBase.provider.multimodalSuffix")]})]})]}):(0,r.jsx)(h.Input,{placeholder:t("knowledgeBase.provider.inputModelName"),...e,value:e.value??""})}),(0,r.jsx)(f.FormMessage,{})]})}})]})]}),(0,r.jsxs)("div",{className:D("WEIGHT"===T),children:[(0,r.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:t("knowledgeBase.common.weightParams")}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsx)(f.FormField,{control:k.control,name:"retrievalConfiguration.rerankingConfiguration.weightConfiguration.denseVectorSearchWeight",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:t("knowledgeBase.common.denseWeight")}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(h.Input,{type:"number",step:"0.1",min:"0",max:"1",placeholder:"0.5",...e,value:e.value??"",onChange:(0,u.handleNumberInput)(e.onChange)})}),(0,r.jsx)(f.FormDescription,{children:t("knowledgeBase.common.weightRange")}),(0,r.jsx)(f.FormMessage,{})]})}),(0,r.jsx)(f.FormField,{control:k.control,name:"retrievalConfiguration.rerankingConfiguration.weightConfiguration.fullTextSearchWeight",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:t("knowledgeBase.common.fullTextWeight")}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(h.Input,{type:"number",step:"0.1",min:"0",max:"1",placeholder:"0.5",...e,value:e.value??"",onChange:(0,u.handleNumberInput)(e.onChange)})}),(0,r.jsx)(f.FormDescription,{children:t("knowledgeBase.common.weightRange")}),(0,r.jsx)(f.FormMessage,{})]})})]})]}),(0,r.jsxs)("div",{className:D("RRF"===T),children:[(0,r.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:t("knowledgeBase.common.rrfParams")}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[(0,r.jsx)(f.FormField,{control:k.control,name:"retrievalConfiguration.rerankingConfiguration.rrfConfiguration.denseVectorSearchWeight",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:t("knowledgeBase.common.denseWeight")}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(h.Input,{type:"number",step:"0.1",placeholder:"0.5",...e,value:e.value??"",onChange:(0,u.handleNumberInput)(e.onChange)})}),(0,r.jsx)(f.FormMessage,{})]})}),(0,r.jsx)(f.FormField,{control:k.control,name:"retrievalConfiguration.rerankingConfiguration.rrfConfiguration.fullTextSearchWeight",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:t("knowledgeBase.common.fullTextWeight")}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(h.Input,{type:"number",step:"0.1",placeholder:"0.5",...e,value:e.value??"",onChange:(0,u.handleNumberInput)(e.onChange)})}),(0,r.jsx)(f.FormMessage,{})]})}),(0,r.jsx)(f.FormField,{control:k.control,name:"retrievalConfiguration.rerankingConfiguration.rrfConfiguration.k",render:({field:e})=>(0,r.jsxs)(f.FormItem,{children:[(0,r.jsx)(f.FormLabel,{children:t("knowledgeBase.common.kValue")}),(0,r.jsx)(f.FormControl,{children:(0,r.jsx)(h.Input,{type:"number",placeholder:"60",...e,value:e.value??"",onChange:(0,u.handleNumberInput)(e.onChange)})}),(0,r.jsx)(f.FormMessage,{})]})})]})]})]})]})]}),(0,r.jsxs)("div",{className:"flex justify-end gap-3 pt-4 border-t",children:[(0,r.jsx)(g.Button,{type:"button",variant:"outline",onClick:()=>n.back(),children:t("common.cancel")}),(0,r.jsx)(g.Button,{type:"submit",disabled:a.isPending,children:a.isPending?t("common.creating"):t("knowledgeBase.create.submit")})]})]})})}e.s(["default",0,function(){let{t:e}=(0,F.useI18n)();return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)(n.default,{href:"/knowledge-base",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors mb-4",children:[(0,r.jsx)(a.ArrowLeft,{className:"h-4 w-4"}),e("knowledgeBase.list.backToList")]}),(0,r.jsx)(t.PageHeader,{title:e("knowledgeBase.create.title")})]}),(0,r.jsx)("div",{className:"max-w-2xl",children:(0,r.jsx)(D,{})})]})}],608897)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,694904,e=>{"use strict";var t=e.i(108365);function s(e){let t=new Date(e);return isNaN(t.getTime())?null:t}e.s(["formatDateTime",0,function(e,r="zh",i={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}){if(!e)return"-";let o=s(e);return o?o.toLocaleString(t.LOCALE_HTML_LANG[r],i):"string"==typeof e?e:"-"},"formatTimeOfDay",0,function(e,r="zh",i={hour:"2-digit",minute:"2-digit",second:"2-digit"}){if(!e)return"-";let o=s(e);return o?o.toLocaleTimeString(t.LOCALE_HTML_LANG[r],i):"string"==typeof e?e:"-"}])},70666,e=>{"use strict";var t=e.i(44501),s=e.i(465581),r=e.i(831211),i=e.i(65958),o=e.i(101685),n=e.i(480883),a=e.i(988310),l=e.i(832356),c=e.i(187014),m=e.i(942595),d=e.i(45123),u=e.i(321562),x=e.i(137500),g=e.i(712984),h=e.i(164204),p=e.i(247570),j=e.i(712912),b=e.i(828772),f=e.i(515793);function y({memoryStore:e}){let s,r=(s=(0,g.useQueryClient)(),(0,x.useMutation)({mutationFn:e=>(0,h.updateMemoryStore)(e),onSuccess:()=>{(0,p.invalidateMemoryQueries)(s)}})),{t:i}=(0,f.useI18n)(),S=(0,b.storageModeCapabilities)(e.storageMode),M=(0,o.useMemo)(()=>(0,a.zodResolver)(l.z.object({description:l.z.string().trim().max(256,i("memory.settings.descriptionMaxLength")).optional(),extractInstructions:l.z.string().trim().max(4096,i("memory.settings.extractMaxLength")).optional()})),[i]),F=(0,n.useForm)({resolver:M,defaultValues:{description:e.description??"",extractInstructions:e.extractInstructions??""}});async function L(t){try{await r.mutateAsync(function(e,t){let s={memoryStoreName:e.memoryStoreName,description:t.description?.length?t.description:void 0};if(!(0,b.storageModeCapabilities)(e.storageMode).supportsExtraction)return s;let r=e.extractInstructions??"",i=t.extractInstructions??"";return i===r?s:{...s,extractInstructions:i}}(e,t)),c.toast.success(i("memory.settings.updateSuccess"))}catch(e){c.toast.error(e instanceof Error?e.message:i("memory.settings.updateFailed"))}}return(0,j.useLocaleRevalidation)(F),(0,t.jsx)(u.Form,{...F,children:(0,t.jsxs)("form",{onSubmit:F.handleSubmit(L),className:"space-y-6",children:[(0,t.jsxs)("section",{className:"rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-5 shadow-sm",children:[(0,t.jsx)(v,{title:i("memory.settings.basicInfo"),description:i("memory.settings.basicInfoDesc")}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(N,{label:i("memory.settings.name"),value:e.memoryStoreName}),(0,t.jsx)(u.FormField,{control:F.control,name:"description",render:({field:e})=>(0,t.jsxs)(u.FormItem,{children:[(0,t.jsx)(u.FormLabel,{children:i("memory.settings.descriptionLabel")}),(0,t.jsx)(u.FormControl,{children:(0,t.jsx)(d.Textarea,{placeholder:i("memory.settings.descriptionPlaceholder"),className:"resize-none",rows:4,...e})}),(0,t.jsx)(u.FormMessage,{})]})})]})]}),S.supportsExtraction&&(0,t.jsxs)("section",{className:"rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-5 shadow-sm",children:[(0,t.jsx)(v,{title:i("memory.settings.extractSection"),description:i("memory.settings.extractSectionDesc")}),(0,t.jsx)(u.FormField,{control:F.control,name:"extractInstructions",render:({field:e})=>(0,t.jsxs)(u.FormItem,{children:[(0,t.jsx)(u.FormLabel,{children:i("memory.settings.extractLabel")}),(0,t.jsx)(u.FormControl,{children:(0,t.jsx)(d.Textarea,{placeholder:i("memory.settings.extractPlaceholder"),className:"resize-none",rows:5,...e})}),(0,t.jsx)(u.FormDescription,{children:i("memory.settings.extractHelp")}),(0,t.jsx)(u.FormMessage,{})]})})]}),(0,t.jsx)("div",{className:"flex justify-end border-t border-[hsl(var(--border-light))] pt-4",children:(0,t.jsx)(m.Button,{type:"submit",disabled:r.isPending,children:r.isPending?i("common.saving"):i("common.saveChanges")})})]})})}function v({title:e,description:s}){return(0,t.jsxs)("header",{className:"mb-4 border-b border-[hsl(var(--border-light))] pb-3",children:[(0,t.jsx)("h3",{className:"text-[15px] font-semibold leading-tight text-[hsl(var(--foreground))]",children:e}),(0,t.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-[hsl(var(--muted-foreground))]",children:s})]})}function N({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:e}),(0,t.jsx)("span",{className:"text-sm font-medium",children:s})]})}var S=e.i(694904);function M({title:e,description:s}){return(0,t.jsxs)("header",{className:"mb-4 border-b border-[hsl(var(--border-light))] pb-3",children:[(0,t.jsx)("h3",{className:"text-[15px] font-semibold leading-tight text-[hsl(var(--foreground))]",children:e}),(0,t.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-[hsl(var(--muted-foreground))]",children:s})]})}function F({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:e}),(0,t.jsx)("span",{className:"text-sm font-medium",children:s})]})}e.s(["default",0,function(){let{t:e,locale:o}=(0,f.useI18n)(),n=decodeURIComponent((0,s.useParams)().store),{data:a,isLoading:l}=(0,i.useMemoryStore)(n);return l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(r.Skeleton,{className:"h-8 w-48"}),(0,t.jsx)(r.Skeleton,{className:"h-32 w-full"})]}):a?(0,t.jsxs)("div",{className:"grid gap-6 xl:grid-cols-[minmax(0,1fr)_320px]",children:[(0,t.jsx)(y,{memoryStore:a}),(0,t.jsx)("aside",{className:"space-y-6",children:(0,t.jsxs)("section",{className:"rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-5 shadow-sm",children:[(0,t.jsx)(M,{title:e("memory.settings.infoTitle"),description:e("memory.settings.infoDesc")}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(F,{label:e("memory.settings.storageMode"),value:`${(0,b.storageModeLabel)(a.storageMode,e)}(${a.storageMode??"ots"})`}),(0,t.jsx)(F,{label:e("memory.settings.otsInstance"),value:a.otsInstance??"-"}),(0,t.jsx)(F,{label:e("memory.settings.createdAt"),value:(0,S.formatDateTime)(a.createdAt,o)}),(0,t.jsx)(F,{label:e("memory.settings.updatedAt"),value:(0,S.formatDateTime)(a.updatedAt,o)}),a.lastSeenAt&&(0,t.jsx)(F,{label:e("memory.settings.lastSeenAt"),value:(0,S.formatDateTime)(a.lastSeenAt,o)})]})]})})]}):(0,t.jsx)("div",{className:"py-12 text-center text-muted-foreground",children:e("memory.common.notFound")})}],70666)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,12251,e=>{"use strict";var t=e.i(44501),r=e.i(101685),a=e.i(433253),s=e.i(942595),i=e.i(723888),n=e.i(515793);e.s(["ConfirmDialog",0,function({open:e,onOpenChange:l,title:o,description:c,confirmText:d,cancelText:m,variant:u="default",onConfirm:h,confirmInput:f,children:p}){let{t:y}=(0,n.useI18n)(),[x,v]=(0,r.useState)(""),g=void 0!==f&&""!==f,b=g&&x!==f,j=(0,r.useCallback)(()=>{b||(h(),v(""))},[b,h]),M=(0,r.useCallback)(e=>{e||v(""),l(e)},[l]);return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:M,children:(0,t.jsxs)(a.DialogContent,{className:"sm:max-w-120",children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:o}),(0,t.jsx)(a.DialogDescription,{className:"break-all",children:c})]}),g&&(0,t.jsxs)("div",{className:"py-2",children:[(0,t.jsx)("p",{className:"mb-2 text-sm text-muted-foreground",children:y("common.confirmInputPrompt",{value:f??""})}),(0,t.jsx)(i.Input,{value:x,onChange:e=>v(e.target.value),placeholder:f,autoFocus:!0})]}),p&&(0,t.jsx)("div",{className:"py-1",children:p}),(0,t.jsxs)(a.DialogFooter,{children:[(0,t.jsx)(s.Button,{variant:"outline",onClick:()=>M(!1),children:m??y("common.cancel")}),(0,t.jsx)(s.Button,{variant:"danger"===u?"destructive":"default",onClick:j,disabled:b,children:d??y("common.confirm")})]})]})})}])},828772,906962,e=>{"use strict";function t(e="id"){return"u">typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():`${e}_${Date.now()}_${Math.random().toString(36).slice(2)}`}e.s(["newId",0,t],906962);let r="__default__";function a(){return t("run")}let s=["units","search","messages","tasks","requests","dream","settings"],i=["units","settings"],n=["longTerm","shortTerm","extract","consolidate"],l=["files"],o=["units","search","settings"],c=["units","settings"];function d(e){return"filemem"===e?"filemem":"file+ots"===e||"oss+ots"===e?"file+ots":"ots"}function m(e){return"file"===e?{inputType:e,storageStructures:["file"]}:{inputType:e,storageStructures:["structured"]}}function u(e){let t=d(e),r="filemem"!==t;return{mode:t,files:"ots"!==t,structured:r,writableFiles:"filemem"===t,forceLocalRetrieval:"filemem"===t,structuredAutoSave:r,supportsExtraction:r,detailSegments:[...r?s:i],cardShortcuts:[...r?n:l],cardActions:[...r?o:c]}}e.s(["FILEMEM_DEFAULT_RUN_ID",0,r,"memoryStorageSelectionForInput",0,m,"normalizeMemoryRunId",0,function(e,t,s=a){return"filemem"===e?r:t&&t!==r?t:s()},"normalizeStorageMode",0,d,"resolveMemoryDetailSegment",0,function(e,t){let{detailSegments:r}=u(e);return r.includes(t)?t:"units"},"resolveRetrievalMode",0,function(e,t){let r="boolean"==typeof t?t?"file+ots":"ots":d(t);return"filemem"===r?"local":"ots"===r?"search":"local"===e?"local":"search"},"storageModeCapabilities",0,u,"storageModeLabel",0,function(e,t){let r=d(e);return t?t("filemem"===r?"memory.storageMode.writableFileLabel":"file+ots"===r?"memory.storageMode.projectedFileLabel":"memory.storageMode.apiOnlyLabel"):"filemem"===r?"Writable File Memory":"file+ots"===r?"Read-only File Projection":"API-only Memory"},"storageModeToSelection",0,function(e){let t=d(e);return"filemem"===t?m("file"):"file+ots"===t?{inputType:"short-term",storageStructures:["structured","file"]}:m("short-term")},"storageSelectionToMode",0,function(e){let t=new Set(e.storageStructures),r=t.size!==e.storageStructures.length;if(!r&&"file"===e.inputType&&1===t.size&&t.has("file"))return"filemem";if(!r&&"short-term"===e.inputType&&t.has("structured")){if(1===t.size)return"ots";if(2===t.size&&t.has("file"))return"file+ots"}throw Error("Invalid memory input and storage structure combination")},"toggleMemoryFileStorage",0,function(e){return"file"===e.inputType?m("file"):e.storageStructures.includes("file")?m("short-term"):{inputType:"short-term",storageStructures:["structured","file"]}}],828772)},229025,e=>{"use strict";let t=(0,e.i(801685).default)("folder-tree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);e.s(["FolderTree",0,t],229025)},983823,e=>{"use strict";let t=(0,e.i(801685).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",0,t],983823)},165658,e=>{"use strict";let t=(0,e.i(801685).default)("file-clock",[["path",{d:"M16 22h2a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v2.85",key:"ryk6xj"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 14v2.2l1.6 1",key:"6m4bie"}],["circle",{cx:"8",cy:"16",r:"6",key:"10v15b"}]]);e.s(["FileClock",0,t],165658)},520647,516007,711836,e=>{"use strict";var t=e.i(124561),r=e.i(137500),a=e.i(543876),s=e.i(712984),i=e.i(247570),n=e.i(307166),l=e.i(593321);function o(e,t,r){return(0,l.apiPost)(`/api/v1/memory/stores/${encodeURIComponent(e)}/file-memory/${t}`,r)}function c(e,t){return o(e,"list",t)}function d(e,t){return o(e,"read",t)}function m(e,t){return o(e,"create",t)}function u(e,t){return o(e,"update",t)}function h(e,t){return o(e,"rename",t)}function f(e,t){return o(e,"delete",t)}function p(e,t){return o(e,"versions-list",t)}function y(e,t){return o(e,"versions-get",t)}function x(e){return!!(e&&e.appId&&e.tenantId&&e.agentId&&e.runId&&!Object.values(e).includes("*"))}function v(e){let t=(0,n.useDataScopeKey)(),a=(0,s.useQueryClient)();return(0,r.useMutation)({mutationFn:({memoryStoreName:t,...r})=>e(t,r),onSuccess:(e,r)=>a.invalidateQueries({queryKey:i.fileMemoryQueryKeys.root(t,r.memoryStoreName,r.scope)})})}e.s(["createFileMemory",0,m,"deleteFileMemory",0,f,"getFileMemoryVersion",0,y,"listFileMemories",0,c,"listFileMemoryVersions",0,p,"readFileMemory",0,d,"renameFileMemory",0,h,"updateFileMemory",0,u],516007),e.s(["useCreateFileMemory",0,function(){return v(m)},"useDeleteFileMemory",0,function(){return v(f)},"useFileMemories",0,function(e,r,a={}){let s=(0,n.useDataScopeKey)();return(0,t.useInfiniteQuery)({queryKey:i.fileMemoryQueryKeys.list(s,e??"",r,a.pathPrefix),queryFn:({pageParam:t})=>c(e,{scope:r,...a.pathPrefix?{pathPrefix:a.pathPrefix}:{},...a.limit?{limit:a.limit}:{},..."string"==typeof t?{nextToken:t}:{}}),getNextPageParam:e=>e.nextToken??void 0,initialPageParam:void 0,enabled:!1!==a.enabled&&!!e&&x(r)})},"useFileMemory",0,function(e,t,r){let s=(0,n.useDataScopeKey)();return(0,a.useQuery)({queryKey:i.fileMemoryQueryKeys.file(s,e??"",t,r??""),queryFn:()=>d(e,{scope:t,path:r}),enabled:!!e&&x(t)&&!!r})},"useFileMemoryVersion",0,function(e,t,r,s,l){let o=(0,n.useDataScopeKey)();return(0,a.useQuery)({queryKey:i.fileMemoryQueryKeys.version(o,e??"",t,r??"",s??"",l??0),queryFn:()=>y(e,{scope:t,memoryId:r,memoryVersionId:s,versionSeq:l}),enabled:!!e&&x(t)&&!!r&&!!s&&void 0!==l})},"useFileMemoryVersions",0,function(e,r,a,s,l={}){let o=(0,n.useDataScopeKey)();return(0,t.useInfiniteQuery)({queryKey:i.fileMemoryQueryKeys.versions(o,e??"",r,a??"",s),queryFn:({pageParam:t})=>p(e,{scope:r,memoryId:a,...s?{path:s}:{},...l.limit?{limit:l.limit}:{},...l.operation?{operation:l.operation}:{},..."string"==typeof t?{nextToken:t}:{}}),getNextPageParam:e=>e.nextToken??void 0,initialPageParam:void 0,enabled:!!e&&x(r)&&!!a})},"useRenameFileMemory",0,function(){return v(h)},"useUpdateFileMemory",0,function(){return v(u)}],520647);var g=e.i(44501),b=e.i(101685),j=e.i(309823),M=e.i(179297),N=e.i(51517),w=e.i(45123),k=e.i(515793),P=e.i(876490);function F(e){let t=e.trim();return`/${t.replace(/^\/+/,"")}`}e.s(["FileEditor",0,function({path:e,content:t,dirty:r,readOnly:a,loading:s,error:i,conflict:n,onChange:l}){let{t:o}=(0,k.useI18n)(),c=(0,b.useMemo)(()=>new TextEncoder().encode(t).byteLength,[t]);return e?s?(0,g.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-sm text-muted-foreground",children:[(0,g.jsx)(N.Loader2,{className:"h-4 w-4 animate-spin"}),o("common.loading")]}):i?(0,g.jsx)("div",{className:"flex h-full items-center justify-center p-8 text-sm text-[hsl(var(--destructive))]",children:o("memory.files.readFailed",{error:i})}):(0,g.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,g.jsxs)("div",{className:"flex items-center justify-between border-b border-[hsl(var(--border))] px-3 py-2",children:[(0,g.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,g.jsx)(M.FileText,{className:"h-4 w-4 shrink-0 text-[hsl(var(--primary))]"}),(0,g.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),r?(0,g.jsx)("span",{className:"shrink-0 rounded-full bg-amber-500/15 px-2 py-0.5 text-[10px] font-medium text-amber-700 dark:text-amber-300",children:o("memory.files.unsaved")}):null]}),(0,g.jsx)("span",{className:(0,P.cn)("shrink-0 text-[10px] text-muted-foreground",c>102400&&"text-[hsl(var(--destructive))]"),children:o("memory.files.byteCount",{count:c,limit:102400})})]}),n?(0,g.jsxs)("div",{className:"flex items-start gap-2 border-b border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs text-amber-800 dark:text-amber-200",children:[(0,g.jsx)(j.AlertTriangle,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,g.jsx)("span",{children:o("memory.files.shaConflict")})]}):null,(0,g.jsx)(w.Textarea,{"aria-label":o("memory.files.editorLabel"),value:t,onChange:e=>l(e.target.value),readOnly:a,spellCheck:!1,className:"min-h-0 flex-1 resize-none rounded-none border-0 bg-transparent p-4 font-mono text-xs leading-5 shadow-none focus-visible:ring-0",placeholder:o("memory.files.editorPlaceholder")})]}):(0,g.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-8 text-center text-muted-foreground",children:[(0,g.jsx)(M.FileText,{className:"h-9 w-9 opacity-30"}),(0,g.jsx)("p",{className:"text-sm",children:o("memory.files.selectFile")})]})},"normalizeFileMemoryPath",0,F,"validateFileMemoryContent",0,function(e){return new TextEncoder().encode(e).byteLength>102400?"content-too-large":null},"validateFileMemoryPath",0,function(e){let t=F(e);return"/"===t?"path-required":t.split("/").some(e=>".."===e)?"path-traversal":new TextEncoder().encode(t).byteLength>800?"path-too-large":null}],711836)},330363,e=>{"use strict";let t=(0,e.i(801685).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],330363)},396416,e=>{"use strict";let t=(0,e.i(801685).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,t],396416)},179297,e=>{"use strict";let t=(0,e.i(801685).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,t],179297)},51517,e=>{"use strict";let t=(0,e.i(801685).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],51517)},533153,e=>{"use strict";let t=(0,e.i(801685).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],533153)},124561,e=>{"use strict";var t=e.i(550458),r=e.i(792571),a=class extends t.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,r.infiniteQueryBehavior)()})}getOptimisticResult(e){return e.behavior=(0,r.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:a}=e,s=super.createResult(e,t),{isFetching:i,isRefetching:n,isError:l,isRefetchError:o}=s,c=a.fetchMeta?.fetchMore?.direction,d=l&&"forward"===c,m=i&&"forward"===c,u=l&&"backward"===c,h=i&&"backward"===c;return{...s,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,r.hasNextPage)(t,a.data),hasPreviousPage:(0,r.hasPreviousPage)(t,a.data),isFetchNextPageError:d,isFetchingNextPage:m,isFetchPreviousPageError:u,isFetchingPreviousPage:h,isRefetchError:o&&!d&&!u,isRefetching:n&&!m&&!h}}},s=e.i(840870);e.s(["useInfiniteQuery",0,function(e,t){return(0,s.useBaseQuery)(e,a,t)}],124561)},551031,e=>{"use strict";let t=(0,e.i(801685).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["Folder",0,t],551031)},736247,e=>{"use strict";let t=(0,e.i(801685).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",0,t],736247)},843226,e=>{"use strict";let t=(0,e.i(801685).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["Save",0,t],843226)},949456,579081,e=>{"use strict";var t=e.i(44501),r=e.i(101685),a=e.i(820268),s=e.i(979980),i=e.i(179297),n=e.i(551031),l=e.i(736247),o=e.i(229025),c=e.i(396416),d=e.i(187014),m=e.i(942595),u=e.i(723888),h=e.i(520647),f=e.i(515793),p=e.i(876490),y=e.i(593321),x=e.i(165658),v=e.i(801685);let g=(0,v.default)("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]),b=(0,v.default)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]);var j=e.i(892362);let M=(0,v.default)("clock-3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]);e.s(["Clock3",0,M],579081);var N=e.i(51517),w=e.i(983823);function k({memoryStoreName:e,scope:a,file:s,readOnly:i,onRestored:n}){let{t:l}=(0,f.useI18n)(),[o,c]=(0,r.useState)(null),u=(0,h.useFileMemoryVersions)(e,a,s.memoryId,s.path,{limit:50}),p=(0,h.useFileMemoryVersion)(e,a,s.memoryId,o?.id,o?.seq),y=(0,h.useCreateFileMemory)(),x=(0,h.useUpdateFileMemory)(),v=(0,r.useMemo)(()=>u.data?.pages.flatMap(e=>e.versions)??[],[u.data?.pages]);async function g(){if(p.data)try{let t=function(e,t,r,a){if(void 0===a.content)throw Error("VERSION_CONTENT_UNAVAILABLE");return r?{kind:"update",request:{memoryStoreName:e,scope:t,path:r.path,content:a.content,expectedSha256:r.contentSha256}}:{kind:"create",request:{memoryStoreName:e,scope:t,path:a.path,content:a.content}}}(e,a,s,p.data),r="update"===t.kind?await x.mutateAsync(t.request):await y.mutateAsync(t.request);n?.(r,p.data.content??""),d.toast.success(l("memory.files.restoreSuccess"))}catch(e){d.toast.error(e instanceof Error?e.message:l("memory.files.restoreFailed"))}}return i?null:(0,t.jsxs)("section",{className:"min-h-0 border-t border-[hsl(var(--border))] pt-3",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,t.jsxs)("h4",{className:"flex items-center gap-1.5 text-xs font-semibold",children:[(0,t.jsx)(M,{className:"h-3.5 w-3.5"}),l("memory.files.versionHistory")]}),u.hasNextPage?(0,t.jsx)(m.Button,{type:"button",variant:"ghost",size:"sm",disabled:u.isFetchingNextPage,onClick:()=>void u.fetchNextPage(),children:l("memory.files.loadMore")}):null]}),u.isLoading?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:l("common.loading")}):0===v.length?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:l("memory.files.noVersions")}):(0,t.jsx)("div",{className:"max-h-48 space-y-1 overflow-auto pr-1",children:v.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>c({id:e.memoryVersionId,seq:e.versionSeq}),className:"flex w-full items-center justify-between rounded-md border border-transparent px-2 py-1.5 text-left text-xs hover:border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))]",children:[(0,t.jsxs)("span",{children:["v",e.versionSeq," · ",e.operation]}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:new Date(e.createdAt).toLocaleString()})]},`${e.memoryVersionId}:${e.versionSeq}`))}),o?(0,t.jsx)("div",{className:"mt-3 rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.25)] p-2",children:p.isLoading?(0,t.jsx)(N.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"}):p.data?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:"max-h-40 overflow-auto whitespace-pre-wrap break-words font-mono text-[11px] leading-4",children:p.data.content??l("memory.files.contentUnavailable")}),(0,t.jsxs)(m.Button,{type:"button",size:"sm",variant:"outline",className:"mt-2 w-full",disabled:void 0===p.data.content||x.isPending||y.isPending,onClick:()=>void g(),children:[(0,t.jsx)(w.RotateCcw,{}),l("memory.files.restoreVersion")]})]}):null}):null]})}function P({icon:e,label:r,value:a}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"mt-0.5 text-muted-foreground",children:e}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:r}),(0,t.jsx)("div",{className:"break-all text-xs",children:a})]})]})}function F({memoryStoreName:e,scope:r,file:a,readOnly:s,onRestored:i}){let{t:n}=(0,f.useI18n)();return a?(0,t.jsxs)("div",{className:"h-full min-h-0 overflow-auto p-3",children:[(0,t.jsx)("h3",{className:"mb-2 text-xs font-semibold",children:n("memory.files.details")}),(0,t.jsx)(P,{icon:(0,t.jsx)(b,{className:"h-3.5 w-3.5"}),label:n("memory.files.size"),value:`${a.contentSizeBytes.toLocaleString()} B`}),(0,t.jsx)(P,{icon:(0,t.jsx)(j.ListOrdered,{className:"h-3.5 w-3.5"}),label:n("memory.files.latestVersion"),value:`v${a.latestSeq}`}),(0,t.jsx)(P,{icon:(0,t.jsx)(g,{className:"h-3.5 w-3.5"}),label:"SHA-256",value:(0,t.jsx)("span",{className:"font-mono text-[10px]",children:a.contentSha256})}),(0,t.jsx)(P,{icon:(0,t.jsx)(x.FileClock,{className:"h-3.5 w-3.5"}),label:n("memory.files.updatedAt"),value:new Date(a.updatedAt).toLocaleString()}),(0,t.jsx)(k,{memoryStoreName:e,scope:r,file:a,readOnly:s,onRestored:i})]}):(0,t.jsx)("div",{className:"flex h-full items-center justify-center p-5 text-center text-xs text-muted-foreground",children:n("memory.files.selectForDetails")})}var S=e.i(711836),C=e.i(433253),T=e.i(766476),z=e.i(45123);let L={"path-required":"memory.files.pathRequired","path-traversal":"memory.files.pathTraversal","path-too-large":"memory.files.pathTooLarge","content-too-large":"memory.files.contentTooLarge"};function I({mode:e,selectedPath:a,pending:s,onClose:i,onCreate:n,onRename:l,onDelete:o}){let{t:c}=(0,f.useI18n)(),[d,h]=(0,r.useState)(""),[p,y]=(0,r.useState)(""),[x,v]=(0,r.useState)(null);async function g(){v(null);try{if("delete"===e)await o();else{let t=(0,S.validateFileMemoryPath)(d);if(t)return void v(c(L[t]));if("create"===e){let e=(0,S.validateFileMemoryContent)(p);if(e)return void v(c(L[e]));await n((0,S.normalizeFileMemoryPath)(d),p)}else"rename"===e&&await l((0,S.normalizeFileMemoryPath)(d))}i()}catch(e){v(e instanceof Error?e.message:c("common.unknownError"))}}(0,r.useEffect)(()=>{h("rename"===e?a??"":""),y(""),v(null)},[e,a]);let b={create:c("memory.files.createTitle"),rename:c("memory.files.renameTitle"),delete:c("memory.files.deleteTitle")},j={create:c("common.create"),rename:c("memory.files.rename"),delete:c("common.delete")},M=e?b[e]:"",w=e?j[e]:"";return(0,t.jsx)(C.Dialog,{open:null!==e,onOpenChange:e=>!e&&i(),children:(0,t.jsxs)(C.DialogContent,{className:"sm:max-w-lg",children:[(0,t.jsxs)(C.DialogHeader,{children:[(0,t.jsx)(C.DialogTitle,{children:M}),(0,t.jsx)(C.DialogDescription,{children:"delete"===e?c("memory.files.deleteDescription",{path:a??""}):c("memory.files.pathHelp")})]}),"delete"!==e?(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(T.Label,{htmlFor:"file-memory-path",children:c("memory.files.pathLabel")}),(0,t.jsx)(u.Input,{id:"file-memory-path",autoFocus:!0,value:d,onChange:e=>h(e.target.value),placeholder:"/notes/profile.md"})]}),"create"===e?(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(T.Label,{htmlFor:"file-memory-content",children:c("memory.files.initialContent")}),(0,t.jsx)(z.Textarea,{id:"file-memory-content",value:p,onChange:e=>y(e.target.value),rows:8,className:"font-mono text-xs"})]}):null]}):null,x?(0,t.jsx)("p",{className:"text-xs text-[hsl(var(--destructive))]",children:x}):null,(0,t.jsxs)(C.DialogFooter,{children:[(0,t.jsx)(m.Button,{type:"button",variant:"outline",onClick:i,children:c("common.cancel")}),(0,t.jsxs)(m.Button,{type:"button",variant:"delete"===e?"destructive":"default",onClick:()=>void g(),disabled:s,children:[s?(0,t.jsx)(N.Loader2,{className:"animate-spin"}):null,w]})]})]})})}let D=(0,v.default)("file-plus-corner",[["path",{d:"M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35",key:"17jvcc"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M14 19h6",key:"bvotb8"}],["path",{d:"M17 16v6",key:"18yu1i"}]]);var A=e.i(533153),E=e.i(730068),R=e.i(843226),q=e.i(330363);function H({readOnly:e,loading:r,hasSelection:a,dirty:s,saving:i,onCreate:n,onRename:l,onDelete:o,onRefresh:c,onSave:d}){let{t:u}=(0,f.useI18n)();return(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.2)] px-3 py-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)(m.Button,{type:"button",size:"sm",onClick:n,disabled:e||r||s,children:[(0,t.jsx)(D,{}),u("memory.files.newFile")]}),(0,t.jsxs)(m.Button,{type:"button",size:"sm",variant:"outline",onClick:l,disabled:e||!a||s,children:[(0,t.jsx)(A.Pencil,{}),u("memory.files.rename")]}),(0,t.jsxs)(m.Button,{type:"button",size:"sm",variant:"outline",onClick:o,disabled:e||!a||s,className:"text-[hsl(var(--destructive))]",children:[(0,t.jsx)(q.Trash2,{}),u("common.delete")]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"mr-1 rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-2 py-0.5 text-[10px] text-muted-foreground",children:u(e?"memory.files.readOnlyMode":"memory.files.writableMode")}),(0,t.jsxs)(m.Button,{type:"button",size:"sm",variant:"outline",onClick:c,disabled:r,children:[(0,t.jsx)(E.RefreshCw,{className:r?"animate-spin":void 0}),u("common.refresh")]}),(0,t.jsxs)(m.Button,{type:"button",size:"sm",onClick:d,disabled:e||!a||!s||i,children:[i?(0,t.jsx)(N.Loader2,{className:"animate-spin"}):(0,t.jsx)(R.Save,{}),u(i?"common.saving":"common.save")]})]})]})}let O={selectedPath:null,content:"",loadedSha256:null,dirty:!1,conflict:null};function V(e,t){switch(t.type){case"select":return{...O,selectedPath:t.path};case"load":if(e.selectedPath!==t.path)return e;return{selectedPath:t.path,content:t.content,loadedSha256:t.sha256,dirty:!1,conflict:null};case"edit":return{...e,content:t.content,dirty:!0,conflict:null};case"save-success":return{...e,content:t.content??e.content,loadedSha256:t.sha256,dirty:!1,conflict:null};case"save-conflict":return{...e,dirty:!0,conflict:t.message}}}function B(e,t,r){return!e.dirty||t===e.selectedPath||r()}o.FolderTree,e.s(["MemoryFilesBrowser",0,function({memoryStoreName:e,scope:o,enabled:x=!0,initialPath:v,className:g}){let{t:b}=(0,f.useI18n)(),[j,M]=(0,r.useReducer)(V,O),N=(0,r.useRef)(j);N.current=j;let w=(0,r.useRef)(b);w.current=b;let[k,P]=(0,r.useState)(new Set),[C,T]=(0,r.useState)(""),[z,L]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(v){let e=(0,S.normalizeFileMemoryPath)(v);B(N.current,e,()=>window.confirm(w.current("memory.files.discardChanges")))&&M({type:"select",path:e})}},[v]);let D=(0,h.useFileMemories)(e,o,{limit:100,enabled:x}),A=(0,h.useFileMemory)(e,o,j.selectedPath),E=(0,h.useCreateFileMemory)(),R=(0,h.useUpdateFileMemory)(),q=(0,h.useRenameFileMemory)(),K=(0,h.useDeleteFileMemory)(),_=D.data?.pages,Q=(0,r.useMemo)(()=>{let e=new Map;for(let t of _??[])for(let r of t.memories)e.set((0,S.normalizeFileMemoryPath)(r.path),{...r,path:(0,S.normalizeFileMemoryPath)(r.path)});return Array.from(e.values()).sort((e,t)=>e.path.localeCompare(t.path))},[_]),U=(0,r.useMemo)(()=>{let e=C.trim().toLocaleLowerCase();return e?Q.filter(t=>t.path.toLocaleLowerCase().includes(e)):Q},[C,Q]),$=(0,r.useMemo)(()=>new Map(Q.map(e=>[e.path,e])),[Q]),Z=(0,r.useMemo)(()=>{var e;let t,r;return e=function(e){let t={type:"dir",name:"",rel:"",children:[]};for(let r of e){let e=r.rel.split("/").filter(Boolean);if(0===e.length)continue;let a=t;for(let t=0;t<e.length-1;t+=1){let r=e[t],s=e.slice(0,t+1).join("/"),i=a.children.find(e=>"dir"===e.type&&e.name===r);i||(i={type:"dir",name:r,rel:s,children:[]},a.children.push(i)),a=i}let s=e[e.length-1];a.children.some(e=>"file"===e.type&&e.name===s)||a.children.push({type:"file",name:s,rel:r.rel,size:r.size})}return!function e(t){for(let r of(t.sort((e,t)=>e.type!==t.type?"dir"===e.type?-1:1:e.name.localeCompare(t.name)),t))"dir"===r.type&&e(r.children)}(t.children),t}(U.map(e=>({rel:e.path.replace(/^\/+/,""),size:e.contentSizeBytes}))),t=[],(r=(e,a)=>{for(let s of e)t.push({node:s,depth:a}),"dir"!==s.type||k.has(s.rel)||r(s.children,a+1)})(e.children,0),t},[U,k]),G=_?.some(e=>!0===e.readOnly)??!1,W=j.selectedPath?$.get(j.selectedPath)??A.data:void 0;async function J(){if((0,S.validateFileMemoryContent)(j.content))return void d.toast.error(b("memory.files.contentTooLarge"));try{let t=await R.mutateAsync(function(e,t,r){if(!r.selectedPath)throw Error("FILE_NOT_SELECTED");return{memoryStoreName:e,scope:t,path:r.selectedPath,content:r.content,...r.loadedSha256?{expectedSha256:r.loadedSha256}:{}}}(e,o,j));M({type:"save-success",sha256:t.contentSha256,content:j.content}),d.toast.success(b("memory.files.saveSuccess"))}catch(t){let e=t instanceof Error?t.message:String(t);if(t instanceof y.ApiClientError&&"SHA_MISMATCH"===t.code||t instanceof Error&&t.message.includes("SHA_MISMATCH"))return void M({type:"save-conflict",message:e});d.toast.error(e||b("memory.files.saveFailed"))}}async function X(t,r){let a=await E.mutateAsync({memoryStoreName:e,scope:o,path:t,content:r});M({type:"select",path:(0,S.normalizeFileMemoryPath)(a.path)}),d.toast.success(b("memory.files.createSuccess"))}async function Y(t){if(!j.selectedPath)return;let r=await q.mutateAsync({memoryStoreName:e,scope:o,fromPath:j.selectedPath,toPath:t,expectedSha256:W?.contentSha256});M({type:"select",path:(0,S.normalizeFileMemoryPath)(r.path)}),d.toast.success(b("memory.files.renameSuccess"))}async function ee(){j.selectedPath&&(await K.mutateAsync({memoryStoreName:e,scope:o,path:j.selectedPath,expectedSha256:W?.contentSha256}),M({type:"select",path:null}),d.toast.success(b("memory.files.deleteSuccess")))}async function et(){await D.refetch(),j.selectedPath&&await A.refetch()}(0,r.useEffect)(()=>{let e=A.data;e&&!j.dirty&&j.selectedPath&&M({type:"load",path:(0,S.normalizeFileMemoryPath)(e.path),content:e.content??"",sha256:e.contentSha256})},[j.dirty,j.selectedPath,A.data,A.data?.content,A.data?.contentSha256,A.data?.path]);let er=E.isPending||q.isPending||K.isPending;return(0,t.jsxs)("div",{className:(0,p.cn)("flex min-h-[440px] flex-col overflow-hidden rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))]",g),children:[(0,t.jsx)(H,{readOnly:G,loading:D.isLoading||D.isRefetching,hasSelection:!!j.selectedPath,dirty:j.dirty,saving:R.isPending,onCreate:()=>L("create"),onRename:()=>L("rename"),onDelete:()=>L("delete"),onRefresh:()=>void et(),onSave:()=>void J()}),G?(0,t.jsx)("div",{className:"border-b border-blue-500/20 bg-blue-500/10 px-3 py-2 text-xs text-blue-800 dark:text-blue-200",children:b("memory.files.readOnlyGuidance")}):null,(0,t.jsxs)("div",{className:"grid min-h-0 flex-1 grid-cols-1 lg:grid-cols-[250px_minmax(320px,1fr)_290px]",children:[(0,t.jsxs)("aside",{className:"flex min-h-0 flex-col border-b border-[hsl(var(--border))] lg:border-r lg:border-b-0",children:[(0,t.jsxs)("div",{className:"border-b border-[hsl(var(--border))] p-2",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(c.Search,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(u.Input,{value:C,onChange:e=>T(e.target.value),placeholder:b("memory.files.searchPlaceholder"),className:"h-7 pl-8 text-xs"})]}),(0,t.jsx)("p",{className:"mt-1.5 px-1 text-[10px] text-muted-foreground",children:b("memory.files.fileCount",{count:Q.length})})]}),(0,t.jsxs)("div",{className:"min-h-[160px] flex-1 overflow-auto p-1.5",children:[D.isLoading?(0,t.jsx)("p",{className:"p-2 text-xs text-muted-foreground",children:b("common.loading")}):D.isError?(0,t.jsx)("p",{className:"p-2 text-xs text-[hsl(var(--destructive))]",children:D.error.message}):0===Z.length?(0,t.jsx)("p",{className:"p-3 text-center text-xs text-muted-foreground",children:b("memory.files.emptyHint")}):Z.map(({node:e,depth:r})=>{let o={paddingLeft:`${12*r+6}px`};if("dir"===e.type){let r=!k.has(e.rel);return(0,t.jsxs)("button",{type:"button",onClick:()=>{var t;return t=e.rel,void P(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r})},style:o,className:"flex w-full items-center gap-1 rounded px-1.5 py-1.5 text-left text-xs hover:bg-[hsl(var(--accent))]",children:[r?(0,t.jsx)(a.ChevronDown,{className:"h-3 w-3"}):(0,t.jsx)(s.ChevronRight,{className:"h-3 w-3"}),r?(0,t.jsx)(l.FolderOpen,{className:"h-3.5 w-3.5 text-[hsl(var(--primary))]"}):(0,t.jsx)(n.Folder,{className:"h-3.5 w-3.5 text-[hsl(var(--primary))]"}),(0,t.jsx)("span",{className:"truncate font-mono",children:e.name})]},`dir:${e.rel}`)}let c=(0,S.normalizeFileMemoryPath)(e.rel);return(0,t.jsxs)("button",{type:"button",onClick:()=>{B(j,c,()=>window.confirm(b("memory.files.discardChanges")))&&M({type:"select",path:c})},style:o,className:(0,p.cn)("flex w-full items-center gap-1.5 rounded px-1.5 py-1.5 text-left text-xs hover:bg-[hsl(var(--accent))]",j.selectedPath===c&&"bg-[hsl(var(--primary-soft))] text-[hsl(var(--primary))]"),title:c,children:[(0,t.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,t.jsx)(i.FileText,{className:"h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono",children:e.name})]},`file:${c}`)}),D.hasNextPage?(0,t.jsx)(m.Button,{type:"button",size:"sm",variant:"ghost",className:"mt-2 w-full",disabled:D.isFetchingNextPage,onClick:()=>void D.fetchNextPage(),children:b("memory.files.loadMore")}):null]})]}),(0,t.jsx)("main",{className:"min-h-[280px] border-b border-[hsl(var(--border))] lg:border-r lg:border-b-0",children:(0,t.jsx)(S.FileEditor,{path:j.selectedPath,content:j.content,dirty:j.dirty,readOnly:G,loading:A.isLoading,error:A.error instanceof Error?A.error.message:void 0,conflict:j.conflict,onChange:e=>M({type:"edit",content:e})})}),(0,t.jsx)("aside",{className:"min-h-[220px]",children:(0,t.jsx)(F,{memoryStoreName:e,scope:o,file:W,readOnly:G,onRestored:(e,t)=>M({type:"load",path:(0,S.normalizeFileMemoryPath)(e.path),content:t,sha256:e.contentSha256})})})]}),(0,t.jsx)(I,{mode:z,selectedPath:j.selectedPath,pending:er,onClose:()=>L(null),onCreate:X,onRename:Y,onDelete:ee})]})}],949456)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,7284,e=>{"use strict";e.s(["clsx",0,function(){for(var e,t,r=0,i="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=function e(t){var r,i,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t)){var s=t.length;for(r=0;r<s;r++)t[r]&&(i=e(t[r]))&&(n&&(n+=" "),n+=i)}else for(i in t)t[i]&&(n&&(n+=" "),n+=i);return n}(e))&&(i&&(i+=" "),i+=t);return i}])},967928,e=>{"use strict";var t=e.i(101685);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return t=>{let i=!1,n=e.map(e=>{let n=r(e,t);return i||"function"!=typeof n||(i=!0),n});if(i)return()=>{for(let t=0;t<n.length;t++){let i=n[t];"function"==typeof i?i():r(e[t],null)}}}}e.s(["composeRefs",0,i,"useComposedRefs",0,function(...e){return t.useCallback(i(...e),e)}])},206102,e=>{"use strict";var t=e.i(101685),r=e.i(967928),i=e.i(44501),n=Symbol.for("react.lazy"),s=t[" use ".trim().toString()];function o(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===n&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}function l(e){var n;let l,a=(n=e,(l=t.forwardRef((e,i)=>{let{children:n,...l}=e;if(o(n)&&"function"==typeof s&&(n=s(n._payload)),t.isValidElement(n)){var a;let e,s,o=(a=n,(s=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(s=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),u=function(e,t){let r={...t};for(let i in t){let n=e[i],s=t[i];/^on[A-Z]/.test(i)?n&&s?r[i]=(...e)=>{let t=s(...e);return n(...e),t}:n&&(r[i]=n):"style"===i?r[i]={...n,...s}:"className"===i&&(r[i]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}(l,n.props);return n.type!==t.Fragment&&(u.ref=i?(0,r.composeRefs)(i,o):o),t.cloneElement(n,u)}return t.Children.count(n)>1?t.Children.only(null):null})).displayName=`${n}.SlotClone`,l),u=t.forwardRef((e,r)=>{let{children:n,...l}=e;o(n)&&"function"==typeof s&&(n=s(n._payload));let u=t.Children.toArray(n),f=u.find(c);if(f){let e=f.props.children,n=u.map(r=>r!==f?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,i.jsx)(a,{...l,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,i.jsx)(a,{...l,ref:r,children:n})});return u.displayName=`${e}.Slot`,u}var a=l("Slot"),u=Symbol("radix.slottable");function c(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===u}e.s(["Slot",0,a,"createSlot",0,l])},294237,e=>{"use strict";var t=e.i(7284);let r=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i=t.clsx;e.s(["cva",0,(e,t)=>n=>{var s;if((null==t?void 0:t.variants)==null)return i(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:o,defaultVariants:l}=t,a=Object.keys(o).map(e=>{let t=null==n?void 0:n[e],i=null==l?void 0:l[e];if(null===t)return null;let s=r(t)||r(i);return o[e][s]}),u=n&&Object.entries(n).reduce((e,t)=>{let[r,i]=t;return void 0===i||(e[r]=i),e},{});return i(e,a,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:r,className:i,...n}=t;return Object.entries(n).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...l,...u}[t]):({...l,...u})[t]===r})?[...e,r,i]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}])},876490,e=>{"use strict";var t=e.i(7284),r=e.i(877130);e.s(["cn",0,function(...e){return(0,r.twMerge)((0,t.clsx)(e))},"extractFileName",0,function(e){let t=e.split("/");return t[t.length-1]||e}])},942595,e=>{"use strict";var t=e.i(44501),r=e.i(101685),i=e.i(206102),n=e.i(294237),s=e.i(876490);let o=(0,n.cva)("inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--primary)/0.3)] focus-visible:ring-offset-1 focus-visible:ring-offset-[hsl(var(--background))] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] shadow-sm hover:opacity-90",destructive:"bg-[hsl(var(--destructive))] text-[hsl(var(--destructive-foreground))] shadow-sm hover:opacity-90",outline:"border border-[hsl(var(--border))] bg-[hsl(var(--card))] text-[hsl(var(--foreground))] shadow-sm hover:border-[hsl(var(--primary))] hover:text-[hsl(var(--primary))]",secondary:"bg-[hsl(var(--secondary))] text-[hsl(var(--secondary-foreground))] shadow-sm hover:opacity-80",ghost:"hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))]",link:"text-[hsl(var(--primary))] underline-offset-4 hover:underline"},size:{default:"h-8 px-3 py-1",sm:"h-7 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-4",icon:"h-8 w-8"}},defaultVariants:{variant:"default",size:"default"}}),l=r.forwardRef(({className:e,variant:r,size:n,asChild:l=!1,...a},u)=>{let c=l?i.Slot:"button";return(0,t.jsx)(c,{className:(0,s.cn)(o({variant:r,size:n,className:e})),ref:u,...a})});l.displayName="Button",e.s(["Button",0,l])},801685,e=>{"use strict";var t=e.i(101685);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),i=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let s=(0,t.createContext)({}),o=(0,t.forwardRef)(({color:e,size:i,strokeWidth:o,absoluteStrokeWidth:l,className:a="",children:u,iconNode:c,...f},d)=>{let{size:h=24,strokeWidth:p=2,absoluteStrokeWidth:m=!1,color:v="currentColor",className:y=""}=(0,t.useContext)(s)??{},b=l??m?24*Number(o??p)/Number(i??h):o??p;return(0,t.createElement)("svg",{ref:d,...n,width:i??h??n.width,height:i??h??n.height,stroke:e??v,strokeWidth:b,className:r("lucide",y,a),...!u&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(f)&&{"aria-hidden":"true"},...f},[...c.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(u)?u:[u]])});e.s(["default",0,(e,n)=>{let s=(0,t.forwardRef)(({className:s,...l},a)=>(0,t.createElement)(o,{ref:a,iconNode:n,className:r(`lucide-${i(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,s),...l}));return s.displayName=i(e),s}],801685)},723888,e=>{"use strict";var t=e.i(44501),r=e.i(101685),i=e.i(876490);let n=r.forwardRef(({className:e,type:r,...n},s)=>(0,t.jsx)("input",{type:r,className:(0,i.cn)("flex h-8 w-full rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-3 py-1 text-sm transition-colors","file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground","placeholder:text-[hsl(var(--subtle))]","focus-visible:outline-none focus-visible:border-[hsl(var(--primary))] focus-visible:ring-2 focus-visible:ring-[hsl(var(--primary)/0.2)] focus-visible:ring-offset-0","disabled:cursor-not-allowed disabled:bg-[hsl(var(--secondary))] disabled:text-[hsl(var(--muted-foreground))]",e),ref:s,...n}));n.displayName="Input",e.s(["Input",0,n])},766476,750110,e=>{"use strict";var t=e.i(44501),r=e.i(101685);e.i(380560);var i=e.i(206102),n=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{let s=(0,i.createSlot)(`Primitive.${n}`),o=r.forwardRef((e,r)=>{let{asChild:i,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(i?s:n,{...o,ref:r})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});e.s(["Primitive",0,n],750110);var s=r.forwardRef((e,r)=>(0,t.jsx)(n.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));s.displayName="Label";var o=e.i(294237),l=e.i(876490);let a=(0,o.cva)("text-sm font-medium leading-none text-[hsl(var(--foreground))] peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),u=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(s,{ref:i,className:(0,l.cn)(a(),e),...r}));u.displayName=s.displayName,e.s(["Label",0,u],766476)},137500,e=>{"use strict";var t=e.i(101685),r=e.i(887097),i=e.i(732534),n=e.i(23144),s=e.i(858859),o=class extends n.Subscribable{#e;#t=void 0;#r;#i;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,s.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,s.hashKey)(t.mutationKey)!==(0,s.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#n(),this.#s(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#n(),this.#s()}mutate(e,t){return this.#i=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#n(){let e=this.#r?.state??(0,r.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#s(e){i.notifyManager.batch(()=>{if(this.#i&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#i.onSuccess?.(e.data,t,r,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(e.data,null,t,r,i)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#i.onError?.(e.error,t,r,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(void 0,e.error,t,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},l=e.i(712984);e.s(["useMutation",0,function(e,r){let n=(0,l.useQueryClient)(r),[a]=t.useState(()=>new o(n,e));t.useEffect(()=>{a.setOptions(e)},[a,e]);let u=t.useSyncExternalStore(t.useCallback(e=>a.subscribe(i.notifyManager.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),c=t.useCallback((e,t)=>{a.mutate(e,t).catch(s.noop)},[a]);if(u.error&&(0,s.shouldThrowError)(a.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:c,mutateAsync:u.mutate}}],137500)},747791,e=>{"use strict";var t=e.i(101685),r=e.i(980939),i=e.i(44501),n=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),s=t.forwardRef((e,t)=>(0,i.jsx)(r.Primitive.span,{...e,ref:t,style:{...n,...e.style}}));s.displayName="VisuallyHidden",e.s(["Root",0,s,"VISUALLY_HIDDEN_STYLES",0,n])},506703,e=>{"use strict";let t=(0,e.i(801685).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,t],506703)},41986,25486,e=>{"use strict";var t=e.i(101685),r=e.i(543250),i=e.i(967928),n=e.i(652053),s=e.i(44501),o=new WeakMap;function l(e,t){var r,i;let n,s,o;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let l=(r=e,i=t,n=r.length,(o=(s=a(i))>=0?s:n+s)<0||o>=n?-1:o);return -1===l?void 0:e[l]}function a(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#o;constructor(e){super(e),this.#o=[...super.keys()],o.set(this,!0)}set(e,t){return o.get(this)&&(this.has(e)?this.#o[this.#o.indexOf(e)]=e:this.#o.push(e)),super.set(e,t),this}insert(e,t,r){let i,n=this.has(t),s=this.#o.length,o=a(e),l=o>=0?o:s+o,u=l<0||l>=s?-1:l;if(u===this.size||n&&u===this.size-1||-1===u)return this.set(t,r),this;let c=this.size+ +!n;o<0&&l++;let f=[...this.#o],d=!1;for(let e=l;e<c;e++)if(l===e){let s=f[e];f[e]===t&&(s=f[e+1]),n&&this.delete(t),i=this.get(s),this.set(t,r)}else{d||f[e-1]!==t||(d=!0);let r=f[d?e:e-1],n=i;i=this.get(r),this.delete(r),this.set(r,n)}return this}with(t,r,i){let n=new e(this);return n.insert(t,r,i),n}before(e){let t=this.#o.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let i=this.#o.indexOf(e);return -1===i?this:this.insert(i,t,r)}after(e){let t=this.#o.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let i=this.#o.indexOf(e);return -1===i?this:this.insert(i+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#o=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#o.splice(this.#o.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=l(this.#o,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=l(this.#o,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#o.indexOf(e)}keyAt(e){return l(this.#o,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return i;r++}}findIndex(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return r;r++}return -1}filter(t,r){let i=[],n=0;for(let e of this)Reflect.apply(t,r,[e,n,this])&&i.push(e),n++;return new e(i)}map(t,r){let i=[],n=0;for(let e of this)i.push([e[0],Reflect.apply(t,r,[e,n,this])]),n++;return new e(i)}reduce(...e){let[t,r]=e,i=0,n=r??this.at(0);for(let r of this)n=0===i&&1===e.length?r:Reflect.apply(t,this,[n,r,i,this]),i++;return n}reduceRight(...e){let[t,r]=e,i=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let n=this.at(r);i=r===this.size-1&&1===e.length?n:Reflect.apply(t,this,[i,n,r,this])}return i}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),i=this.get(r);t.set(r,i)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let i=new e,n=this.size-1;if(void 0===t)return i;t<0&&(t+=this.size),void 0!==r&&r>0&&(n=r-1);for(let e=t;e<=n;e++){let t=this.keyAt(e),r=this.get(t);i.set(t,r)}return i}every(e,t){let r=0;for(let i of this){if(!Reflect.apply(e,t,[i,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return!0;r++}return!1}}),e.s(["createCollection",0,function(e){let o=e+"CollectionProvider",[l,a]=(0,r.createContextScope)(o),[u,c]=l(o,{collectionRef:{current:null},itemMap:new Map}),f=e=>{let{scope:r,children:i}=e,n=t.default.useRef(null),o=t.default.useRef(new Map).current;return(0,s.jsx)(u,{scope:r,itemMap:o,collectionRef:n,children:i})};f.displayName=o;let d=e+"CollectionSlot",h=(0,n.createSlot)(d),p=t.default.forwardRef((e,t)=>{let{scope:r,children:n}=e,o=c(d,r),l=(0,i.useComposedRefs)(t,o.collectionRef);return(0,s.jsx)(h,{ref:l,children:n})});p.displayName=d;let m=e+"CollectionItemSlot",v="data-radix-collection-item",y=(0,n.createSlot)(m),b=t.default.forwardRef((e,r)=>{let{scope:n,children:o,...l}=e,a=t.default.useRef(null),u=(0,i.useComposedRefs)(r,a),f=c(m,n);return t.default.useEffect(()=>(f.itemMap.set(a,{ref:a,...l}),()=>void f.itemMap.delete(a))),(0,s.jsx)(y,{...{[v]:""},ref:u,children:o})});return b.displayName=m,[{Provider:f,Slot:p,ItemSlot:b},function(r){let i=c(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=i.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${v}]`));return Array.from(i.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[i.collectionRef,i.itemMap])},a]}],41986);var u=t.createContext(void 0);e.s(["useDirection",0,function(e){let r=t.useContext(u);return e||r||"ltr"}],25486)},190088,e=>{"use strict";var t=e.i(101685),r=e.i(967928),i=e.i(672687),n=e=>{var n;let o,l,{present:a,children:u}=e,c=function(e){var r,n;let[o,l]=t.useState(),a=t.useRef(null),u=t.useRef(e),c=t.useRef("none"),[f,d]=(r=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,t)=>n[e][t]??e,r));return t.useEffect(()=>{let e=s(a.current);c.current="mounted"===f?e:"none"},[f]),(0,i.useLayoutEffect)(()=>{let t=a.current,r=u.current;if(r!==e){let i=c.current,n=s(t);e?d("MOUNT"):"none"===n||t?.display==="none"?d("UNMOUNT"):r&&i!==n?d("ANIMATION_OUT"):d("UNMOUNT"),u.current=e}},[e,d]),(0,i.useLayoutEffect)(()=>{if(o){let e,t=o.ownerDocument.defaultView??window,r=r=>{let i=s(a.current).includes(CSS.escape(r.animationName));if(r.target===o&&i&&(d("ANIMATION_END"),!u.current)){let r=o.style.animationFillMode;o.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===o.style.animationFillMode&&(o.style.animationFillMode=r)})}},i=e=>{e.target===o&&(c.current=s(a.current))};return o.addEventListener("animationstart",i),o.addEventListener("animationcancel",r),o.addEventListener("animationend",r),()=>{t.clearTimeout(e),o.removeEventListener("animationstart",i),o.removeEventListener("animationcancel",r),o.removeEventListener("animationend",r)}}d("ANIMATION_END")},[o,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:t.useCallback(e=>{a.current=e?getComputedStyle(e):null,l(e)},[])}}(a),f="function"==typeof u?u({present:c.isPresent}):t.Children.only(u),d=(0,r.useComposedRefs)(c.ref,(n=f,(l=(o=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?n.ref:(l=(o=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?n.props.ref:n.props.ref||n.ref));return"function"==typeof u||c.isPresent?t.cloneElement(f,{ref:d}):null};function s(e){return e?.animationName||"none"}n.displayName="Presence",e.s(["Presence",0,n])},677275,e=>{"use strict";var t=e.i(101685),r=e.i(291967),i=e.i(41986),n=e.i(967928),s=e.i(543250),o=e.i(433616),l=e.i(980939),a=e.i(136131),u=e.i(417256),c=e.i(25486),f=e.i(44501),d="rovingFocusGroup.onEntryFocus",h={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[m,v,y]=(0,i.createCollection)(p),[b,g]=(0,s.createContextScope)(p,[y]),[w,x]=b(p),R=t.forwardRef((e,t)=>(0,f.jsx)(m.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,f.jsx)(m.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,f.jsx)(O,{...e,ref:t})})}));R.displayName=p;var O=t.forwardRef((e,i)=>{let{__scopeRovingFocusGroup:s,orientation:o,loop:m=!1,dir:y,currentTabStopId:b,defaultCurrentTabStopId:g,onCurrentTabStopIdChange:x,onEntryFocus:R,preventScrollOnEntryFocus:O=!1,...C}=e,A=t.useRef(null),S=(0,n.useComposedRefs)(i,A),N=(0,c.useDirection)(y),[k,E]=(0,u.useControllableState)({prop:b,defaultProp:g??null,onChange:x,caller:p}),[j,I]=t.useState(!1),T=(0,a.useCallbackRef)(R),P=v(s),D=t.useRef(!1),[L,F]=t.useState(0);return t.useEffect(()=>{let e=A.current;if(e)return e.addEventListener(d,T),()=>e.removeEventListener(d,T)},[T]),(0,f.jsx)(w,{scope:s,orientation:o,dir:N,loop:m,currentTabStopId:k,onItemFocus:t.useCallback(e=>E(e),[E]),onItemShiftTab:t.useCallback(()=>I(!0),[]),onFocusableItemAdd:t.useCallback(()=>F(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>F(e=>e-1),[]),children:(0,f.jsx)(l.Primitive.div,{tabIndex:j||0===L?-1:0,"data-orientation":o,...C,ref:S,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{D.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!D.current;if(e.target===e.currentTarget&&t&&!j){let t=new CustomEvent(d,h);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=P().filter(e=>e.focusable);M([e.find(e=>e.active),e.find(e=>e.id===k),...e].filter(Boolean).map(e=>e.ref.current),O)}}D.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>I(!1))})})}),C="RovingFocusGroupItem",A=t.forwardRef((e,i)=>{let{__scopeRovingFocusGroup:n,focusable:s=!0,active:a=!1,tabStopId:u,children:c,...d}=e,h=(0,o.useId)(),p=u||h,y=x(C,n),b=y.currentTabStopId===p,g=v(n),{onFocusableItemAdd:w,onFocusableItemRemove:R,currentTabStopId:O}=y;return t.useEffect(()=>{if(s)return w(),()=>R()},[s,w,R]),(0,f.jsx)(m.ItemSlot,{scope:n,id:p,focusable:s,active:a,children:(0,f.jsx)(l.Primitive.span,{tabIndex:b?0:-1,"data-orientation":y.orientation,...d,ref:i,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{s?y.onItemFocus(p):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>y.onItemFocus(p)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void y.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var i;let n=(i=e.key,"rtl"!==r?i:"ArrowLeft"===i?"ArrowRight":"ArrowRight"===i?"ArrowLeft":i);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(n))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)))return S[n]}(e,y.orientation,y.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=g().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)n.reverse();else if("prev"===t||"next"===t){var r,i;"prev"===t&&n.reverse();let s=n.indexOf(e.currentTarget);n=y.loop?(r=n,i=s+1,r.map((e,t)=>r[(i+t)%r.length])):n.slice(s+1)}setTimeout(()=>M(n))}}),children:"function"==typeof c?c({isCurrentTabStop:b,hasTabStop:null!=O}):c})})});A.displayName=C;var S={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function M(e,t=!1){let r=document.activeElement;for(let i of e)if(i===r||(i.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",0,A,"Root",0,R,"createRovingFocusGroupScope",0,g])}]);
|
|
@@ -9,7 +9,7 @@ const currentPort = parseInt(process.env.PORT, 10) || 3000
|
|
|
9
9
|
const hostname = process.env.HOSTNAME || '0.0.0.0'
|
|
10
10
|
|
|
11
11
|
let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
|
|
12
|
-
const nextConfig = {"env":{},"webpack":null,"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":true,"customCacheHandler":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{"serverFunctions":true,"browserToTerminal":"warn"},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/
|
|
12
|
+
const nextConfig = {"env":{},"webpack":null,"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":true,"customCacheHandler":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{"serverFunctions":true,"browserToTerminal":"warn"},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/apsarapangu/disk1/agent-storage-cli","allowedDevOrigins":["127.0.0.1","localhost","11.167.59.67"],"cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"experimental":{"appNewScrollHandler":false,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"partialFallbacks":false,"dynamicOnHover":false,"varyParams":false,"prefetchInlining":false,"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":95,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"imgOptSkipMetadata":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"viewTransition":false,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":false,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"globalNotFound":false,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":false,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.ts","serverExternalPackages":["@tablestore/tablestore-agent-sdk","@tablestore/tablestore-agent-shared","ali-oss","urllib","tablestore","proxy-agent"],"turbopack":{"root":"/apsarapangu/disk1/agent-storage-cli"},"distDirRoot":".next"}
|
|
13
13
|
|
|
14
14
|
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
|
|
15
15
|
|
|
@@ -151,6 +151,7 @@ function ChatHomepage() {
|
|
|
151
151
|
const memory = useMemo(() => buildMemoryFromBinding(cfg), [cfg]);
|
|
152
152
|
|
|
153
153
|
const chat = useQaChat({
|
|
154
|
+
dataScopeKey: activeInstanceState.dataScopeKey,
|
|
154
155
|
activeInstance,
|
|
155
156
|
providerId: cfg.providerId,
|
|
156
157
|
model: cfg.model,
|
package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/qa/page.tsx
CHANGED
|
@@ -23,6 +23,7 @@ export default function QaPlaygroundPage({ params }: PageProps) {
|
|
|
23
23
|
const [formState, setFormState] = useState<QaFormState | null>(null);
|
|
24
24
|
|
|
25
25
|
const chat = useQaChat({
|
|
26
|
+
dataScopeKey: activeInstanceState.dataScopeKey,
|
|
26
27
|
activeInstance: activeInstanceState.activeInstance,
|
|
27
28
|
providerId: formState?.providerId ?? "",
|
|
28
29
|
model: formState?.model ?? "",
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
useParams,
|
|
5
|
+
usePathname,
|
|
6
|
+
useRouter,
|
|
7
|
+
useSearchParams,
|
|
8
|
+
} from "next/navigation";
|
|
9
|
+
import { useEffect, useState } from "react";
|
|
5
10
|
import {
|
|
6
11
|
Brain,
|
|
7
12
|
Database,
|
|
8
13
|
FileClock,
|
|
14
|
+
FolderTree,
|
|
9
15
|
ListChecks,
|
|
10
16
|
MessageSquare,
|
|
11
17
|
MoreVertical,
|
|
@@ -33,6 +39,10 @@ import { useMemoryStore } from "@/hooks/use-memory-store";
|
|
|
33
39
|
import { MemoryDeleteDialog } from "@/components/memory/memory-delete-dialog";
|
|
34
40
|
import { MemoryScopeBar } from "@/components/memory/memory-scope-bar";
|
|
35
41
|
import { useI18n } from "@/i18n/i18n-context";
|
|
42
|
+
import {
|
|
43
|
+
resolveMemoryDetailSegment,
|
|
44
|
+
storageModeCapabilities,
|
|
45
|
+
} from "@/lib/memory-storage-mode";
|
|
36
46
|
|
|
37
47
|
export default function MemoryDetailLayout({
|
|
38
48
|
children,
|
|
@@ -79,6 +89,8 @@ export default function MemoryDetailLayout({
|
|
|
79
89
|
] as const;
|
|
80
90
|
const params = useParams<{ store: string }>();
|
|
81
91
|
const memoryStoreName = decodeURIComponent(params.store);
|
|
92
|
+
const pathname = usePathname();
|
|
93
|
+
const router = useRouter();
|
|
82
94
|
const searchParams = useSearchParams();
|
|
83
95
|
const { data: memoryStore, isLoading } = useMemoryStore(memoryStoreName);
|
|
84
96
|
const [showDeleteDialog, setShowDeleteDialog] = useState(false);
|
|
@@ -87,11 +99,23 @@ export default function MemoryDetailLayout({
|
|
|
87
99
|
? `?${searchParams.toString()}`
|
|
88
100
|
: "";
|
|
89
101
|
const basePath = `/memory/${encodeURIComponent(memoryStoreName)}`;
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
102
|
+
const requestedSegment =
|
|
103
|
+
pathname.slice(basePath.length).split("/").filter(Boolean)[0] ?? "units";
|
|
104
|
+
const capabilities = storageModeCapabilities(memoryStore?.storageMode);
|
|
105
|
+
const resolvedSegment = resolveMemoryDetailSegment(
|
|
106
|
+
memoryStore?.storageMode,
|
|
107
|
+
requestedSegment,
|
|
108
|
+
);
|
|
109
|
+
const shouldRedirect = Boolean(
|
|
110
|
+
memoryStore &&
|
|
111
|
+
!capabilities.structured &&
|
|
112
|
+
requestedSegment !== resolvedSegment,
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
if (!shouldRedirect) return;
|
|
117
|
+
router.replace(`${basePath}/${resolvedSegment}${querySuffix}`);
|
|
118
|
+
}, [basePath, querySuffix, resolvedSegment, router, shouldRedirect]);
|
|
95
119
|
|
|
96
120
|
if (isLoading) {
|
|
97
121
|
return (
|
|
@@ -115,6 +139,33 @@ export default function MemoryDetailLayout({
|
|
|
115
139
|
);
|
|
116
140
|
}
|
|
117
141
|
|
|
142
|
+
if (shouldRedirect) return null;
|
|
143
|
+
|
|
144
|
+
const visibleTabs = capabilities.detailSegments.map((segment) => {
|
|
145
|
+
if (!capabilities.structured && segment === "units") {
|
|
146
|
+
return {
|
|
147
|
+
label: t("memory.detail.tabFiles"),
|
|
148
|
+
segment: "units",
|
|
149
|
+
icon: <FolderTree className="h-4 w-4" />,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
return (
|
|
153
|
+
TABS.find((tab) => tab.segment === segment) ??
|
|
154
|
+
// Every capability segment has a matching tab; this keeps an unknown
|
|
155
|
+
// future value from exposing an unsupported destination.
|
|
156
|
+
{
|
|
157
|
+
label: t("memory.detail.tabFiles"),
|
|
158
|
+
segment: "units",
|
|
159
|
+
icon: <FolderTree className="h-4 w-4" />,
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
});
|
|
163
|
+
const items = visibleTabs.map((tab) => ({
|
|
164
|
+
href: `${basePath}/${tab.segment}${querySuffix}`,
|
|
165
|
+
label: tab.label,
|
|
166
|
+
icon: tab.icon,
|
|
167
|
+
}));
|
|
168
|
+
|
|
118
169
|
return (
|
|
119
170
|
<>
|
|
120
171
|
<DetailLayout
|
|
@@ -161,7 +212,7 @@ export default function MemoryDetailLayout({
|
|
|
161
212
|
}
|
|
162
213
|
>
|
|
163
214
|
<div className="space-y-6">
|
|
164
|
-
<MemoryScopeBar />
|
|
215
|
+
<MemoryScopeBar allowScopeDiscovery={capabilities.structured} />
|
|
165
216
|
<div>{children}</div>
|
|
166
217
|
</div>
|
|
167
218
|
</DetailLayout>
|
package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/messages/page.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import { useParams, useSearchParams } from "next/navigation";
|
|
|
5
5
|
import { ArrowDown, ChevronUp, Loader2, MessageSquare } from "lucide-react";
|
|
6
6
|
import { Button } from "@/components/ui/button";
|
|
7
7
|
import { Skeleton } from "@/components/ui/skeleton";
|
|
8
|
+
import { ErrorState } from "@/components/shared/error-state";
|
|
8
9
|
import { cn } from "@/lib/utils";
|
|
9
10
|
import { buildMemoryScope, hasPreciseScope } from "@/lib/memory";
|
|
10
11
|
import { useMemoryMessages } from "@/hooks/use-memory-messages";
|
|
@@ -190,6 +191,20 @@ export default function MemoryMessagesPage() {
|
|
|
190
191
|
);
|
|
191
192
|
}
|
|
192
193
|
|
|
194
|
+
if (messagesQuery.isError && allMessages.length === 0) {
|
|
195
|
+
// 查询失败时明确报错并支持重试,避免被误认成「暂无消息」。
|
|
196
|
+
return (
|
|
197
|
+
<div className="rounded-xl border bg-muted/20">
|
|
198
|
+
<TimeFilterBar {...timeFilterBarProps} />
|
|
199
|
+
<ErrorState
|
|
200
|
+
error={messagesQuery.error as Error}
|
|
201
|
+
title={t("memory.messages.loadFailed")}
|
|
202
|
+
onRetry={() => messagesQuery.refetch()}
|
|
203
|
+
/>
|
|
204
|
+
</div>
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
193
208
|
if (messagesQuery.isLoading && allMessages.length === 0) {
|
|
194
209
|
return (
|
|
195
210
|
<div className="rounded-xl border bg-muted/20">
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
} from "@/components/ui/select";
|
|
16
16
|
import { RefreshButton } from "@/components/shared/refresh-button";
|
|
17
17
|
import { EmptyState } from "@/components/shared/empty-state";
|
|
18
|
+
import { ErrorState } from "@/components/shared/error-state";
|
|
18
19
|
import { useMemoryTasks } from "@/hooks/use-memory-tasks";
|
|
19
20
|
import { buildMemoryScope } from "@/lib/memory";
|
|
20
21
|
import { MemoryTasksTable } from "@/components/memory/memory-tasks-table";
|
|
@@ -84,6 +85,14 @@ export default function MemoryTasksPage() {
|
|
|
84
85
|
<Skeleton className="h-10 w-full" />
|
|
85
86
|
<Skeleton className="h-10 w-full" />
|
|
86
87
|
</div>
|
|
88
|
+
) : query.isError ? (
|
|
89
|
+
// 首次写入后任务索引建立期间,服务端可能短暂返回 409;
|
|
90
|
+
// 明确展示服务端错误并允许用户重试,避免被误认为空任务列表。
|
|
91
|
+
<ErrorState
|
|
92
|
+
error={query.error as Error}
|
|
93
|
+
title={t("memory.tasks.loadFailed")}
|
|
94
|
+
onRetry={() => query.refetch()}
|
|
95
|
+
/>
|
|
87
96
|
) : tasks.length === 0 ? (
|
|
88
97
|
<EmptyState
|
|
89
98
|
icon={ListChecks}
|