@tablestore/tablestore-agent-cli 0.1.6 → 0.1.7

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.
Files changed (55) hide show
  1. package/dist/dashboard-runtime/dashboard/.next/BUILD_ID +1 -1
  2. package/dist/dashboard-runtime/dashboard/.next/build-manifest.json +3 -3
  3. package/dist/dashboard-runtime/dashboard/.next/prerender-manifest.json +3 -3
  4. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  5. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/documents/page_client-reference-manifest.js +1 -1
  6. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/page_client-reference-manifest.js +1 -1
  7. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/qa/page_client-reference-manifest.js +1 -1
  8. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/retrieval/page_client-reference-manifest.js +1 -1
  9. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/settings/page_client-reference-manifest.js +1 -1
  10. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.html +1 -1
  11. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.rsc +1 -1
  12. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  13. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  14. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  15. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  16. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.html +1 -1
  18. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.rsc +1 -1
  19. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  20. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  21. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  22. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  23. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  24. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  25. package/dist/dashboard-runtime/dashboard/.next/server/app/index.html +1 -1
  26. package/dist/dashboard-runtime/dashboard/.next/server/app/index.rsc +1 -1
  27. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  28. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_full.segment.rsc +1 -1
  29. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_head.segment.rsc +1 -1
  30. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_index.segment.rsc +1 -1
  31. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  32. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.html +1 -1
  33. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.rsc +1 -1
  34. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_full.segment.rsc +1 -1
  35. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_head.segment.rsc +1 -1
  36. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_index.segment.rsc +1 -1
  37. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_tree.segment.rsc +1 -1
  38. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +1 -1
  39. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/onboarding.segment.rsc +1 -1
  40. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_065m1.j._.js +1 -1
  41. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_knowledge-base_[name]_layout-client_tsx_05momc5._.js +1 -1
  42. package/dist/dashboard-runtime/dashboard/.next/server/middleware-build-manifest.js +3 -3
  43. package/dist/dashboard-runtime/dashboard/.next/server/pages/404.html +1 -1
  44. package/dist/dashboard-runtime/dashboard/.next/server/pages/500.html +1 -1
  45. package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.js +1 -1
  46. package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.json +1 -1
  47. package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0ltmkqogn8g3t.js → 0jeb9kxtd_jq..js} +1 -1
  48. package/dist/dashboard-runtime/dashboard/.next/static/chunks/100.ax5hitxko.js +1 -0
  49. package/dist/dashboard-runtime/dashboard/src/components/chat/chat-mount-config.tsx +29 -8
  50. package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-header.tsx +7 -5
  51. package/package.json +1 -1
  52. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0prl6hk4v0k3i.js +0 -1
  53. /package/dist/dashboard-runtime/dashboard/.next/static/{MjeKF5uLzEvAqWkR9O6Ts → wWmSSYUu4w4mIF1R_7UoM}/_buildManifest.js +0 -0
  54. /package/dist/dashboard-runtime/dashboard/.next/static/{MjeKF5uLzEvAqWkR9O6Ts → wWmSSYUu4w4mIF1R_7UoM}/_clientMiddlewareManifest.js +0 -0
  55. /package/dist/dashboard-runtime/dashboard/.next/static/{MjeKF5uLzEvAqWkR9O6Ts → wWmSSYUu4w4mIF1R_7UoM}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="zh-CN" class=" "><head><meta charSet="utf-8"/><link rel="preconnect" href="/" crossorigin=""/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0v.hno.6q74nn.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0hmuddei8wdpj.js"/><script src="/_next/static/chunks/0_kxvayp~5_.f.js" async=""></script><script src="/_next/static/chunks/0zbi5n76awxz1.js" async=""></script><script src="/_next/static/chunks/0a~2vs7-pt-aj.js" async=""></script><script src="/_next/static/chunks/07q4gw5gnh3.d.js" async=""></script><script src="/_next/static/chunks/turbopack-0jhqjurvu9x3y.js" async=""></script><script src="/_next/static/chunks/0m2p301.a174k.js" async=""></script><script src="/_next/static/chunks/0chbhht0ghzv_.js" async=""></script><script src="/_next/static/chunks/0-f9tslgpp-.h.js" async=""></script><script src="/_next/static/chunks/02b1c4t1dy1ri.js" async=""></script><script src="/_next/static/chunks/012a-3vjn5o5i.js" async=""></script><script src="/_next/static/chunks/0sg6z8.ci0l2b.js" async=""></script><script src="/_next/static/chunks/168fusg46oh8s.js" async=""></script><script src="/_next/static/chunks/0.yj.t1hbwkg4.js" async=""></script><script src="/_next/static/chunks/0hkir82jccgck.js" async=""></script><script src="/_next/static/chunks/09qsmnfvk8dm3.js" async=""></script><script src="/_next/static/chunks/05hmbxh7h5ct-.js" async=""></script><script src="/_next/static/chunks/0dqag6qsw7xv8.js" async=""></script><script src="/_next/static/chunks/0-mr2-dyb-szq.js" async=""></script><title>Agent Storage</title><meta name="description" content="A dashboard for managing Tablestore Agent Storage."/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="min-h-screen font-sans antialiased text-foreground"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","system",null,["light","dark"],null,true,true)</script><div class="min-h-screen bg-background"><div class="mx-auto flex min-h-screen w-full max-w-3xl flex-col items-stretch justify-center px-6 py-12"><div class="flex flex-col gap-10"><header class="flex flex-col items-center gap-3 text-center"><div class="flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10 text-primary"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sparkles h-6 w-6" aria-hidden="true"><path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"></path><path d="M20 2v4"></path><path d="M22 4h-4"></path><circle cx="4" cy="20" r="2"></circle></svg></div><h1 class="text-2xl font-semibold tracking-tight">欢迎使用 Agent Storage</h1><p class="max-w-md text-sm text-muted-foreground">创建你的第一个项目,即可开始管理知识库、记忆库与对话。</p></header><div class="rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--surface))] p-6 shadow-sm sm:p-8"><div dir="ltr" data-orientation="horizontal" class="w-full"><div role="tablist" aria-orientation="horizontal" class="h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground grid w-full grid-cols-2" tabindex="-1" data-orientation="horizontal" style="outline:none"><button type="button" role="tab" aria-selected="true" aria-controls="radix-_R_inpfdb_-content-manual" data-state="active" id="radix-_R_inpfdb_-trigger-manual" class="inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow" tabindex="-1" data-orientation="horizontal" data-radix-collection-item="">手动填写</button><button type="button" role="tab" aria-selected="false" aria-controls="radix-_R_inpfdb_-content-token" data-state="inactive" id="radix-_R_inpfdb_-trigger-token" class="inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow" tabindex="-1" data-orientation="horizontal" data-radix-collection-item="">导入 Token</button></div><div data-state="active" data-orientation="horizontal" role="tabpanel" aria-labelledby="radix-_R_inpfdb_-trigger-manual" id="radix-_R_inpfdb_-content-manual" tabindex="0" class="ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 mt-4" style="animation-duration:0s"><form class="space-y-4"><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_dinpfdb_-form-item">项目名称</label><input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm" placeholder="prod-main" autoComplete="off" id="_R_dinpfdb_-form-item" aria-describedby="_R_dinpfdb_-form-item-description" aria-invalid="false" name="name" value=""/><p id="_R_dinpfdb_-form-item-description" class="text-[0.8rem] text-muted-foreground">仅用于本地区分,不会发送到服务端。</p></div><div class="grid gap-4 sm:grid-cols-2"><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_2linpfdb_-form-item">AccessKey ID</label><input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm" autoComplete="off" id="_R_2linpfdb_-form-item" aria-describedby="_R_2linpfdb_-form-item-description" aria-invalid="false" name="accessKeyId" value=""/></div><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_4linpfdb_-form-item">AccessKey Secret</label><input type="password" class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm" autoComplete="new-password" id="_R_4linpfdb_-form-item" aria-describedby="_R_4linpfdb_-form-item-description" aria-invalid="false" name="accessKeySecret" value=""/></div></div><div class="grid gap-4 sm:grid-cols-2"><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_2tinpfdb_-form-item">OTS Endpoint</label><input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm" placeholder="https://xxx.cn-hangzhou.ots.aliyuncs.com" id="_R_2tinpfdb_-form-item" aria-describedby="_R_2tinpfdb_-form-item-description" aria-invalid="false" name="otsEndpoint" value=""/></div><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_4tinpfdb_-form-item">OTS 实例名</label><input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm" id="_R_4tinpfdb_-form-item" aria-describedby="_R_4tinpfdb_-form-item-description" aria-invalid="false" name="otsInstanceName" value=""/></div></div><div class="flex items-start gap-2 rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.4)] px-3 py-2 text-xs text-[hsl(var(--muted-foreground))]"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-info mt-0.5 h-3.5 w-3.5 shrink-0 text-[hsl(var(--primary))]" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4"></path><path d="M12 8h.01"></path></svg><span>OSS 信息为可选项。若需上传文档到知识库,OSS Endpoint 与 Bucket 必填; 留空则项目只能用于查询与检索,文件上传功能将不可用。</span></div><div class="grid gap-4 sm:grid-cols-2"><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_3dinpfdb_-form-item">OSS Endpoint(可选)</label><input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm" placeholder="https://oss-cn-hangzhou.aliyuncs.com" id="_R_3dinpfdb_-form-item" aria-describedby="_R_3dinpfdb_-form-item-description" aria-invalid="false" name="ossEndpoint" value=""/></div><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_5dinpfdb_-form-item">OSS Bucket(可选)</label><input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm" id="_R_5dinpfdb_-form-item" aria-describedby="_R_5dinpfdb_-form-item-description" aria-invalid="false" name="ossBucketName" value=""/></div></div><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_1linpfdb_-form-item">Region</label><button type="button" role="combobox" aria-controls="radix-_R_blinpfdb_" aria-expanded="false" aria-autocomplete="none" dir="ltr" data-state="closed" class="flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&amp;&gt;span]:line-clamp-1 bg-[hsl(var(--background))]" id="_R_1linpfdb_-form-item" aria-describedby="_R_1linpfdb_-form-item-description" aria-invalid="false"><span style="pointer-events:none"></span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down h-4 w-4 opacity-50" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></button><select aria-hidden="true" tabindex="-1" style="position:absolute;border:0;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;word-wrap:normal"></select></div><div class="flex justify-end pt-2"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] shadow hover:opacity-90 h-9 px-4 py-2" type="submit">连接并开始使用</button></div></form></div><div data-state="inactive" data-orientation="horizontal" role="tabpanel" aria-labelledby="radix-_R_inpfdb_-trigger-token" hidden="" id="radix-_R_inpfdb_-content-token" tabindex="0" class="ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 mt-4"></div></div></div><p class="text-center text-xs text-muted-foreground">稍后你随时可以通过右上角的项目切换器或「项目管理」页创建更多项目。</p></div><!--$--><!--/$--></div></div><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/0hmuddei8wdpj.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[12278,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"ThemeProvider\"]\n3:I[85290,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"QueryProvider\"]\n4:I[2063,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"default\"]\n5:I[10445,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\",\"/_next/static/chunks/02b1c4t1dy1ri.js\"],\"default\"]\n6:I[59666,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"default\"]\n7:I[70978,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\",\"/_next/static/chunks/012a-3vjn5o5i.js\"],\"\"]\n8:I[87014,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"Toaster\"]\n9:I[20962,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\",\"/_next/static/chunks/0sg6z8.ci0l2b.js\",\"/_next/static/chunks/168fusg46oh8s.js\"],\"default\"]\na:I[87919,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"ClientPageRoot\"]\nb:I[24883,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\",\"/_next/static/chunks/0.yj.t1hbwkg4.js\",\"/_next/static/chunks/0hkir82jccgck.js\",\"/_next/static/chunks/09qsmnfvk8dm3.js\",\"/_next/static/chunks/05hmbxh7h5ct-.js\",\"/_next/static/chunks/168fusg46oh8s.js\",\"/_next/static/chunks/0dqag6qsw7xv8.js\",\"/_next/static/chunks/0-mr2-dyb-szq.js\"],\"default\"]\ne:I[35582,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"OutletBoundary\"]\nf:\"$Sreact.suspense\"\n11:I[35582,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"ViewportBoundary\"]\n13:I[35582,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"MetadataBoundary\"]\n15:I[14743,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0v.hno.6q74nn.css\",\"style\"]\n:HC[\"/\",\"\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"onboarding\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"onboarding\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0v.hno.6q74nn.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0m2p301.a174k.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0chbhht0ghzv_.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/0-f9tslgpp-.h.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"zh-CN\",\"className\":\" \",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-screen font-sans antialiased text-foreground\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$5\",\"errorStyles\":[],\"errorScripts\":[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/02b1c4t1dy1ri.js\",\"async\":true}]],\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"div\",null,{\"className\":\"flex min-h-screen flex-col items-center justify-center gap-4\",\"children\":[[\"$\",\"h2\",null,{\"className\":\"font-display text-3xl font-semibold tracking-tight text-foreground\",\"children\":\"页面不存在\"}],[\"$\",\"p\",null,{\"className\":\"text-sm text-muted-foreground\",\"children\":\"您访问的页面不存在或已被移除。\"}],[\"$\",\"$L7\",null,{\"href\":\"/\",\"className\":\"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm transition-colors hover:bg-primary/90\",\"children\":\"返回首页\"}]]}],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L8\",null,{\"position\":\"top-right\",\"richColors\":true,\"closeButton\":true}]]}]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"div\",null,{\"className\":\"min-h-screen bg-background\",\"children\":[\"$\",\"div\",null,{\"className\":\"mx-auto flex min-h-screen w-full max-w-3xl flex-col items-stretch justify-center px-6 py-12\",\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$9\",\"errorStyles\":[],\"errorScripts\":[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0sg6z8.ci0l2b.js\",\"async\":true}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/168fusg46oh8s.js\",\"async\":true}]],\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$La\",null,{\"Component\":\"$b\",\"serverProvidedParams\":{\"searchParams\":{},\"params\":{},\"promises\":[\"$@c\",\"$@d\"]}}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0.yj.t1hbwkg4.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0hkir82jccgck.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/09qsmnfvk8dm3.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-3\",{\"src\":\"/_next/static/chunks/05hmbxh7h5ct-.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-4\",{\"src\":\"/_next/static/chunks/168fusg46oh8s.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-5\",{\"src\":\"/_next/static/chunks/0dqag6qsw7xv8.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-6\",{\"src\":\"/_next/static/chunks/0-mr2-dyb-szq.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$Le\",null,{\"children\":[\"$\",\"$f\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@10\"}]}]]}],{},null,false,null]},null,false,null]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L11\",null,{\"children\":\"$L12\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L13\",null,{\"children\":[\"$\",\"$f\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L14\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$15\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0v.hno.6q74nn.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"MjeKF5uLzEvAqWkR9O6Ts\"}\n"])</script><script>self.__next_f.push([1,"c:{}\nd:\"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params\"\n"])</script><script>self.__next_f.push([1,"12:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"10:null\n14:[[\"$\",\"title\",\"0\",{\"children\":\"Agent Storage\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"A dashboard for managing Tablestore Agent Storage.\"}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="zh-CN" class=" "><head><meta charSet="utf-8"/><link rel="preconnect" href="/" crossorigin=""/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0v.hno.6q74nn.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0hmuddei8wdpj.js"/><script src="/_next/static/chunks/0_kxvayp~5_.f.js" async=""></script><script src="/_next/static/chunks/0zbi5n76awxz1.js" async=""></script><script src="/_next/static/chunks/0a~2vs7-pt-aj.js" async=""></script><script src="/_next/static/chunks/07q4gw5gnh3.d.js" async=""></script><script src="/_next/static/chunks/turbopack-0jhqjurvu9x3y.js" async=""></script><script src="/_next/static/chunks/0m2p301.a174k.js" async=""></script><script src="/_next/static/chunks/0chbhht0ghzv_.js" async=""></script><script src="/_next/static/chunks/0-f9tslgpp-.h.js" async=""></script><script src="/_next/static/chunks/02b1c4t1dy1ri.js" async=""></script><script src="/_next/static/chunks/012a-3vjn5o5i.js" async=""></script><script src="/_next/static/chunks/0sg6z8.ci0l2b.js" async=""></script><script src="/_next/static/chunks/168fusg46oh8s.js" async=""></script><script src="/_next/static/chunks/0.yj.t1hbwkg4.js" async=""></script><script src="/_next/static/chunks/0hkir82jccgck.js" async=""></script><script src="/_next/static/chunks/09qsmnfvk8dm3.js" async=""></script><script src="/_next/static/chunks/05hmbxh7h5ct-.js" async=""></script><script src="/_next/static/chunks/0dqag6qsw7xv8.js" async=""></script><script src="/_next/static/chunks/0-mr2-dyb-szq.js" async=""></script><title>Agent Storage</title><meta name="description" content="A dashboard for managing Tablestore Agent Storage."/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="min-h-screen font-sans antialiased text-foreground"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","system",null,["light","dark"],null,true,true)</script><div class="min-h-screen bg-background"><div class="mx-auto flex min-h-screen w-full max-w-3xl flex-col items-stretch justify-center px-6 py-12"><div class="flex flex-col gap-10"><header class="flex flex-col items-center gap-3 text-center"><div class="flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10 text-primary"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sparkles h-6 w-6" aria-hidden="true"><path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"></path><path d="M20 2v4"></path><path d="M22 4h-4"></path><circle cx="4" cy="20" r="2"></circle></svg></div><h1 class="text-2xl font-semibold tracking-tight">欢迎使用 Agent Storage</h1><p class="max-w-md text-sm text-muted-foreground">创建你的第一个项目,即可开始管理知识库、记忆库与对话。</p></header><div class="rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--surface))] p-6 shadow-sm sm:p-8"><div dir="ltr" data-orientation="horizontal" class="w-full"><div role="tablist" aria-orientation="horizontal" class="h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground grid w-full grid-cols-2" tabindex="-1" data-orientation="horizontal" style="outline:none"><button type="button" role="tab" aria-selected="true" aria-controls="radix-_R_inpfdb_-content-manual" data-state="active" id="radix-_R_inpfdb_-trigger-manual" class="inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow" tabindex="-1" data-orientation="horizontal" data-radix-collection-item="">手动填写</button><button type="button" role="tab" aria-selected="false" aria-controls="radix-_R_inpfdb_-content-token" data-state="inactive" id="radix-_R_inpfdb_-trigger-token" class="inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow" tabindex="-1" data-orientation="horizontal" data-radix-collection-item="">导入 Token</button></div><div data-state="active" data-orientation="horizontal" role="tabpanel" aria-labelledby="radix-_R_inpfdb_-trigger-manual" id="radix-_R_inpfdb_-content-manual" tabindex="0" class="ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 mt-4" style="animation-duration:0s"><form class="space-y-4"><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_dinpfdb_-form-item">项目名称</label><input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm" placeholder="prod-main" autoComplete="off" id="_R_dinpfdb_-form-item" aria-describedby="_R_dinpfdb_-form-item-description" aria-invalid="false" name="name" value=""/><p id="_R_dinpfdb_-form-item-description" class="text-[0.8rem] text-muted-foreground">仅用于本地区分,不会发送到服务端。</p></div><div class="grid gap-4 sm:grid-cols-2"><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_2linpfdb_-form-item">AccessKey ID</label><input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm" autoComplete="off" id="_R_2linpfdb_-form-item" aria-describedby="_R_2linpfdb_-form-item-description" aria-invalid="false" name="accessKeyId" value=""/></div><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_4linpfdb_-form-item">AccessKey Secret</label><input type="password" class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm" autoComplete="new-password" id="_R_4linpfdb_-form-item" aria-describedby="_R_4linpfdb_-form-item-description" aria-invalid="false" name="accessKeySecret" value=""/></div></div><div class="grid gap-4 sm:grid-cols-2"><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_2tinpfdb_-form-item">OTS Endpoint</label><input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm" placeholder="https://xxx.cn-hangzhou.ots.aliyuncs.com" id="_R_2tinpfdb_-form-item" aria-describedby="_R_2tinpfdb_-form-item-description" aria-invalid="false" name="otsEndpoint" value=""/></div><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_4tinpfdb_-form-item">OTS 实例名</label><input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm" id="_R_4tinpfdb_-form-item" aria-describedby="_R_4tinpfdb_-form-item-description" aria-invalid="false" name="otsInstanceName" value=""/></div></div><div class="flex items-start gap-2 rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.4)] px-3 py-2 text-xs text-[hsl(var(--muted-foreground))]"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-info mt-0.5 h-3.5 w-3.5 shrink-0 text-[hsl(var(--primary))]" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4"></path><path d="M12 8h.01"></path></svg><span>OSS 信息为可选项。若需上传文档到知识库,OSS Endpoint 与 Bucket 必填; 留空则项目只能用于查询与检索,文件上传功能将不可用。</span></div><div class="grid gap-4 sm:grid-cols-2"><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_3dinpfdb_-form-item">OSS Endpoint(可选)</label><input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm" placeholder="https://oss-cn-hangzhou.aliyuncs.com" id="_R_3dinpfdb_-form-item" aria-describedby="_R_3dinpfdb_-form-item-description" aria-invalid="false" name="ossEndpoint" value=""/></div><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_5dinpfdb_-form-item">OSS Bucket(可选)</label><input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm" id="_R_5dinpfdb_-form-item" aria-describedby="_R_5dinpfdb_-form-item-description" aria-invalid="false" name="ossBucketName" value=""/></div></div><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="_R_1linpfdb_-form-item">Region</label><button type="button" role="combobox" aria-controls="radix-_R_blinpfdb_" aria-expanded="false" aria-autocomplete="none" dir="ltr" data-state="closed" class="flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&amp;&gt;span]:line-clamp-1 bg-[hsl(var(--background))]" id="_R_1linpfdb_-form-item" aria-describedby="_R_1linpfdb_-form-item-description" aria-invalid="false"><span style="pointer-events:none"></span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down h-4 w-4 opacity-50" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></button><select aria-hidden="true" tabindex="-1" style="position:absolute;border:0;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;word-wrap:normal"></select></div><div class="flex justify-end pt-2"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] shadow hover:opacity-90 h-9 px-4 py-2" type="submit">连接并开始使用</button></div></form></div><div data-state="inactive" data-orientation="horizontal" role="tabpanel" aria-labelledby="radix-_R_inpfdb_-trigger-token" hidden="" id="radix-_R_inpfdb_-content-token" tabindex="0" class="ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 mt-4"></div></div></div><p class="text-center text-xs text-muted-foreground">稍后你随时可以通过右上角的项目切换器或「项目管理」页创建更多项目。</p></div><!--$--><!--/$--></div></div><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/0hmuddei8wdpj.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[12278,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"ThemeProvider\"]\n3:I[85290,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"QueryProvider\"]\n4:I[2063,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"default\"]\n5:I[10445,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\",\"/_next/static/chunks/02b1c4t1dy1ri.js\"],\"default\"]\n6:I[59666,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"default\"]\n7:I[70978,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\",\"/_next/static/chunks/012a-3vjn5o5i.js\"],\"\"]\n8:I[87014,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"Toaster\"]\n9:I[20962,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\",\"/_next/static/chunks/0sg6z8.ci0l2b.js\",\"/_next/static/chunks/168fusg46oh8s.js\"],\"default\"]\na:I[87919,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"ClientPageRoot\"]\nb:I[24883,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\",\"/_next/static/chunks/0.yj.t1hbwkg4.js\",\"/_next/static/chunks/0hkir82jccgck.js\",\"/_next/static/chunks/09qsmnfvk8dm3.js\",\"/_next/static/chunks/05hmbxh7h5ct-.js\",\"/_next/static/chunks/168fusg46oh8s.js\",\"/_next/static/chunks/0dqag6qsw7xv8.js\",\"/_next/static/chunks/0-mr2-dyb-szq.js\"],\"default\"]\ne:I[35582,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"OutletBoundary\"]\nf:\"$Sreact.suspense\"\n11:I[35582,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"ViewportBoundary\"]\n13:I[35582,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"MetadataBoundary\"]\n15:I[14743,[\"/_next/static/chunks/0m2p301.a174k.js\",\"/_next/static/chunks/0chbhht0ghzv_.js\",\"/_next/static/chunks/0-f9tslgpp-.h.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0v.hno.6q74nn.css\",\"style\"]\n:HC[\"/\",\"\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"onboarding\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"onboarding\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0v.hno.6q74nn.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0m2p301.a174k.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0chbhht0ghzv_.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/0-f9tslgpp-.h.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"zh-CN\",\"className\":\" \",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-screen font-sans antialiased text-foreground\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$5\",\"errorStyles\":[],\"errorScripts\":[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/02b1c4t1dy1ri.js\",\"async\":true}]],\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"div\",null,{\"className\":\"flex min-h-screen flex-col items-center justify-center gap-4\",\"children\":[[\"$\",\"h2\",null,{\"className\":\"font-display text-3xl font-semibold tracking-tight text-foreground\",\"children\":\"页面不存在\"}],[\"$\",\"p\",null,{\"className\":\"text-sm text-muted-foreground\",\"children\":\"您访问的页面不存在或已被移除。\"}],[\"$\",\"$L7\",null,{\"href\":\"/\",\"className\":\"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm transition-colors hover:bg-primary/90\",\"children\":\"返回首页\"}]]}],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L8\",null,{\"position\":\"top-right\",\"richColors\":true,\"closeButton\":true}]]}]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"div\",null,{\"className\":\"min-h-screen bg-background\",\"children\":[\"$\",\"div\",null,{\"className\":\"mx-auto flex min-h-screen w-full max-w-3xl flex-col items-stretch justify-center px-6 py-12\",\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$9\",\"errorStyles\":[],\"errorScripts\":[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0sg6z8.ci0l2b.js\",\"async\":true}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/168fusg46oh8s.js\",\"async\":true}]],\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$La\",null,{\"Component\":\"$b\",\"serverProvidedParams\":{\"searchParams\":{},\"params\":{},\"promises\":[\"$@c\",\"$@d\"]}}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0.yj.t1hbwkg4.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0hkir82jccgck.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/09qsmnfvk8dm3.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-3\",{\"src\":\"/_next/static/chunks/05hmbxh7h5ct-.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-4\",{\"src\":\"/_next/static/chunks/168fusg46oh8s.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-5\",{\"src\":\"/_next/static/chunks/0dqag6qsw7xv8.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-6\",{\"src\":\"/_next/static/chunks/0-mr2-dyb-szq.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$Le\",null,{\"children\":[\"$\",\"$f\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@10\"}]}]]}],{},null,false,null]},null,false,null]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L11\",null,{\"children\":\"$L12\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L13\",null,{\"children\":[\"$\",\"$f\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L14\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$15\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0v.hno.6q74nn.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"wWmSSYUu4w4mIF1R_7UoM\"}\n"])</script><script>self.__next_f.push([1,"c:{}\nd:\"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params\"\n"])</script><script>self.__next_f.push([1,"12:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"10:null\n14:[[\"$\",\"title\",\"0\",{\"children\":\"Agent Storage\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"A dashboard for managing Tablestore Agent Storage.\"}]]\n"])</script></body></html>
@@ -16,7 +16,7 @@ f:"$Sreact.suspense"
16
16
  15:I[14743,["/_next/static/chunks/0m2p301.a174k.js","/_next/static/chunks/0chbhht0ghzv_.js","/_next/static/chunks/0-f9tslgpp-.h.js"],"default",1]
17
17
  :HL["/_next/static/chunks/0v.hno.6q74nn.css","style"]
18
18
  :HC["/",""]
19
- 0:{"P":null,"c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0v.hno.6q74nn.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0m2p301.a174k.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0chbhht0ghzv_.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/0-f9tslgpp-.h.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"zh-CN","className":" ","suppressHydrationWarning":true,"children":["$","body",null,{"className":"min-h-screen font-sans antialiased text-foreground","children":["$","$L2",null,{"children":["$","$L3",null,{"children":[["$","$L4",null,{"parallelRouterKey":"children","error":"$5","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/02b1c4t1dy1ri.js","async":true}]],"template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","div",null,{"className":"flex min-h-screen flex-col items-center justify-center gap-4","children":[["$","h2",null,{"className":"font-display text-3xl font-semibold tracking-tight text-foreground","children":"页面不存在"}],["$","p",null,{"className":"text-sm text-muted-foreground","children":"您访问的页面不存在或已被移除。"}],["$","$L7",null,{"href":"/","className":"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm transition-colors hover:bg-primary/90","children":"返回首页"}]]}],[]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L8",null,{"position":"top-right","richColors":true,"closeButton":true}]]}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","div",null,{"className":"min-h-screen bg-background","children":["$","div",null,{"className":"mx-auto flex min-h-screen w-full max-w-3xl flex-col items-stretch justify-center px-6 py-12","children":["$","$L4",null,{"parallelRouterKey":"children","error":"$9","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/0sg6z8.ci0l2b.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/168fusg46oh8s.js","async":true}]],"template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$La",null,{"Component":"$b","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@c","$@d"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/0.yj.t1hbwkg4.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0hkir82jccgck.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/09qsmnfvk8dm3.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/_next/static/chunks/05hmbxh7h5ct-.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/_next/static/chunks/168fusg46oh8s.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/_next/static/chunks/0dqag6qsw7xv8.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/_next/static/chunks/0-mr2-dyb-szq.js","async":true,"nonce":"$undefined"}]],["$","$Le",null,{"children":["$","$f",null,{"name":"Next.MetadataOutlet","children":"$@10"}]}]]}],{},null,false,null]},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$L11",null,{"children":"$L12"}],["$","div",null,{"hidden":true,"children":["$","$L13",null,{"children":["$","$f",null,{"name":"Next.Metadata","children":"$L14"}]}]}],null]}],false]],"m":"$undefined","G":["$15",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0v.hno.6q74nn.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"MjeKF5uLzEvAqWkR9O6Ts"}
19
+ 0:{"P":null,"c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0v.hno.6q74nn.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0m2p301.a174k.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0chbhht0ghzv_.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/0-f9tslgpp-.h.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"zh-CN","className":" ","suppressHydrationWarning":true,"children":["$","body",null,{"className":"min-h-screen font-sans antialiased text-foreground","children":["$","$L2",null,{"children":["$","$L3",null,{"children":[["$","$L4",null,{"parallelRouterKey":"children","error":"$5","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/02b1c4t1dy1ri.js","async":true}]],"template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","div",null,{"className":"flex min-h-screen flex-col items-center justify-center gap-4","children":[["$","h2",null,{"className":"font-display text-3xl font-semibold tracking-tight text-foreground","children":"页面不存在"}],["$","p",null,{"className":"text-sm text-muted-foreground","children":"您访问的页面不存在或已被移除。"}],["$","$L7",null,{"href":"/","className":"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm transition-colors hover:bg-primary/90","children":"返回首页"}]]}],[]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L8",null,{"position":"top-right","richColors":true,"closeButton":true}]]}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","div",null,{"className":"min-h-screen bg-background","children":["$","div",null,{"className":"mx-auto flex min-h-screen w-full max-w-3xl flex-col items-stretch justify-center px-6 py-12","children":["$","$L4",null,{"parallelRouterKey":"children","error":"$9","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/0sg6z8.ci0l2b.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/168fusg46oh8s.js","async":true}]],"template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$La",null,{"Component":"$b","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@c","$@d"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/0.yj.t1hbwkg4.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0hkir82jccgck.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/09qsmnfvk8dm3.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/_next/static/chunks/05hmbxh7h5ct-.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/_next/static/chunks/168fusg46oh8s.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/_next/static/chunks/0dqag6qsw7xv8.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/_next/static/chunks/0-mr2-dyb-szq.js","async":true,"nonce":"$undefined"}]],["$","$Le",null,{"children":["$","$f",null,{"name":"Next.MetadataOutlet","children":"$@10"}]}]]}],{},null,false,null]},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$L11",null,{"children":"$L12"}],["$","div",null,{"hidden":true,"children":["$","$L13",null,{"children":["$","$f",null,{"name":"Next.Metadata","children":"$L14"}]}]}],null]}],false]],"m":"$undefined","G":["$15",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0v.hno.6q74nn.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"wWmSSYUu4w4mIF1R_7UoM"}
20
20
  c:{}
21
21
  d:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params"
22
22
  12:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
@@ -16,7 +16,7 @@ f:"$Sreact.suspense"
16
16
  15:I[14743,["/_next/static/chunks/0m2p301.a174k.js","/_next/static/chunks/0chbhht0ghzv_.js","/_next/static/chunks/0-f9tslgpp-.h.js"],"default",1]
17
17
  :HL["/_next/static/chunks/0v.hno.6q74nn.css","style"]
18
18
  :HC["/",""]
19
- 0:{"P":null,"c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0v.hno.6q74nn.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0m2p301.a174k.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0chbhht0ghzv_.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/0-f9tslgpp-.h.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"zh-CN","className":" ","suppressHydrationWarning":true,"children":["$","body",null,{"className":"min-h-screen font-sans antialiased text-foreground","children":["$","$L2",null,{"children":["$","$L3",null,{"children":[["$","$L4",null,{"parallelRouterKey":"children","error":"$5","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/02b1c4t1dy1ri.js","async":true}]],"template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","div",null,{"className":"flex min-h-screen flex-col items-center justify-center gap-4","children":[["$","h2",null,{"className":"font-display text-3xl font-semibold tracking-tight text-foreground","children":"页面不存在"}],["$","p",null,{"className":"text-sm text-muted-foreground","children":"您访问的页面不存在或已被移除。"}],["$","$L7",null,{"href":"/","className":"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm transition-colors hover:bg-primary/90","children":"返回首页"}]]}],[]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L8",null,{"position":"top-right","richColors":true,"closeButton":true}]]}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","div",null,{"className":"min-h-screen bg-background","children":["$","div",null,{"className":"mx-auto flex min-h-screen w-full max-w-3xl flex-col items-stretch justify-center px-6 py-12","children":["$","$L4",null,{"parallelRouterKey":"children","error":"$9","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/0sg6z8.ci0l2b.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/168fusg46oh8s.js","async":true}]],"template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$La",null,{"Component":"$b","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@c","$@d"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/0.yj.t1hbwkg4.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0hkir82jccgck.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/09qsmnfvk8dm3.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/_next/static/chunks/05hmbxh7h5ct-.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/_next/static/chunks/168fusg46oh8s.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/_next/static/chunks/0dqag6qsw7xv8.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/_next/static/chunks/0-mr2-dyb-szq.js","async":true,"nonce":"$undefined"}]],["$","$Le",null,{"children":["$","$f",null,{"name":"Next.MetadataOutlet","children":"$@10"}]}]]}],{},null,false,null]},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$L11",null,{"children":"$L12"}],["$","div",null,{"hidden":true,"children":["$","$L13",null,{"children":["$","$f",null,{"name":"Next.Metadata","children":"$L14"}]}]}],null]}],false]],"m":"$undefined","G":["$15",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0v.hno.6q74nn.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"MjeKF5uLzEvAqWkR9O6Ts"}
19
+ 0:{"P":null,"c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0v.hno.6q74nn.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0m2p301.a174k.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0chbhht0ghzv_.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/0-f9tslgpp-.h.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"zh-CN","className":" ","suppressHydrationWarning":true,"children":["$","body",null,{"className":"min-h-screen font-sans antialiased text-foreground","children":["$","$L2",null,{"children":["$","$L3",null,{"children":[["$","$L4",null,{"parallelRouterKey":"children","error":"$5","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/02b1c4t1dy1ri.js","async":true}]],"template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","div",null,{"className":"flex min-h-screen flex-col items-center justify-center gap-4","children":[["$","h2",null,{"className":"font-display text-3xl font-semibold tracking-tight text-foreground","children":"页面不存在"}],["$","p",null,{"className":"text-sm text-muted-foreground","children":"您访问的页面不存在或已被移除。"}],["$","$L7",null,{"href":"/","className":"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm transition-colors hover:bg-primary/90","children":"返回首页"}]]}],[]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L8",null,{"position":"top-right","richColors":true,"closeButton":true}]]}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","div",null,{"className":"min-h-screen bg-background","children":["$","div",null,{"className":"mx-auto flex min-h-screen w-full max-w-3xl flex-col items-stretch justify-center px-6 py-12","children":["$","$L4",null,{"parallelRouterKey":"children","error":"$9","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/0sg6z8.ci0l2b.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/168fusg46oh8s.js","async":true}]],"template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$La",null,{"Component":"$b","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@c","$@d"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/0.yj.t1hbwkg4.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0hkir82jccgck.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/09qsmnfvk8dm3.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/_next/static/chunks/05hmbxh7h5ct-.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/_next/static/chunks/168fusg46oh8s.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/_next/static/chunks/0dqag6qsw7xv8.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/_next/static/chunks/0-mr2-dyb-szq.js","async":true,"nonce":"$undefined"}]],["$","$Le",null,{"children":["$","$f",null,{"name":"Next.MetadataOutlet","children":"$@10"}]}]]}],{},null,false,null]},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$L11",null,{"children":"$L12"}],["$","div",null,{"hidden":true,"children":["$","$L13",null,{"children":["$","$f",null,{"name":"Next.Metadata","children":"$L14"}]}]}],null]}],false]],"m":"$undefined","G":["$15",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0v.hno.6q74nn.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"wWmSSYUu4w4mIF1R_7UoM"}
20
20
  c:{}
21
21
  d:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params"
22
22
  12:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
@@ -2,4 +2,4 @@
2
2
  2:I[35582,["/_next/static/chunks/0m2p301.a174k.js","/_next/static/chunks/0chbhht0ghzv_.js","/_next/static/chunks/0-f9tslgpp-.h.js"],"ViewportBoundary"]
3
3
  3:I[35582,["/_next/static/chunks/0m2p301.a174k.js","/_next/static/chunks/0chbhht0ghzv_.js","/_next/static/chunks/0-f9tslgpp-.h.js"],"MetadataBoundary"]
4
4
  4:"$Sreact.suspense"
5
- 0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Agent Storage"}],["$","meta","1",{"name":"description","content":"A dashboard for managing Tablestore Agent Storage."}]]}]}]}],null]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"MjeKF5uLzEvAqWkR9O6Ts"}
5
+ 0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Agent Storage"}],["$","meta","1",{"name":"description","content":"A dashboard for managing Tablestore Agent Storage."}]]}]}]}],null]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"wWmSSYUu4w4mIF1R_7UoM"}
@@ -7,4 +7,4 @@
7
7
  7:I[70978,["/_next/static/chunks/0m2p301.a174k.js","/_next/static/chunks/0chbhht0ghzv_.js","/_next/static/chunks/0-f9tslgpp-.h.js","/_next/static/chunks/012a-3vjn5o5i.js"],""]
8
8
  8:I[87014,["/_next/static/chunks/0m2p301.a174k.js","/_next/static/chunks/0chbhht0ghzv_.js","/_next/static/chunks/0-f9tslgpp-.h.js"],"Toaster"]
9
9
  :HL["/_next/static/chunks/0v.hno.6q74nn.css","style"]
10
- 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0v.hno.6q74nn.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/0m2p301.a174k.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/0chbhht0ghzv_.js","async":true}],["$","script","script-2",{"src":"/_next/static/chunks/0-f9tslgpp-.h.js","async":true}]],["$","html",null,{"lang":"zh-CN","className":" ","suppressHydrationWarning":true,"children":["$","body",null,{"className":"min-h-screen font-sans antialiased text-foreground","children":["$","$L2",null,{"children":["$","$L3",null,{"children":[["$","$L4",null,{"parallelRouterKey":"children","error":"$5","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/02b1c4t1dy1ri.js","async":true}]],"template":["$","$L6",null,{}],"notFound":[["$","div",null,{"className":"flex min-h-screen flex-col items-center justify-center gap-4","children":[["$","h2",null,{"className":"font-display text-3xl font-semibold tracking-tight text-foreground","children":"页面不存在"}],["$","p",null,{"className":"text-sm text-muted-foreground","children":"您访问的页面不存在或已被移除。"}],["$","$L7",null,{"href":"/","className":"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm transition-colors hover:bg-primary/90","children":"返回首页"}]]}],[]]}],["$","$L8",null,{"position":"top-right","richColors":true,"closeButton":true}]]}]}]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"MjeKF5uLzEvAqWkR9O6Ts"}
10
+ 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0v.hno.6q74nn.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/0m2p301.a174k.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/0chbhht0ghzv_.js","async":true}],["$","script","script-2",{"src":"/_next/static/chunks/0-f9tslgpp-.h.js","async":true}]],["$","html",null,{"lang":"zh-CN","className":" ","suppressHydrationWarning":true,"children":["$","body",null,{"className":"min-h-screen font-sans antialiased text-foreground","children":["$","$L2",null,{"children":["$","$L3",null,{"children":[["$","$L4",null,{"parallelRouterKey":"children","error":"$5","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/02b1c4t1dy1ri.js","async":true}]],"template":["$","$L6",null,{}],"notFound":[["$","div",null,{"className":"flex min-h-screen flex-col items-center justify-center gap-4","children":[["$","h2",null,{"className":"font-display text-3xl font-semibold tracking-tight text-foreground","children":"页面不存在"}],["$","p",null,{"className":"text-sm text-muted-foreground","children":"您访问的页面不存在或已被移除。"}],["$","$L7",null,{"href":"/","className":"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm transition-colors hover:bg-primary/90","children":"返回首页"}]]}],[]]}],["$","$L8",null,{"position":"top-right","richColors":true,"closeButton":true}]]}]}]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"wWmSSYUu4w4mIF1R_7UoM"}
@@ -1,3 +1,3 @@
1
1
  :HL["/_next/static/chunks/0v.hno.6q74nn.css","style"]
2
2
  :HC["/",""]
3
- 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"onboarding","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"MjeKF5uLzEvAqWkR9O6Ts"}
3
+ 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"onboarding","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"wWmSSYUu4w4mIF1R_7UoM"}
@@ -3,7 +3,7 @@
3
3
  3:I[24883,["/_next/static/chunks/0m2p301.a174k.js","/_next/static/chunks/0chbhht0ghzv_.js","/_next/static/chunks/0-f9tslgpp-.h.js","/_next/static/chunks/0.yj.t1hbwkg4.js","/_next/static/chunks/0hkir82jccgck.js","/_next/static/chunks/09qsmnfvk8dm3.js","/_next/static/chunks/05hmbxh7h5ct-.js","/_next/static/chunks/168fusg46oh8s.js","/_next/static/chunks/0dqag6qsw7xv8.js","/_next/static/chunks/0-mr2-dyb-szq.js"],"default"]
4
4
  6:I[35582,["/_next/static/chunks/0m2p301.a174k.js","/_next/static/chunks/0chbhht0ghzv_.js","/_next/static/chunks/0-f9tslgpp-.h.js"],"OutletBoundary"]
5
5
  7:"$Sreact.suspense"
6
- 0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/0.yj.t1hbwkg4.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/0hkir82jccgck.js","async":true}],["$","script","script-2",{"src":"/_next/static/chunks/09qsmnfvk8dm3.js","async":true}],["$","script","script-3",{"src":"/_next/static/chunks/05hmbxh7h5ct-.js","async":true}],["$","script","script-4",{"src":"/_next/static/chunks/168fusg46oh8s.js","async":true}],["$","script","script-5",{"src":"/_next/static/chunks/0dqag6qsw7xv8.js","async":true}],["$","script","script-6",{"src":"/_next/static/chunks/0-mr2-dyb-szq.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"MjeKF5uLzEvAqWkR9O6Ts"}
6
+ 0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/0.yj.t1hbwkg4.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/0hkir82jccgck.js","async":true}],["$","script","script-2",{"src":"/_next/static/chunks/09qsmnfvk8dm3.js","async":true}],["$","script","script-3",{"src":"/_next/static/chunks/05hmbxh7h5ct-.js","async":true}],["$","script","script-4",{"src":"/_next/static/chunks/168fusg46oh8s.js","async":true}],["$","script","script-5",{"src":"/_next/static/chunks/0dqag6qsw7xv8.js","async":true}],["$","script","script-6",{"src":"/_next/static/chunks/0-mr2-dyb-szq.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"wWmSSYUu4w4mIF1R_7UoM"}
7
7
  4:{}
8
8
  5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
9
9
  8:null
@@ -2,4 +2,4 @@
2
2
  2:I[2063,["/_next/static/chunks/0m2p301.a174k.js","/_next/static/chunks/0chbhht0ghzv_.js","/_next/static/chunks/0-f9tslgpp-.h.js"],"default"]
3
3
  3:I[20962,["/_next/static/chunks/0m2p301.a174k.js","/_next/static/chunks/0chbhht0ghzv_.js","/_next/static/chunks/0-f9tslgpp-.h.js","/_next/static/chunks/0sg6z8.ci0l2b.js","/_next/static/chunks/168fusg46oh8s.js"],"default"]
4
4
  4:I[59666,["/_next/static/chunks/0m2p301.a174k.js","/_next/static/chunks/0chbhht0ghzv_.js","/_next/static/chunks/0-f9tslgpp-.h.js"],"default"]
5
- 0:{"rsc":["$","$1","c",{"children":[null,["$","div",null,{"className":"min-h-screen bg-background","children":["$","div",null,{"className":"mx-auto flex min-h-screen w-full max-w-3xl flex-col items-stretch justify-center px-6 py-12","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$3","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/0sg6z8.ci0l2b.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/168fusg46oh8s.js","async":true}]],"template":["$","$L4",null,{}]}]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"MjeKF5uLzEvAqWkR9O6Ts"}
5
+ 0:{"rsc":["$","$1","c",{"children":[null,["$","div",null,{"className":"min-h-screen bg-background","children":["$","div",null,{"className":"mx-auto flex min-h-screen w-full max-w-3xl flex-col items-stretch justify-center px-6 py-12","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$3","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/0sg6z8.ci0l2b.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/168fusg46oh8s.js","async":true}]],"template":["$","$L4",null,{}]}]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"wWmSSYUu4w4mIF1R_7UoM"}
@@ -1,3 +1,3 @@
1
- module.exports=[91957,a=>{"use strict";var b=a.i(34020);let c=(0,a.i(50053).default)("message-square-plus",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]]);var d=a.i(55295),e=a.i(76192),f=a.i(64565);function g({session:a,active:c,onSelect:h,onDelete:i}){let j=a.config.mounts.length;return(0,b.jsxs)("div",{className:(0,f.cn)("group flex items-center gap-1 rounded-md px-2 py-1.5 text-sm transition-colors",c?"bg-[hsl(var(--accent))] text-foreground":"text-foreground/80 hover:bg-[hsl(var(--accent)/0.6)]"),children:[(0,b.jsxs)("button",{type:"button",onClick:h,className:"flex min-w-0 flex-1 flex-col items-start text-left",children:[(0,b.jsx)("span",{className:"w-full truncate font-medium",children:a.title}),(0,b.jsxs)("span",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,b.jsx)("span",{children:function(a){let b=Math.floor((Date.now()-a)/6e4);if(b<1)return"刚刚";if(b<60)return`${b} 分钟前`;let c=Math.floor(b/60);if(c<24)return`${c} 小时前`;let d=Math.floor(c/24);return d<7?`${d} 天前`:new Date(a).toLocaleDateString()}(a.updatedAt)}),j>0?(0,b.jsxs)("span",{children:["· ",j," KB"]}):null]})]}),(0,b.jsx)(e.Button,{type:"button",variant:"ghost",size:"icon",onClick:a=>{a.stopPropagation(),i()},className:"h-6 w-6 opacity-0 group-hover:opacity-100",title:"删除",children:(0,b.jsx)(d.Trash2,{className:"h-3 w-3 text-muted-foreground"})})]})}a.s(["ChatHistorySidebar",0,function({sessions:a,activeSessionId:f,onNewSession:h,onSelectSession:i,onDeleteSession:j,onClearAll:k}){return(0,b.jsxs)("aside",{className:"flex h-full w-64 shrink-0 flex-col border-r border-[hsl(var(--border))] bg-[hsl(var(--surface))]",children:[(0,b.jsx)("div",{className:"border-b border-[hsl(var(--border))] p-3",children:(0,b.jsxs)(e.Button,{type:"button",onClick:h,className:"w-full justify-start gap-2",variant:"outline",children:[(0,b.jsx)(c,{className:"h-4 w-4"}),"新对话"]})}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto",children:0===a.length?(0,b.jsx)("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"暂无历史对话"}):(0,b.jsx)("ul",{className:"space-y-0.5 p-2",children:a.map(a=>(0,b.jsx)("li",{children:(0,b.jsx)(g,{session:a,active:a.id===f,onSelect:()=>i(a.id),onDelete:()=>j(a.id)})},a.id))})}),a.length>0?(0,b.jsx)("div",{className:"border-t border-[hsl(var(--border))] p-2",children:(0,b.jsxs)(e.Button,{type:"button",variant:"ghost",size:"sm",onClick:k,className:"w-full justify-start gap-2 text-muted-foreground hover:text-[hsl(var(--destructive))]",children:[(0,b.jsx)(d.Trash2,{className:"h-3.5 w-3.5"}),"清空全部"]})}):null]})}],91957)},38285,a=>{"use strict";var b=a.i(34020),c=a.i(71938),d=a.i(93078);let e={providerId:"",model:"",systemPrompt:"",temperature:void 0,aggregateTopK:20,perKbTopK:20,retrieval:{searchType:["DENSE_VECTOR","FULL_TEXT"],rerankType:"WEIGHT",weightDense:.7,weightFullText:.3},mounts:[]};function f(a,b){switch(b.type){case"SET_PROVIDER":return{...a,providerId:b.providerId,model:b.model};case"SET_MODEL":return{...a,model:b.model};case"SET_SYSTEM_PROMPT":return{...a,systemPrompt:b.value};case"SET_TEMPERATURE":return{...a,temperature:b.value};case"SET_AGGREGATE_TOP_K":return{...a,aggregateTopK:b.value};case"SET_PER_KB_TOP_K":return{...a,perKbTopK:b.value};case"SET_RETRIEVAL":return{...a,retrieval:b.value};case"ADD_MOUNT":if(a.mounts.some(a=>a.knowledgeBaseName===b.mount.knowledgeBaseName))return a;return{...a,mounts:[...a.mounts,b.mount]};case"UPDATE_MOUNT":return{...a,mounts:a.mounts.map(a=>a.id===b.id?{...a,...b.patch}:a)};case"REMOVE_MOUNT":return{...a,mounts:a.mounts.filter(a=>a.id!==b.id)};case"REORDER_MOUNTS":{let c=new Map(a.mounts.map(a=>[a.id,a])),d=b.ids.map(a=>c.get(a)).filter(a=>!!a);return{...a,mounts:d}}case"HYDRATE":return{...a,...b.state};case"RESET":return e;default:return a}}let g=(0,c.createContext)(null);a.s(["ChatConfigProvider",0,function({children:a}){let[d,h]=(0,c.useReducer)(f,e),i=(0,c.useMemo)(()=>({...d,setProvider:(a,b)=>h({type:"SET_PROVIDER",providerId:a,model:b}),setModel:a=>h({type:"SET_MODEL",model:a}),setSystemPrompt:a=>h({type:"SET_SYSTEM_PROMPT",value:a}),setTemperature:a=>h({type:"SET_TEMPERATURE",value:a}),setAggregateTopK:a=>h({type:"SET_AGGREGATE_TOP_K",value:a}),setPerKbTopK:a=>h({type:"SET_PER_KB_TOP_K",value:a}),setRetrieval:a=>h({type:"SET_RETRIEVAL",value:a}),addMount:a=>h({type:"ADD_MOUNT",mount:a}),updateMount:(a,b)=>h({type:"UPDATE_MOUNT",id:a,patch:b}),removeMount:a=>h({type:"REMOVE_MOUNT",id:a}),reorderMounts:a=>h({type:"REORDER_MOUNTS",ids:a}),hydrate:a=>h({type:"HYDRATE",state:a}),reset:()=>h({type:"RESET"}),toSessionConfig:()=>({providerId:d.providerId||void 0,model:d.model||void 0,systemPrompt:d.systemPrompt||void 0,temperature:d.temperature,aggregateTopK:d.aggregateTopK,perKbTopK:d.perKbTopK,retrieval:d.retrieval,mounts:d.mounts})}),[d]);return(0,b.jsx)(g.Provider,{value:i,children:a})},"DEFAULT_AGGREGATE_TOP_K",0,20,"DEFAULT_PER_KB_TOP_K",0,20,"buildRagFromMounts",0,function(a){if(!a.mounts.length)return;let b=(0,d.assembleRetrievalConfiguration)(a.retrieval,a.perKbTopK);return{knowledgeBases:a.mounts.map(c=>({knowledgeBaseName:c.knowledgeBaseName,...c.subspace?.length?{subspace:c.subspace}:{},...b?{retrievalConfiguration:b}:{},topK:a.perKbTopK})),topK:a.aggregateTopK}},"useChatConfig",0,function(){let a=(0,c.useContext)(g);if(!a)throw Error("useChatConfig must be used within a ChatConfigProvider");return a}])},58489,a=>{"use strict";var b=a.i(34020),c=a.i(71938),d=a.i(53520),e=a.i(88619),f=a.i(14151),g=a.i(64565);let h=e.Root;e.Trigger,e.Close;let i=e.Portal,j=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)(e.Overlay,{ref:d,className:(0,g.cn)("fixed inset-0 z-50 bg-black/60 backdrop-blur-sm duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...c}));j.displayName=e.Overlay.displayName;let k={top:"inset-x-0 top-0 border-b data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top",bottom:"inset-x-0 bottom-0 border-t data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom",left:"inset-y-0 left-0 h-full w-3/4 max-w-sm border-r data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left",right:"inset-y-0 right-0 h-full w-3/4 max-w-md border-l data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right"},l=c.forwardRef(({className:a,children:c,side:d="right",...h},l)=>(0,b.jsxs)(i,{children:[(0,b.jsx)(j,{}),(0,b.jsxs)(e.Content,{ref:l,className:(0,g.cn)("fixed z-50 flex flex-col gap-4 bg-[hsl(var(--background))] p-6 shadow-xl","duration-300 ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out",k[d],a),...h,children:[c,(0,b.jsxs)(e.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[(0,b.jsx)(f.X,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));l.displayName=e.Content.displayName;let m=({className:a,...c})=>(0,b.jsx)("div",{className:(0,g.cn)("flex flex-col space-y-1.5 text-left",a),...c});m.displayName="SheetHeader";let n=({className:a,...c})=>(0,b.jsx)("div",{className:(0,g.cn)("mt-auto flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2",a),...c});n.displayName="SheetFooter";let o=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)(e.Title,{ref:d,className:(0,g.cn)("text-lg font-semibold leading-none tracking-tight",a),...c}));o.displayName=e.Title.displayName;let p=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)(e.Description,{ref:d,className:(0,g.cn)("text-sm text-muted-foreground",a),...c}));p.displayName=e.Description.displayName;var q=a.i(76192),r=a.i(72518),s=a.i(62491),t=a.i(9367),u=a.i(38285),v=a.i(64363),w=a.i(32191),x=a.i(87951),y=a.i(83643),z=a.i(25825),A=a.i(63525);function B({kbs:a,onAdd:d}){let[e,f]=(0,c.useState)(""),g=a.find(a=>a.knowledgeBaseName===e);return(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)(A.Select,{value:e,onValueChange:f,children:[(0,b.jsx)(A.SelectTrigger,{className:"flex-1",children:(0,b.jsx)(A.SelectValue,{placeholder:"选择要挂载的知识库"})}),(0,b.jsx)(A.SelectContent,{children:0===a.length?(0,b.jsx)(A.SelectItem,{value:"__empty",disabled:!0,children:"无可挂载的知识库"}):a.map(a=>(0,b.jsx)(A.SelectItem,{value:a.knowledgeBaseName,children:a.knowledgeBaseName},a.knowledgeBaseName))})]}),(0,b.jsxs)(q.Button,{type:"button",size:"sm",disabled:!g,onClick:()=>{g&&(d(g),f(""))},children:[(0,b.jsx)(z.Plus,{className:"mr-1 h-3.5 w-3.5"}),"添加"]})]})}var C=a.i(55295);function D({mount:a,subspaceEnabled:d}){let e=(0,u.useChatConfig)(),[f,g]=(0,c.useState)((a.subspace??[]).join(", "));return(0,b.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.3)] px-3 py-2",children:[(0,b.jsx)("span",{className:"flex-1 truncate text-sm font-medium",title:a.knowledgeBaseName,children:a.knowledgeBaseName}),d?(0,b.jsx)(r.Input,{value:f,onChange:a=>g(a.target.value),onBlur:()=>{let b=f.split(",").map(a=>a.trim()).filter(Boolean),c=a.subspace??[];b.length===c.length&&b.every((a,b)=>a===c[b])||e.updateMount(a.id,{subspace:b.length?b:void 0})},onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),a.target.blur())},placeholder:"subspace (逗号分隔)",className:"h-8 w-44 text-xs"}):null,(0,b.jsx)(q.Button,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>e.removeMount(a.id),title:"移除",children:(0,b.jsx)(C.Trash2,{className:"h-3.5 w-3.5 text-muted-foreground"})})]})}var E=a.i(71562),F=a.i(71071),G=a.i(44401),H=a.i(92942),I=a.i(18236),J=a.i(15325);let K=["searchType","rerankType","rrfK","rrfDenseWeight","rrfFullTextWeight","weightDense","weightFullText","modelName","modelProvider"];function L({disabled:a,singleKb:d}){let e=(0,u.useChatConfig)(),f=(0,c.useRef)(null),g=(0,E.useForm)({resolver:(0,F.zodResolver)(J.retrievalSchema),defaultValues:{knowledgeBaseName:d?.knowledgeBaseName??"__unified__",query:"__unified_placeholder__",subspace:[],topK:e.perKbTopK,searchType:e.retrieval.searchType??["DENSE_VECTOR","FULL_TEXT"],rerankType:e.retrieval.rerankType,rrfK:e.retrieval.rrfK,rrfDenseWeight:e.retrieval.rrfDenseWeight,rrfFullTextWeight:e.retrieval.rrfFullTextWeight,weightDense:e.retrieval.weightDense,weightFullText:e.retrieval.weightFullText,modelName:e.retrieval.modelName,modelProvider:e.retrieval.modelProvider}});(0,c.useEffect)(()=>{g.reset({knowledgeBaseName:d?.knowledgeBaseName??"__unified__",query:"__unified_placeholder__",subspace:[],topK:e.perKbTopK,searchType:e.retrieval.searchType??["DENSE_VECTOR","FULL_TEXT"],rerankType:e.retrieval.rerankType,rrfK:e.retrieval.rrfK,rrfDenseWeight:e.retrieval.rrfDenseWeight,rrfFullTextWeight:e.retrieval.rrfFullTextWeight,weightDense:e.retrieval.weightDense,weightFullText:e.retrieval.weightFullText,modelName:e.retrieval.modelName,modelProvider:e.retrieval.modelProvider})},[e.retrieval,e.perKbTopK,d?.knowledgeBaseName]);let h=()=>{let a=g.getValues(),b={};for(let c of K){let d=a[c];void 0===d||Array.isArray(d)&&0===d.length||(b[c]=d)}e.setRetrieval(b),e.setPerKbTopK("number"==typeof a.topK&&a.topK>0?a.topK:u.DEFAULT_PER_KB_TOP_K)},i=g.watch("rerankType");return(0,c.useEffect)(()=>{if("MODEL"!==i)return;let a=!1;g.getValues("modelProvider")||(g.setValue("modelProvider","bailian"),a=!0),g.getValues("modelName")||(g.setValue("modelName","gte-rerank-v2"),a=!0),a&&h()},[i]),(0,b.jsxs)("div",{className:"space-y-3 border-t border-[hsl(var(--border))] pt-4"+(a?" pointer-events-none opacity-50":""),"aria-disabled":a,children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(s.Label,{className:"text-sm font-medium",children:"统一检索参数"}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"应用到所有挂载 KB 的统一查询配置,保证分数可比;每 KB 单独检索后合并重排"})]}),a?(0,b.jsxs)("div",{className:"flex items-start gap-2 rounded-md border border-dashed border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.4)] px-3 py-3 text-xs text-muted-foreground",children:[(0,b.jsx)(G.Info,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,b.jsx)("span",{children:"挂载至少一个知识库后即可配置统一检索参数"})]}):(0,b.jsx)(H.Form,{...g,children:(0,b.jsx)("form",{onSubmit:a=>a.preventDefault(),onBlur:h,className:"space-y-4",children:(0,b.jsx)(I.RetrievalParamsFields,{form:g,knowledgeBase:d,filterRef:f,topKLabel:"每 KB topK",topKHint:"单库检索条数,默认 20"})})})]})}a.s(["ChatMountConfig",0,function({open:a,onOpenChange:e,onSave:f}){let g=(0,u.useChatConfig)(),{data:i}=(0,t.useKnowledgeBases)(),j=i?.items??[],k=j.filter(a=>!g.mounts.some(b=>b.knowledgeBaseName===a.knowledgeBaseName)),[z,A]=(0,c.useState)(!1),C=(0,c.useRef)(null);return(0,c.useEffect)(()=>()=>{C.current&&clearTimeout(C.current)},[]),(0,b.jsx)(h,{open:a,onOpenChange:e,children:(0,b.jsxs)(l,{side:"right",className:"flex w-full flex-col gap-0 p-0 sm:max-w-[520px]",children:[(0,b.jsxs)(m,{className:"border-b border-[hsl(var(--border))] px-6 py-4",children:[(0,b.jsx)(o,{children:"对话配置"}),(0,b.jsx)(p,{children:"选择模型、编辑 system prompt,挂载多个知识库作为检索来源"})]}),(0,b.jsxs)("div",{className:"flex-1 space-y-5 overflow-y-auto px-6 py-5",children:[(0,b.jsx)(v.LLMModelSelector,{providerId:g.providerId,model:g.model,onProviderChange:(a,b)=>{g.setProvider(a,b??"")},onModelChange:a=>g.setModel(a)}),(0,b.jsx)(w.SystemPromptInput,{value:g.systemPrompt,onChange:a=>g.setSystemPrompt(a),placeholder:"留空使用默认 prompt",label:"System Prompt"}),(0,b.jsx)(x.TemperatureSlider,{value:g.temperature??.7,onChange:a=>g.setTemperature(a),label:"Temperature"}),(0,b.jsxs)("div",{className:"space-y-3 border-t border-[hsl(var(--border))] pt-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(s.Label,{className:"text-sm font-medium",children:"挂载的知识库"}),(0,b.jsxs)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["并行检索,按 score 全局重排,取前 ",g.aggregateTopK," 条"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(s.Label,{className:"text-xs text-muted-foreground",title:"合并所有 KB 的命中后按分数截断的上限",children:"聚合 topK"}),(0,b.jsx)(r.Input,{type:"number",min:1,max:200,value:g.aggregateTopK,onChange:a=>g.setAggregateTopK(Math.max(1,Number(a.target.value)||1)),className:"h-8 w-20"})]})]}),(0,b.jsx)(B,{kbs:k,onAdd:a=>g.addMount({id:(0,y.newId)("mount"),knowledgeBaseName:a.knowledgeBaseName})}),0===g.mounts.length?(0,b.jsx)("p",{className:"rounded-md border border-dashed border-[hsl(var(--border))] px-3 py-4 text-center text-xs text-muted-foreground",children:"还没有挂载知识库;添加一个以启用 RAG"}):(0,b.jsx)("div",{className:"space-y-2",children:g.mounts.map(a=>{let c=j.find(b=>b.knowledgeBaseName===a.knowledgeBaseName);return(0,b.jsx)(D,{mount:a,subspaceEnabled:c?.subspace===!0},a.id)})})]}),(0,b.jsx)(L,{disabled:0===g.mounts.length,singleKb:1===g.mounts.length?j.find(a=>a.knowledgeBaseName===g.mounts[0].knowledgeBaseName):void 0})]}),(0,b.jsxs)(n,{className:"gap-2 border-t border-[hsl(var(--border))] bg-[hsl(var(--surface))] px-6 py-3 sm:items-center sm:justify-between sm:space-x-0",children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"未保存的修改在发送下一条消息时也会自动持久化"}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(q.Button,{type:"button",variant:"ghost",onClick:()=>e(!1),children:"关闭"}),(0,b.jsx)(q.Button,{type:"button",onClick:()=>{f(),A(!0),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>A(!1),2e3)},disabled:z,children:z?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.Check,{className:"mr-1.5 h-4 w-4"}),"已保存"]}):"保存配置"})]})]})]})})}],58489)},71173,a=>{"use strict";var b=a.i(71938);function c(a){}let d=new Set;function e(a){return d.add(a),()=>{d.delete(a)}}let f=[];function g(){return f}function h(){return[]}a.s(["deriveSessionTitle",0,function(a){let b=a.find(a=>"user"===a.role);if(!b)return"新对话";let c=b.content.replace(/\s+/g," ").trim();return c?c.length>24?`${c.slice(0,24)}…`:c:"新对话"},"useChatHistory",0,function(){let a=(0,b.useSyncExternalStore)(e,g,h),d=(0,b.useCallback)(a=>{let b,d,e;b=[],d=a.messages.length>200?{...a,messages:a.messages.slice(-200)}:a,(e=b.findIndex(a=>a.id===d.id))>=0?b[e]=d:b.push(d),c(b.sort((a,b)=>b.updatedAt-a.updatedAt).slice(0,50))},[]),f=(0,b.useCallback)(a=>{c([].filter(b=>b.id!==a))},[]);return{sessions:a,upsert:d,remove:f,clear:(0,b.useCallback)(()=>{c([])},[]),get:(0,b.useCallback)(a=>[].find(b=>b.id===a)??null,[])}}])},57634,a=>{"use strict";a.s(["readLastConfig",0,function(a){return{}},"writeLastConfig",0,function(a,b){}])},45533,a=>a.a(async(b,c)=>{try{var d=a.i(34020),e=a.i(71938),f=a.i(10581),g=a.i(76192),h=a.i(57900),i=a.i(91957),j=a.i(58489),k=a.i(38285),l=a.i(71173),m=a.i(9135),n=a.i(57634),o=a.i(83643),p=b([h]);function q(){let a=(0,k.useChatConfig)(),b=(0,l.useChatHistory)(),c=function(){let[a,b]=(0,e.useState)(null);return(0,e.useEffect)(()=>{let a=!1,c=0,d=async()=>{try{let c=await fetch("/api/v1/auth/status",{cache:"no-store"});if(!c.ok)return;let d=await c.json();a||b(d?.data?.activeInstance??null)}catch{}};d(),c=Date.now();let e=()=>{let a=Date.now();a-c<5e3||(c=a,d())};return window.addEventListener("focus",e),()=>{a=!0,window.removeEventListener("focus",e)}},[]),a}(),[p,q]=(0,e.useState)(null),[r,s]=(0,e.useState)(!1),t=(0,e.useRef)(!1),u=(0,e.useCallback)((d,e)=>{if(e.requireSent&&!t.current)return;let f=p??(0,o.newId)("session");p||q(f);let g=e.preserveTitle?b.get(f):null,h=g?.title??(0,l.deriveSessionTitle)(d),i={id:f,title:h,updatedAt:Date.now(),activeInstance:c,config:a.toSessionConfig(),messages:d};b.upsert(i),a.providerId&&(0,n.writeLastConfig)(c,{providerId:a.providerId,model:a.model})},[p,a,b,c]),v=(0,e.useCallback)(a=>{u(a,{requireSent:!0,preserveTitle:!1})},[u]),w=(0,e.useMemo)(()=>(0,k.buildRagFromMounts)(a),[a]),x=(0,m.useQaChat)({providerId:a.providerId,model:a.model,systemPrompt:a.systemPrompt,temperature:a.temperature,rag:w,onPersist:v}),y=(0,e.useCallback)(c=>{let d=b.get(c);d&&(q(c),t.current=d.messages.length>0,x.setMessages(d.messages),a.hydrate({providerId:d.config.providerId??"",model:d.config.model??"",systemPrompt:d.config.systemPrompt??"",temperature:d.config.temperature,aggregateTopK:d.config.aggregateTopK??k.DEFAULT_AGGREGATE_TOP_K,perKbTopK:d.config.perKbTopK??k.DEFAULT_PER_KB_TOP_K,retrieval:d.config.retrieval??{},mounts:d.config.mounts??[]}))},[b,x.setMessages,a.hydrate]),z=(0,e.useCallback)(()=>{q(null),t.current=!1,x.clear();let b=(0,n.readLastConfig)(c);a.setProvider(b.providerId??"",b.model??"")},[x.clear,c,a.setProvider]),A=(0,e.useCallback)(a=>{b.remove(a),p===a&&(q(null),t.current=!1,x.clear())},[b,p,x]),B=(0,e.useCallback)(()=>{b.clear(),q(null),t.current=!1,x.clear()},[b,x.clear]),C=(0,e.useCallback)(a=>{t.current=!0,x.send(a)},[x]),D=(0,e.useCallback)(()=>{t.current=x.messages.length>0||t.current,u(x.messages,{requireSent:!1,preserveTitle:!0})},[x.messages,u]),E=(0,e.useRef)(c);(0,e.useEffect)(()=>{let b=E.current;null!==b&&null!==c&&b!==c&&(a.reset(),q(null),t.current=!1,x.clear()),E.current=c},[c]),(0,e.useEffect)(()=>{if(p||a.providerId)return;let b=(0,n.readLastConfig)(c);b.providerId&&a.setProvider(b.providerId,b.model??"")},[c,p,a.providerId]);let F=p?b.get(p):null,G=!!(a.providerId&&a.model),H=F?.title??"新对话",I=a.mounts.length;return(0,d.jsxs)("div",{className:"flex h-[calc(100vh-8rem)] overflow-hidden rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--surface))]",children:[(0,d.jsx)(i.ChatHistorySidebar,{sessions:b.sessions,activeSessionId:p,onNewSession:z,onSelectSession:y,onDeleteSession:A,onClearAll:B}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,d.jsxs)("header",{className:"flex items-center justify-between border-b border-[hsl(var(--border))] bg-[hsl(var(--surface))] px-4 py-3",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h1",{className:"truncate text-sm font-semibold",children:H}),(0,d.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:a.providerId&&a.model?(0,d.jsxs)(d.Fragment,{children:[a.model," · ",I," 个 KB · 聚合 ",a.aggregateTopK]}):"点击右上角设置挂载模型与知识库"})]}),(0,d.jsx)(g.Button,{type:"button",variant:"ghost",size:"icon",onClick:()=>s(!0),title:"对话配置",children:(0,d.jsx)(f.Settings2,{className:"h-4 w-4"})})]}),(0,d.jsx)("div",{className:"flex-1 overflow-hidden p-4",children:(0,d.jsx)(h.QaChatPanel,{messages:x.messages,isStreaming:x.isStreaming,canSend:G,error:x.error,onSend:C,onStop:x.stop,emptyState:{title:G?"可以开始对话了":"开始对话",description:G?"直接在下方输入你的问题;随时可以通过右上角齿轮调整模型或挂载的知识库":"点击右上角齿轮,选择模型并挂载知识库,即可开始问答",actionLabel:"打开配置",onAction:()=>s(!0)},disabledPlaceholder:"请先点击右上角齿轮配置模型与知识库"})})]}),(0,d.jsx)(j.ChatMountConfig,{open:r,onOpenChange:s,onSave:D})]})}[h]=p.then?(await p)():p,a.s(["default",0,function(){return(0,d.jsx)(k.ChatConfigProvider,{children:(0,d.jsx)(q,{})})}]),c()}catch(a){c(a)}},!1)];
1
+ module.exports=[91957,a=>{"use strict";var b=a.i(34020);let c=(0,a.i(50053).default)("message-square-plus",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]]);var d=a.i(55295),e=a.i(76192),f=a.i(64565);function g({session:a,active:c,onSelect:h,onDelete:i}){let j=a.config.mounts.length;return(0,b.jsxs)("div",{className:(0,f.cn)("group flex items-center gap-1 rounded-md px-2 py-1.5 text-sm transition-colors",c?"bg-[hsl(var(--accent))] text-foreground":"text-foreground/80 hover:bg-[hsl(var(--accent)/0.6)]"),children:[(0,b.jsxs)("button",{type:"button",onClick:h,className:"flex min-w-0 flex-1 flex-col items-start text-left",children:[(0,b.jsx)("span",{className:"w-full truncate font-medium",children:a.title}),(0,b.jsxs)("span",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,b.jsx)("span",{children:function(a){let b=Math.floor((Date.now()-a)/6e4);if(b<1)return"刚刚";if(b<60)return`${b} 分钟前`;let c=Math.floor(b/60);if(c<24)return`${c} 小时前`;let d=Math.floor(c/24);return d<7?`${d} 天前`:new Date(a).toLocaleDateString()}(a.updatedAt)}),j>0?(0,b.jsxs)("span",{children:["· ",j," KB"]}):null]})]}),(0,b.jsx)(e.Button,{type:"button",variant:"ghost",size:"icon",onClick:a=>{a.stopPropagation(),i()},className:"h-6 w-6 opacity-0 group-hover:opacity-100",title:"删除",children:(0,b.jsx)(d.Trash2,{className:"h-3 w-3 text-muted-foreground"})})]})}a.s(["ChatHistorySidebar",0,function({sessions:a,activeSessionId:f,onNewSession:h,onSelectSession:i,onDeleteSession:j,onClearAll:k}){return(0,b.jsxs)("aside",{className:"flex h-full w-64 shrink-0 flex-col border-r border-[hsl(var(--border))] bg-[hsl(var(--surface))]",children:[(0,b.jsx)("div",{className:"border-b border-[hsl(var(--border))] p-3",children:(0,b.jsxs)(e.Button,{type:"button",onClick:h,className:"w-full justify-start gap-2",variant:"outline",children:[(0,b.jsx)(c,{className:"h-4 w-4"}),"新对话"]})}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto",children:0===a.length?(0,b.jsx)("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"暂无历史对话"}):(0,b.jsx)("ul",{className:"space-y-0.5 p-2",children:a.map(a=>(0,b.jsx)("li",{children:(0,b.jsx)(g,{session:a,active:a.id===f,onSelect:()=>i(a.id),onDelete:()=>j(a.id)})},a.id))})}),a.length>0?(0,b.jsx)("div",{className:"border-t border-[hsl(var(--border))] p-2",children:(0,b.jsxs)(e.Button,{type:"button",variant:"ghost",size:"sm",onClick:k,className:"w-full justify-start gap-2 text-muted-foreground hover:text-[hsl(var(--destructive))]",children:[(0,b.jsx)(d.Trash2,{className:"h-3.5 w-3.5"}),"清空全部"]})}):null]})}],91957)},38285,a=>{"use strict";var b=a.i(34020),c=a.i(71938),d=a.i(93078);let e={providerId:"",model:"",systemPrompt:"",temperature:void 0,aggregateTopK:20,perKbTopK:20,retrieval:{searchType:["DENSE_VECTOR","FULL_TEXT"],rerankType:"WEIGHT",weightDense:.7,weightFullText:.3},mounts:[]};function f(a,b){switch(b.type){case"SET_PROVIDER":return{...a,providerId:b.providerId,model:b.model};case"SET_MODEL":return{...a,model:b.model};case"SET_SYSTEM_PROMPT":return{...a,systemPrompt:b.value};case"SET_TEMPERATURE":return{...a,temperature:b.value};case"SET_AGGREGATE_TOP_K":return{...a,aggregateTopK:b.value};case"SET_PER_KB_TOP_K":return{...a,perKbTopK:b.value};case"SET_RETRIEVAL":return{...a,retrieval:b.value};case"ADD_MOUNT":if(a.mounts.some(a=>a.knowledgeBaseName===b.mount.knowledgeBaseName))return a;return{...a,mounts:[...a.mounts,b.mount]};case"UPDATE_MOUNT":return{...a,mounts:a.mounts.map(a=>a.id===b.id?{...a,...b.patch}:a)};case"REMOVE_MOUNT":return{...a,mounts:a.mounts.filter(a=>a.id!==b.id)};case"REORDER_MOUNTS":{let c=new Map(a.mounts.map(a=>[a.id,a])),d=b.ids.map(a=>c.get(a)).filter(a=>!!a);return{...a,mounts:d}}case"HYDRATE":return{...a,...b.state};case"RESET":return e;default:return a}}let g=(0,c.createContext)(null);a.s(["ChatConfigProvider",0,function({children:a}){let[d,h]=(0,c.useReducer)(f,e),i=(0,c.useMemo)(()=>({...d,setProvider:(a,b)=>h({type:"SET_PROVIDER",providerId:a,model:b}),setModel:a=>h({type:"SET_MODEL",model:a}),setSystemPrompt:a=>h({type:"SET_SYSTEM_PROMPT",value:a}),setTemperature:a=>h({type:"SET_TEMPERATURE",value:a}),setAggregateTopK:a=>h({type:"SET_AGGREGATE_TOP_K",value:a}),setPerKbTopK:a=>h({type:"SET_PER_KB_TOP_K",value:a}),setRetrieval:a=>h({type:"SET_RETRIEVAL",value:a}),addMount:a=>h({type:"ADD_MOUNT",mount:a}),updateMount:(a,b)=>h({type:"UPDATE_MOUNT",id:a,patch:b}),removeMount:a=>h({type:"REMOVE_MOUNT",id:a}),reorderMounts:a=>h({type:"REORDER_MOUNTS",ids:a}),hydrate:a=>h({type:"HYDRATE",state:a}),reset:()=>h({type:"RESET"}),toSessionConfig:()=>({providerId:d.providerId||void 0,model:d.model||void 0,systemPrompt:d.systemPrompt||void 0,temperature:d.temperature,aggregateTopK:d.aggregateTopK,perKbTopK:d.perKbTopK,retrieval:d.retrieval,mounts:d.mounts})}),[d]);return(0,b.jsx)(g.Provider,{value:i,children:a})},"DEFAULT_AGGREGATE_TOP_K",0,20,"DEFAULT_PER_KB_TOP_K",0,20,"buildRagFromMounts",0,function(a){if(!a.mounts.length)return;let b=(0,d.assembleRetrievalConfiguration)(a.retrieval,a.perKbTopK);return{knowledgeBases:a.mounts.map(c=>({knowledgeBaseName:c.knowledgeBaseName,...c.subspace?.length?{subspace:c.subspace}:{},...b?{retrievalConfiguration:b}:{},topK:a.perKbTopK})),topK:a.aggregateTopK}},"useChatConfig",0,function(){let a=(0,c.useContext)(g);if(!a)throw Error("useChatConfig must be used within a ChatConfigProvider");return a}])},58489,a=>{"use strict";var b=a.i(34020),c=a.i(71938),d=a.i(53520),e=a.i(88619),f=a.i(14151),g=a.i(64565);let h=e.Root;e.Trigger,e.Close;let i=e.Portal,j=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)(e.Overlay,{ref:d,className:(0,g.cn)("fixed inset-0 z-50 bg-black/60 backdrop-blur-sm duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...c}));j.displayName=e.Overlay.displayName;let k={top:"inset-x-0 top-0 border-b data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top",bottom:"inset-x-0 bottom-0 border-t data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom",left:"inset-y-0 left-0 h-full w-3/4 max-w-sm border-r data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left",right:"inset-y-0 right-0 h-full w-3/4 max-w-md border-l data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right"},l=c.forwardRef(({className:a,children:c,side:d="right",...h},l)=>(0,b.jsxs)(i,{children:[(0,b.jsx)(j,{}),(0,b.jsxs)(e.Content,{ref:l,className:(0,g.cn)("fixed z-50 flex flex-col gap-4 bg-[hsl(var(--background))] p-6 shadow-xl","duration-300 ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out",k[d],a),...h,children:[c,(0,b.jsxs)(e.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[(0,b.jsx)(f.X,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));l.displayName=e.Content.displayName;let m=({className:a,...c})=>(0,b.jsx)("div",{className:(0,g.cn)("flex flex-col space-y-1.5 text-left",a),...c});m.displayName="SheetHeader";let n=({className:a,...c})=>(0,b.jsx)("div",{className:(0,g.cn)("mt-auto flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2",a),...c});n.displayName="SheetFooter";let o=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)(e.Title,{ref:d,className:(0,g.cn)("text-lg font-semibold leading-none tracking-tight",a),...c}));o.displayName=e.Title.displayName;let p=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)(e.Description,{ref:d,className:(0,g.cn)("text-sm text-muted-foreground",a),...c}));p.displayName=e.Description.displayName;var q=a.i(76192),r=a.i(72518),s=a.i(62491),t=a.i(9367),u=a.i(38285),v=a.i(64363),w=a.i(32191),x=a.i(87951),y=a.i(83643),z=a.i(25825),A=a.i(63525);function B({kbs:a,onAdd:d}){let[e,f]=(0,c.useState)(""),g=a.find(a=>a.knowledgeBaseName===e);return(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)(A.Select,{value:e,onValueChange:f,children:[(0,b.jsx)(A.SelectTrigger,{className:"flex-1",children:(0,b.jsx)(A.SelectValue,{placeholder:"选择要挂载的知识库"})}),(0,b.jsx)(A.SelectContent,{children:0===a.length?(0,b.jsx)(A.SelectItem,{value:"__empty",disabled:!0,children:"无可挂载的知识库"}):a.map(a=>(0,b.jsx)(A.SelectItem,{value:a.knowledgeBaseName,children:a.knowledgeBaseName},a.knowledgeBaseName))})]}),(0,b.jsxs)(q.Button,{type:"button",size:"sm",disabled:!g,onClick:()=>{g&&(d(g),f(""))},children:[(0,b.jsx)(z.Plus,{className:"mr-1 h-3.5 w-3.5"}),"添加"]})]})}var C=a.i(55295);function D({mount:a,subspaceEnabled:d}){let e=(0,u.useChatConfig)(),[f,g]=(0,c.useState)((a.subspace??[]).join(", "));return(0,b.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.3)] px-3 py-2",children:[(0,b.jsx)("span",{className:"flex-1 truncate text-sm font-medium",title:a.knowledgeBaseName,children:a.knowledgeBaseName}),d?(0,b.jsx)(r.Input,{value:f,onChange:a=>g(a.target.value),onBlur:()=>{let b=f.split(",").map(a=>a.trim()).filter(Boolean),c=a.subspace??[];b.length===c.length&&b.every((a,b)=>a===c[b])||e.updateMount(a.id,{subspace:b.length?b:void 0})},onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),a.target.blur())},placeholder:"subspace (逗号分隔)",className:"h-8 w-44 text-xs"}):null,(0,b.jsx)(q.Button,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>e.removeMount(a.id),title:"移除",children:(0,b.jsx)(C.Trash2,{className:"h-3.5 w-3.5 text-muted-foreground"})})]})}var E=a.i(71562),F=a.i(71071),G=a.i(44401),H=a.i(92942),I=a.i(18236),J=a.i(15325);let K=["searchType","rerankType","rrfK","rrfDenseWeight","rrfFullTextWeight","weightDense","weightFullText","modelName","modelProvider"];function L({disabled:a,singleKb:d}){let e=(0,u.useChatConfig)(),f=(0,c.useRef)(null),g=(0,E.useForm)({resolver:(0,F.zodResolver)(J.retrievalSchema),defaultValues:{knowledgeBaseName:d?.knowledgeBaseName??"__unified__",query:"__unified_placeholder__",subspace:[],topK:e.perKbTopK,searchType:e.retrieval.searchType??["DENSE_VECTOR","FULL_TEXT"],rerankType:e.retrieval.rerankType,rrfK:e.retrieval.rrfK,rrfDenseWeight:e.retrieval.rrfDenseWeight,rrfFullTextWeight:e.retrieval.rrfFullTextWeight,weightDense:e.retrieval.weightDense,weightFullText:e.retrieval.weightFullText,modelName:e.retrieval.modelName,modelProvider:e.retrieval.modelProvider}});(0,c.useEffect)(()=>{g.reset({knowledgeBaseName:d?.knowledgeBaseName??"__unified__",query:"__unified_placeholder__",subspace:[],topK:e.perKbTopK,searchType:e.retrieval.searchType??["DENSE_VECTOR","FULL_TEXT"],rerankType:e.retrieval.rerankType,rrfK:e.retrieval.rrfK,rrfDenseWeight:e.retrieval.rrfDenseWeight,rrfFullTextWeight:e.retrieval.rrfFullTextWeight,weightDense:e.retrieval.weightDense,weightFullText:e.retrieval.weightFullText,modelName:e.retrieval.modelName,modelProvider:e.retrieval.modelProvider})},[e.retrieval,e.perKbTopK,d?.knowledgeBaseName]);let h=()=>{let a=g.getValues(),b={};for(let c of K){let d=a[c];void 0===d||Array.isArray(d)&&0===d.length||(b[c]=d)}e.setRetrieval(b),e.setPerKbTopK("number"==typeof a.topK&&a.topK>0?a.topK:u.DEFAULT_PER_KB_TOP_K)},i=g.watch("rerankType");return(0,c.useEffect)(()=>{if("MODEL"!==i)return;let a=!1;g.getValues("modelProvider")||(g.setValue("modelProvider","bailian"),a=!0),g.getValues("modelName")||(g.setValue("modelName","gte-rerank-v2"),a=!0),a&&h()},[i]),(0,b.jsxs)("div",{className:"space-y-3 border-t border-[hsl(var(--border))] pt-4"+(a?" pointer-events-none opacity-50":""),"aria-disabled":a,children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(s.Label,{className:"text-sm font-medium",children:"统一检索参数"}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"应用到所有挂载 KB 的统一查询配置,保证分数可比;每 KB 单独检索后合并重排"})]}),a?(0,b.jsxs)("div",{className:"flex items-start gap-2 rounded-md border border-dashed border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.4)] px-3 py-3 text-xs text-muted-foreground",children:[(0,b.jsx)(G.Info,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,b.jsx)("span",{children:"挂载至少一个知识库后即可配置统一检索参数"})]}):(0,b.jsx)(H.Form,{...g,children:(0,b.jsx)("form",{onSubmit:a=>a.preventDefault(),onBlur:h,className:"space-y-4",children:(0,b.jsx)(I.RetrievalParamsFields,{form:g,knowledgeBase:d,filterRef:f,topKLabel:"每 KB topK",topKHint:"单库检索条数,默认 20"})})})]})}a.s(["ChatMountConfig",0,function({open:a,onOpenChange:e,onSave:f}){let g=(0,u.useChatConfig)(),{data:i}=(0,t.useKnowledgeBases)(),j=i?.items??[],k=j.filter(a=>!g.mounts.some(b=>b.knowledgeBaseName===a.knowledgeBaseName)),[z,A]=(0,c.useState)(String(g.aggregateTopK));(0,c.useEffect)(()=>{A(String(g.aggregateTopK))},[g.aggregateTopK]);let[C,E]=(0,c.useState)(!1),F=(0,c.useRef)(null);return(0,c.useEffect)(()=>()=>{F.current&&clearTimeout(F.current)},[]),(0,b.jsx)(h,{open:a,onOpenChange:e,children:(0,b.jsxs)(l,{side:"right",className:"flex w-full flex-col gap-0 p-0 sm:max-w-[520px]",children:[(0,b.jsxs)(m,{className:"border-b border-[hsl(var(--border))] px-6 py-4",children:[(0,b.jsx)(o,{children:"对话配置"}),(0,b.jsx)(p,{children:"选择模型、编辑 system prompt,挂载多个知识库作为检索来源"})]}),(0,b.jsxs)("div",{className:"flex-1 space-y-5 overflow-y-auto px-6 py-5",children:[(0,b.jsx)(v.LLMModelSelector,{providerId:g.providerId,model:g.model,onProviderChange:(a,b)=>{g.setProvider(a,b??"")},onModelChange:a=>g.setModel(a)}),(0,b.jsx)(w.SystemPromptInput,{value:g.systemPrompt,onChange:a=>g.setSystemPrompt(a),placeholder:"留空使用默认 prompt",label:"System Prompt"}),(0,b.jsx)(x.TemperatureSlider,{value:g.temperature??.7,onChange:a=>g.setTemperature(a),label:"Temperature"}),(0,b.jsxs)("div",{className:"space-y-3 border-t border-[hsl(var(--border))] pt-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(s.Label,{className:"text-sm font-medium",children:"挂载的知识库"}),(0,b.jsxs)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["并行检索,按 score 全局重排,取前 ",g.aggregateTopK," 条"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(s.Label,{className:"text-xs text-muted-foreground",title:"合并所有 KB 的命中后按分数截断的上限",children:"聚合 topK"}),(0,b.jsx)(r.Input,{type:"text",inputMode:"numeric",value:z,onChange:a=>A(a.target.value),onBlur:()=>{let a=parseInt(z,10);Number.isFinite(a)&&a>=1&&a<=200?(g.setAggregateTopK(a),A(String(a))):(g.setAggregateTopK(u.DEFAULT_AGGREGATE_TOP_K),A(String(u.DEFAULT_AGGREGATE_TOP_K)))},className:"h-8 w-20"})]})]}),(0,b.jsx)(B,{kbs:k,onAdd:a=>g.addMount({id:(0,y.newId)("mount"),knowledgeBaseName:a.knowledgeBaseName})}),0===g.mounts.length?(0,b.jsx)("p",{className:"rounded-md border border-dashed border-[hsl(var(--border))] px-3 py-4 text-center text-xs text-muted-foreground",children:"还没有挂载知识库;添加一个以启用 RAG"}):(0,b.jsx)("div",{className:"space-y-2",children:g.mounts.map(a=>{let c=j.find(b=>b.knowledgeBaseName===a.knowledgeBaseName);return(0,b.jsx)(D,{mount:a,subspaceEnabled:c?.subspace===!0},a.id)})})]}),(0,b.jsx)(L,{disabled:0===g.mounts.length,singleKb:1===g.mounts.length?j.find(a=>a.knowledgeBaseName===g.mounts[0].knowledgeBaseName):void 0})]}),(0,b.jsxs)(n,{className:"gap-2 border-t border-[hsl(var(--border))] bg-[hsl(var(--surface))] px-6 py-3 sm:items-center sm:justify-between sm:space-x-0",children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"未保存的修改在发送下一条消息时也会自动持久化"}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(q.Button,{type:"button",variant:"ghost",onClick:()=>e(!1),children:"关闭"}),(0,b.jsx)(q.Button,{type:"button",onClick:()=>{f(),E(!0),F.current&&clearTimeout(F.current),F.current=setTimeout(()=>E(!1),2e3)},disabled:C,children:C?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.Check,{className:"mr-1.5 h-4 w-4"}),"已保存"]}):"保存配置"})]})]})]})})}],58489)},71173,a=>{"use strict";var b=a.i(71938);function c(a){}let d=new Set;function e(a){return d.add(a),()=>{d.delete(a)}}let f=[];function g(){return f}function h(){return[]}a.s(["deriveSessionTitle",0,function(a){let b=a.find(a=>"user"===a.role);if(!b)return"新对话";let c=b.content.replace(/\s+/g," ").trim();return c?c.length>24?`${c.slice(0,24)}…`:c:"新对话"},"useChatHistory",0,function(){let a=(0,b.useSyncExternalStore)(e,g,h),d=(0,b.useCallback)(a=>{let b,d,e;b=[],d=a.messages.length>200?{...a,messages:a.messages.slice(-200)}:a,(e=b.findIndex(a=>a.id===d.id))>=0?b[e]=d:b.push(d),c(b.sort((a,b)=>b.updatedAt-a.updatedAt).slice(0,50))},[]),f=(0,b.useCallback)(a=>{c([].filter(b=>b.id!==a))},[]);return{sessions:a,upsert:d,remove:f,clear:(0,b.useCallback)(()=>{c([])},[]),get:(0,b.useCallback)(a=>[].find(b=>b.id===a)??null,[])}}])},57634,a=>{"use strict";a.s(["readLastConfig",0,function(a){return{}},"writeLastConfig",0,function(a,b){}])},45533,a=>a.a(async(b,c)=>{try{var d=a.i(34020),e=a.i(71938),f=a.i(10581),g=a.i(76192),h=a.i(57900),i=a.i(91957),j=a.i(58489),k=a.i(38285),l=a.i(71173),m=a.i(9135),n=a.i(57634),o=a.i(83643),p=b([h]);function q(){let a=(0,k.useChatConfig)(),b=(0,l.useChatHistory)(),c=function(){let[a,b]=(0,e.useState)(null);return(0,e.useEffect)(()=>{let a=!1,c=0,d=async()=>{try{let c=await fetch("/api/v1/auth/status",{cache:"no-store"});if(!c.ok)return;let d=await c.json();a||b(d?.data?.activeInstance??null)}catch{}};d(),c=Date.now();let e=()=>{let a=Date.now();a-c<5e3||(c=a,d())};return window.addEventListener("focus",e),()=>{a=!0,window.removeEventListener("focus",e)}},[]),a}(),[p,q]=(0,e.useState)(null),[r,s]=(0,e.useState)(!1),t=(0,e.useRef)(!1),u=(0,e.useCallback)((d,e)=>{if(e.requireSent&&!t.current)return;let f=p??(0,o.newId)("session");p||q(f);let g=e.preserveTitle?b.get(f):null,h=g?.title??(0,l.deriveSessionTitle)(d),i={id:f,title:h,updatedAt:Date.now(),activeInstance:c,config:a.toSessionConfig(),messages:d};b.upsert(i),a.providerId&&(0,n.writeLastConfig)(c,{providerId:a.providerId,model:a.model})},[p,a,b,c]),v=(0,e.useCallback)(a=>{u(a,{requireSent:!0,preserveTitle:!1})},[u]),w=(0,e.useMemo)(()=>(0,k.buildRagFromMounts)(a),[a]),x=(0,m.useQaChat)({providerId:a.providerId,model:a.model,systemPrompt:a.systemPrompt,temperature:a.temperature,rag:w,onPersist:v}),y=(0,e.useCallback)(c=>{let d=b.get(c);d&&(q(c),t.current=d.messages.length>0,x.setMessages(d.messages),a.hydrate({providerId:d.config.providerId??"",model:d.config.model??"",systemPrompt:d.config.systemPrompt??"",temperature:d.config.temperature,aggregateTopK:d.config.aggregateTopK??k.DEFAULT_AGGREGATE_TOP_K,perKbTopK:d.config.perKbTopK??k.DEFAULT_PER_KB_TOP_K,retrieval:d.config.retrieval??{},mounts:d.config.mounts??[]}))},[b,x.setMessages,a.hydrate]),z=(0,e.useCallback)(()=>{q(null),t.current=!1,x.clear();let b=(0,n.readLastConfig)(c);a.setProvider(b.providerId??"",b.model??"")},[x.clear,c,a.setProvider]),A=(0,e.useCallback)(a=>{b.remove(a),p===a&&(q(null),t.current=!1,x.clear())},[b,p,x]),B=(0,e.useCallback)(()=>{b.clear(),q(null),t.current=!1,x.clear()},[b,x.clear]),C=(0,e.useCallback)(a=>{t.current=!0,x.send(a)},[x]),D=(0,e.useCallback)(()=>{t.current=x.messages.length>0||t.current,u(x.messages,{requireSent:!1,preserveTitle:!0})},[x.messages,u]),E=(0,e.useRef)(c);(0,e.useEffect)(()=>{let b=E.current;null!==b&&null!==c&&b!==c&&(a.reset(),q(null),t.current=!1,x.clear()),E.current=c},[c]),(0,e.useEffect)(()=>{if(p||a.providerId)return;let b=(0,n.readLastConfig)(c);b.providerId&&a.setProvider(b.providerId,b.model??"")},[c,p,a.providerId]);let F=p?b.get(p):null,G=!!(a.providerId&&a.model),H=F?.title??"新对话",I=a.mounts.length;return(0,d.jsxs)("div",{className:"flex h-[calc(100vh-8rem)] overflow-hidden rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--surface))]",children:[(0,d.jsx)(i.ChatHistorySidebar,{sessions:b.sessions,activeSessionId:p,onNewSession:z,onSelectSession:y,onDeleteSession:A,onClearAll:B}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,d.jsxs)("header",{className:"flex items-center justify-between border-b border-[hsl(var(--border))] bg-[hsl(var(--surface))] px-4 py-3",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h1",{className:"truncate text-sm font-semibold",children:H}),(0,d.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:a.providerId&&a.model?(0,d.jsxs)(d.Fragment,{children:[a.model," · ",I," 个知识库 · 聚合 ",a.aggregateTopK]}):"点击右上角设置挂载模型与知识库"})]}),(0,d.jsx)(g.Button,{type:"button",variant:"ghost",size:"icon",onClick:()=>s(!0),title:"对话配置",children:(0,d.jsx)(f.Settings2,{className:"h-4 w-4"})})]}),(0,d.jsx)("div",{className:"flex-1 overflow-hidden p-4",children:(0,d.jsx)(h.QaChatPanel,{messages:x.messages,isStreaming:x.isStreaming,canSend:G,error:x.error,onSend:C,onStop:x.stop,emptyState:{title:G?"可以开始对话了":"开始对话",description:G?"直接在下方输入你的问题;随时可以通过右上角齿轮调整模型或挂载的知识库":"点击右上角齿轮,选择模型并挂载知识库,即可开始问答",actionLabel:"打开配置",onAction:()=>s(!0)},disabledPlaceholder:"请先点击右上角齿轮配置模型与知识库"})})]}),(0,d.jsx)(j.ChatMountConfig,{open:r,onOpenChange:s,onSave:D})]})}[h]=p.then?(await p)():p,a.s(["default",0,function(){return(0,d.jsx)(k.ChatConfigProvider,{children:(0,d.jsx)(q,{})})}]),c()}catch(a){c(a)}},!1)];
2
2
 
3
3
  //# sourceMappingURL=dashboard_src_065m1.j._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[17177,a=>{"use strict";var b=a.i(34020),c=a.i(71938),d=a.i(80470),e=a.i(4395),f=a.i(33280),g=a.i(21989),h=a.i(76192),i=a.i(55295),j=a.i(65271),k=a.i(53520),l=a.i(1927),m=a.i(14151),n=a.i(63265),o=a.i(72518),p=a.i(70550),q=a.i(59653),r=a.i(68189),s=a.i(84694),t=a.i(43504),u=a.i(82223),v=a.i(78731),w=a.i(59231),x=a.i(35452),y=a.i(62310),z=a.i(98392),A=a.i(58036),B=a.i(97058),C=a.i(83370),D=a.i(16164),E=a.i(73673),F="Popover",[G,H]=(0,s.createContextScope)(F,[x.createPopperScope]),I=(0,x.createPopperScope)(),[J,K]=G(F),L=a=>{let{__scopePopover:d,children:e,open:f,defaultOpen:g,onOpenChange:h,modal:i=!1}=a,j=I(d),k=c.useRef(null),[l,m]=c.useState(!1),[n,o]=(0,C.useControllableState)({prop:f,defaultProp:g??!1,onChange:h,caller:F});return(0,b.jsx)(x.Root,{...j,children:(0,b.jsx)(J,{scope:d,contentId:(0,w.useId)(),triggerRef:k,open:n,onOpenChange:o,onOpenToggle:c.useCallback(()=>o(a=>!a),[o]),hasCustomAnchor:l,onCustomAnchorAdd:c.useCallback(()=>m(!0),[]),onCustomAnchorRemove:c.useCallback(()=>m(!1),[]),modal:i,children:e})})};L.displayName=F;var M="PopoverAnchor";c.forwardRef((a,d)=>{let{__scopePopover:e,...f}=a,g=K(M,e),h=I(e),{onCustomAnchorAdd:i,onCustomAnchorRemove:j}=g;return c.useEffect(()=>(i(),()=>j()),[i,j]),(0,b.jsx)(x.Anchor,{...h,...f,ref:d})}).displayName=M;var N="PopoverTrigger",O=c.forwardRef((a,c)=>{let{__scopePopover:d,...e}=a,f=K(N,d),g=I(d),h=(0,r.useComposedRefs)(c,f.triggerRef),i=(0,b.jsx)(A.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":f.open,"aria-controls":f.contentId,"data-state":$(f.open),...e,ref:h,onClick:(0,q.composeEventHandlers)(a.onClick,f.onOpenToggle)});return f.hasCustomAnchor?i:(0,b.jsx)(x.Anchor,{asChild:!0,...g,children:i})});O.displayName=N;var P="PopoverPortal",[Q,R]=G(P,{forceMount:void 0}),S=a=>{let{__scopePopover:c,forceMount:d,children:e,container:f}=a,g=K(P,c);return(0,b.jsx)(Q,{scope:c,forceMount:d,children:(0,b.jsx)(z.Presence,{present:d||g.open,children:(0,b.jsx)(y.Portal,{asChild:!0,container:f,children:e})})})};S.displayName=P;var T="PopoverContent",U=c.forwardRef((a,c)=>{let d=R(T,a.__scopePopover),{forceMount:e=d.forceMount,...f}=a,g=K(T,a.__scopePopover);return(0,b.jsx)(z.Presence,{present:e||g.open,children:g.modal?(0,b.jsx)(W,{...f,ref:c}):(0,b.jsx)(X,{...f,ref:c})})});U.displayName=T;var V=(0,B.createSlot)("PopoverContent.RemoveScroll"),W=c.forwardRef((a,d)=>{let e=K(T,a.__scopePopover),f=c.useRef(null),g=(0,r.useComposedRefs)(d,f),h=c.useRef(!1);return c.useEffect(()=>{let a=f.current;if(a)return(0,D.hideOthers)(a)},[]),(0,b.jsx)(E.RemoveScroll,{as:V,allowPinchZoom:!0,children:(0,b.jsx)(Y,{...a,ref:g,trapFocus:e.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,q.composeEventHandlers)(a.onCloseAutoFocus,a=>{a.preventDefault(),h.current||e.triggerRef.current?.focus()}),onPointerDownOutside:(0,q.composeEventHandlers)(a.onPointerDownOutside,a=>{let b=a.detail.originalEvent,c=0===b.button&&!0===b.ctrlKey;h.current=2===b.button||c},{checkForDefaultPrevented:!1}),onFocusOutside:(0,q.composeEventHandlers)(a.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),X=c.forwardRef((a,d)=>{let e=K(T,a.__scopePopover),f=c.useRef(!1),g=c.useRef(!1);return(0,b.jsx)(Y,{...a,ref:d,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:b=>{a.onCloseAutoFocus?.(b),b.defaultPrevented||(f.current||e.triggerRef.current?.focus(),b.preventDefault()),f.current=!1,g.current=!1},onInteractOutside:b=>{a.onInteractOutside?.(b),b.defaultPrevented||(f.current=!0,"pointerdown"===b.detail.originalEvent.type&&(g.current=!0));let c=b.target;e.triggerRef.current?.contains(c)&&b.preventDefault(),"focusin"===b.detail.originalEvent.type&&g.current&&b.preventDefault()}})}),Y=c.forwardRef((a,c)=>{let{__scopePopover:d,trapFocus:e,onOpenAutoFocus:f,onCloseAutoFocus:g,disableOutsidePointerEvents:h,onEscapeKeyDown:i,onPointerDownOutside:j,onFocusOutside:k,onInteractOutside:l,...m}=a,n=K(T,d),o=I(d);return(0,u.useFocusGuards)(),(0,b.jsx)(v.FocusScope,{asChild:!0,loop:!0,trapped:e,onMountAutoFocus:f,onUnmountAutoFocus:g,children:(0,b.jsx)(t.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:h,onInteractOutside:l,onEscapeKeyDown:i,onPointerDownOutside:j,onFocusOutside:k,onDismiss:()=>n.onOpenChange(!1),children:(0,b.jsx)(x.Content,{"data-state":$(n.open),role:"dialog",id:n.contentId,...o,...m,ref:c,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Z="PopoverClose";function $(a){return a?"open":"closed"}c.forwardRef((a,c)=>{let{__scopePopover:d,...e}=a,f=K(Z,d);return(0,b.jsx)(A.Primitive.button,{type:"button",...e,ref:c,onClick:(0,q.composeEventHandlers)(a.onClick,()=>f.onOpenChange(!1))})}).displayName=Z,c.forwardRef((a,c)=>{let{__scopePopover:d,...e}=a,f=I(d);return(0,b.jsx)(x.Arrow,{...f,...e,ref:c})}).displayName="PopoverArrow";var _=a.i(64565);let aa=c.forwardRef(({className:a,align:c="center",sideOffset:d=4,...e},f)=>(0,b.jsx)(S,{children:(0,b.jsx)(U,{ref:f,align:c,sideOffset:d,className:(0,_.cn)("z-50 w-72 rounded-md border bg-[hsl(var(--popover))] p-4 text-[hsl(var(--popover-foreground))] shadow-md outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...e})}));aa.displayName=U.displayName;var ab=a.i(78388);function ac(){let a=(0,ab.useSubspaceOptional)(),[d,e]=(0,c.useState)(!1),[f,g]=(0,c.useState)("");if(!a)return null;let{subspace:i,history:j,setSubspace:q,clearSubspace:r}=a,s=null!==i,t=()=>{let a=f.trim();if(!a||a===i){g(""),e(!1);return}q(a),g(""),e(!1)};return(0,b.jsxs)(L,{open:d,onOpenChange:e,children:[(0,b.jsx)(O,{asChild:!0,children:(0,b.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/15 transition-colors cursor-pointer",children:[s?`子空间: ${i}`:"选择子空间…",(0,b.jsx)(l.ChevronDown,{className:"h-3 w-3 opacity-70"})]})}),(0,b.jsxs)(aa,{align:"start",sideOffset:6,className:"w-72 p-3 space-y-3",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:s?"切换到其他子空间":"进入子空间"}),(0,b.jsxs)("div",{className:"flex gap-1.5",children:[(0,b.jsx)(o.Input,{autoFocus:!0,placeholder:"输入子空间名称...",value:f,onChange:a=>g(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),t())},className:"h-8 text-sm"}),(0,b.jsx)(h.Button,{size:"sm",className:"h-8 px-2.5",onClick:t,disabled:!f.trim()||f.trim()===i,children:"进入"})]})]}),j.length>0&&(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:"最近使用"}),(0,b.jsx)("div",{className:"flex flex-col gap-0.5 max-h-[180px] overflow-y-auto",children:j.map(a=>{let c=s&&a===i;return(0,b.jsxs)("button",{type:"button",onClick:()=>{a!==i&&q(a),e(!1)},className:"flex items-center justify-between rounded-sm px-2 py-1.5 text-sm text-left hover:bg-[hsl(var(--accent))] transition-colors",children:[(0,b.jsx)("span",{className:"truncate",children:a}),c&&(0,b.jsx)(k.Check,{className:"h-3.5 w-3.5 text-primary shrink-0 ml-2"})]},a)})})]}),s&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(p.Separator,{}),(0,b.jsxs)("button",{type:"button",onClick:()=>{r(),e(!1),n.toast.success("已清除子空间作用域,请重新选择")},className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-destructive transition-colors w-full",children:[(0,b.jsx)(m.X,{className:"h-3 w-3"}),"清除选择(返回子空间选择页)"]})]})]})]})}function ad({knowledgeBase:a,onDelete:c}){let{knowledgeBaseName:d,description:e,tags:f,subspace:k,createdAt:l,updatedAt:m}=a;return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("h1",{className:"font-display text-[32px] font-semibold leading-tight tracking-tight text-foreground",children:d}),e&&(0,b.jsx)("p",{className:"text-sm text-muted-foreground max-w-2xl",children:e})]}),(0,b.jsxs)(h.Button,{variant:"ghost",size:"sm",className:"text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--destructive))] hover:bg-[hsl(var(--destructive))]/10",onClick:c,children:[(0,b.jsx)(i.Trash2,{className:"mr-2 h-4 w-4"}),"删除"]})]}),f&&f.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:f.map(a=>(0,b.jsx)(g.Badge,{variant:"secondary",className:"rounded-pill border-0 bg-[hsl(var(--primary-50))] text-primary text-xs font-normal",children:a},a))}),(0,b.jsxs)("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[k&&(0,b.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,b.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"已开启子空间隔离"]}),(0,b.jsx)(ac,{}),(0,b.jsxs)("span",{children:["创建于 ",(0,b.jsx)(j.RelativeTime,{timestamp:l})]}),(0,b.jsxs)("span",{children:["更新于 ",(0,b.jsx)(j.RelativeTime,{timestamp:m})]})]})]})}var ae=a.i(12583);let af=[{label:"文档",segment:"documents"},{label:"检索测试",segment:"retrieval"},{label:"问答测试",segment:"qa"},{label:"设置",segment:"settings"}];function ag({knowledgeBaseName:a}){let c=(0,d.usePathname)(),e=(0,d.useSearchParams)(),f=`/knowledge-base/${encodeURIComponent(a)}`,g=(0,ab.useSubspaceOptional)()?.subspace??null,h=new URLSearchParams(e.toString());g?h.set("subspace",g):h.delete("subspace");let i=h.toString(),j=i?`?${i}`:"";return(0,b.jsx)("nav",{className:"flex gap-1 border-b border-[hsl(var(--border))]",children:af.map(a=>{let d=`${f}/${a.segment}`,e=`${d}${j}`,g=c.startsWith(d);return(0,b.jsxs)(ae.default,{href:e,className:(0,_.cn)("relative px-5 py-2.5 text-sm font-medium transition-colors duration-150 rounded-t-md",g?"text-[hsl(var(--primary))] bg-[hsl(var(--primary))]/5":"text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] hover:bg-[hsl(var(--accent))]"),children:[a.label,(0,b.jsx)("span",{className:(0,_.cn)("absolute inset-x-0 bottom-0 h-0.5 rounded-full bg-[hsl(var(--primary))] transition-all duration-200 ease-out",g?"opacity-100 scale-x-100":"opacity-0 scale-x-50")})]},a.segment)})})}var ah=a.i(13773);a.s(["default",0,function({children:a}){let g=decodeURIComponent((0,d.useParams)().name),{data:h,isLoading:i}=(0,f.useKnowledgeBase)(g),[j,k]=(0,c.useState)(!1);return i?(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)(e.Skeleton,{className:"h-10 w-64"}),(0,b.jsx)(e.Skeleton,{className:"h-4 w-96"}),(0,b.jsx)(e.Skeleton,{className:"h-4 w-48"})]}),(0,b.jsx)(e.Skeleton,{className:"h-10 w-full"}),(0,b.jsx)(e.Skeleton,{className:"h-64 w-full"})]}):h?(0,b.jsxs)("div",{children:[(0,b.jsx)(c.Suspense,{fallback:(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)(e.Skeleton,{className:"h-10 w-64"}),(0,b.jsx)(e.Skeleton,{className:"h-4 w-96"}),(0,b.jsx)(e.Skeleton,{className:"h-4 w-48"})]}),(0,b.jsx)(e.Skeleton,{className:"h-10 w-full"}),(0,b.jsx)(e.Skeleton,{className:"h-[400px] w-full"})]}),children:(0,b.jsx)(ab.SubspaceProvider,{knowledgeBaseName:g,children:(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsx)(ad,{knowledgeBase:h,onDelete:()=>k(!0)}),(0,b.jsx)(ag,{knowledgeBaseName:g}),(0,b.jsx)("div",{children:a})]})})}),(0,b.jsx)(ah.KBDeleteDialog,{knowledgeBaseName:g,open:j,onOpenChange:k})]}):(0,b.jsx)("div",{className:"flex items-center justify-center py-20 text-muted-foreground",children:"知识库不存在或已被删除"})}],17177)}];
1
+ module.exports=[17177,a=>{"use strict";var b=a.i(34020),c=a.i(71938),d=a.i(80470),e=a.i(4395),f=a.i(33280),g=a.i(21989),h=a.i(76192),i=a.i(55295),j=a.i(65271),k=a.i(53520),l=a.i(1927),m=a.i(14151),n=a.i(63265),o=a.i(72518),p=a.i(70550),q=a.i(59653),r=a.i(68189),s=a.i(84694),t=a.i(43504),u=a.i(82223),v=a.i(78731),w=a.i(59231),x=a.i(35452),y=a.i(62310),z=a.i(98392),A=a.i(58036),B=a.i(97058),C=a.i(83370),D=a.i(16164),E=a.i(73673),F="Popover",[G,H]=(0,s.createContextScope)(F,[x.createPopperScope]),I=(0,x.createPopperScope)(),[J,K]=G(F),L=a=>{let{__scopePopover:d,children:e,open:f,defaultOpen:g,onOpenChange:h,modal:i=!1}=a,j=I(d),k=c.useRef(null),[l,m]=c.useState(!1),[n,o]=(0,C.useControllableState)({prop:f,defaultProp:g??!1,onChange:h,caller:F});return(0,b.jsx)(x.Root,{...j,children:(0,b.jsx)(J,{scope:d,contentId:(0,w.useId)(),triggerRef:k,open:n,onOpenChange:o,onOpenToggle:c.useCallback(()=>o(a=>!a),[o]),hasCustomAnchor:l,onCustomAnchorAdd:c.useCallback(()=>m(!0),[]),onCustomAnchorRemove:c.useCallback(()=>m(!1),[]),modal:i,children:e})})};L.displayName=F;var M="PopoverAnchor";c.forwardRef((a,d)=>{let{__scopePopover:e,...f}=a,g=K(M,e),h=I(e),{onCustomAnchorAdd:i,onCustomAnchorRemove:j}=g;return c.useEffect(()=>(i(),()=>j()),[i,j]),(0,b.jsx)(x.Anchor,{...h,...f,ref:d})}).displayName=M;var N="PopoverTrigger",O=c.forwardRef((a,c)=>{let{__scopePopover:d,...e}=a,f=K(N,d),g=I(d),h=(0,r.useComposedRefs)(c,f.triggerRef),i=(0,b.jsx)(A.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":f.open,"aria-controls":f.contentId,"data-state":$(f.open),...e,ref:h,onClick:(0,q.composeEventHandlers)(a.onClick,f.onOpenToggle)});return f.hasCustomAnchor?i:(0,b.jsx)(x.Anchor,{asChild:!0,...g,children:i})});O.displayName=N;var P="PopoverPortal",[Q,R]=G(P,{forceMount:void 0}),S=a=>{let{__scopePopover:c,forceMount:d,children:e,container:f}=a,g=K(P,c);return(0,b.jsx)(Q,{scope:c,forceMount:d,children:(0,b.jsx)(z.Presence,{present:d||g.open,children:(0,b.jsx)(y.Portal,{asChild:!0,container:f,children:e})})})};S.displayName=P;var T="PopoverContent",U=c.forwardRef((a,c)=>{let d=R(T,a.__scopePopover),{forceMount:e=d.forceMount,...f}=a,g=K(T,a.__scopePopover);return(0,b.jsx)(z.Presence,{present:e||g.open,children:g.modal?(0,b.jsx)(W,{...f,ref:c}):(0,b.jsx)(X,{...f,ref:c})})});U.displayName=T;var V=(0,B.createSlot)("PopoverContent.RemoveScroll"),W=c.forwardRef((a,d)=>{let e=K(T,a.__scopePopover),f=c.useRef(null),g=(0,r.useComposedRefs)(d,f),h=c.useRef(!1);return c.useEffect(()=>{let a=f.current;if(a)return(0,D.hideOthers)(a)},[]),(0,b.jsx)(E.RemoveScroll,{as:V,allowPinchZoom:!0,children:(0,b.jsx)(Y,{...a,ref:g,trapFocus:e.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,q.composeEventHandlers)(a.onCloseAutoFocus,a=>{a.preventDefault(),h.current||e.triggerRef.current?.focus()}),onPointerDownOutside:(0,q.composeEventHandlers)(a.onPointerDownOutside,a=>{let b=a.detail.originalEvent,c=0===b.button&&!0===b.ctrlKey;h.current=2===b.button||c},{checkForDefaultPrevented:!1}),onFocusOutside:(0,q.composeEventHandlers)(a.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),X=c.forwardRef((a,d)=>{let e=K(T,a.__scopePopover),f=c.useRef(!1),g=c.useRef(!1);return(0,b.jsx)(Y,{...a,ref:d,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:b=>{a.onCloseAutoFocus?.(b),b.defaultPrevented||(f.current||e.triggerRef.current?.focus(),b.preventDefault()),f.current=!1,g.current=!1},onInteractOutside:b=>{a.onInteractOutside?.(b),b.defaultPrevented||(f.current=!0,"pointerdown"===b.detail.originalEvent.type&&(g.current=!0));let c=b.target;e.triggerRef.current?.contains(c)&&b.preventDefault(),"focusin"===b.detail.originalEvent.type&&g.current&&b.preventDefault()}})}),Y=c.forwardRef((a,c)=>{let{__scopePopover:d,trapFocus:e,onOpenAutoFocus:f,onCloseAutoFocus:g,disableOutsidePointerEvents:h,onEscapeKeyDown:i,onPointerDownOutside:j,onFocusOutside:k,onInteractOutside:l,...m}=a,n=K(T,d),o=I(d);return(0,u.useFocusGuards)(),(0,b.jsx)(v.FocusScope,{asChild:!0,loop:!0,trapped:e,onMountAutoFocus:f,onUnmountAutoFocus:g,children:(0,b.jsx)(t.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:h,onInteractOutside:l,onEscapeKeyDown:i,onPointerDownOutside:j,onFocusOutside:k,onDismiss:()=>n.onOpenChange(!1),children:(0,b.jsx)(x.Content,{"data-state":$(n.open),role:"dialog",id:n.contentId,...o,...m,ref:c,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Z="PopoverClose";function $(a){return a?"open":"closed"}c.forwardRef((a,c)=>{let{__scopePopover:d,...e}=a,f=K(Z,d);return(0,b.jsx)(A.Primitive.button,{type:"button",...e,ref:c,onClick:(0,q.composeEventHandlers)(a.onClick,()=>f.onOpenChange(!1))})}).displayName=Z,c.forwardRef((a,c)=>{let{__scopePopover:d,...e}=a,f=I(d);return(0,b.jsx)(x.Arrow,{...f,...e,ref:c})}).displayName="PopoverArrow";var _=a.i(64565);let aa=c.forwardRef(({className:a,align:c="center",sideOffset:d=4,...e},f)=>(0,b.jsx)(S,{children:(0,b.jsx)(U,{ref:f,align:c,sideOffset:d,className:(0,_.cn)("z-50 w-72 rounded-md border bg-[hsl(var(--popover))] p-4 text-[hsl(var(--popover-foreground))] shadow-md outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...e})}));aa.displayName=U.displayName;var ab=a.i(78388);function ac(){let a=(0,ab.useSubspaceOptional)(),[d,e]=(0,c.useState)(!1),[f,g]=(0,c.useState)("");if(!a)return null;let{subspace:i,history:j,setSubspace:q,clearSubspace:r}=a,s=null!==i,t=()=>{let a=f.trim();if(!a||a===i){g(""),e(!1);return}q(a),g(""),e(!1)};return(0,b.jsxs)(L,{open:d,onOpenChange:e,children:[(0,b.jsx)(O,{asChild:!0,children:(0,b.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/15 transition-colors cursor-pointer",children:[s?`子空间: ${i}`:"选择子空间…",(0,b.jsx)(l.ChevronDown,{className:"h-3 w-3 opacity-70"})]})}),(0,b.jsxs)(aa,{align:"start",sideOffset:6,className:"w-72 p-3 space-y-3",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:s?"切换到其他子空间":"进入子空间"}),(0,b.jsxs)("div",{className:"flex gap-1.5",children:[(0,b.jsx)(o.Input,{autoFocus:!0,placeholder:"输入子空间名称...",value:f,onChange:a=>g(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),t())},className:"h-8 text-sm"}),(0,b.jsx)(h.Button,{size:"sm",className:"h-8 px-2.5",onClick:t,disabled:!f.trim()||f.trim()===i,children:"进入"})]})]}),j.length>0&&(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:"最近使用"}),(0,b.jsx)("div",{className:"flex flex-col gap-0.5 max-h-[180px] overflow-y-auto",children:j.map(a=>{let c=s&&a===i;return(0,b.jsxs)("button",{type:"button",onClick:()=>{a!==i&&q(a),e(!1)},className:"flex items-center justify-between rounded-sm px-2 py-1.5 text-sm text-left hover:bg-[hsl(var(--accent))] transition-colors",children:[(0,b.jsx)("span",{className:"truncate",children:a}),c&&(0,b.jsx)(k.Check,{className:"h-3.5 w-3.5 text-primary shrink-0 ml-2"})]},a)})})]}),s&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(p.Separator,{}),(0,b.jsxs)("button",{type:"button",onClick:()=>{r(),e(!1),n.toast.success("已清除子空间作用域,请重新选择")},className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-destructive transition-colors w-full",children:[(0,b.jsx)(m.X,{className:"h-3 w-3"}),"清除选择(返回子空间选择页)"]})]})]})]})}function ad({knowledgeBase:a,onDelete:c}){let{knowledgeBaseName:d,description:e,tags:f,subspace:k,createdAt:l,updatedAt:m}=a;return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("h1",{className:"font-display text-[32px] font-semibold leading-tight tracking-tight text-foreground",children:d}),e&&(0,b.jsx)("p",{className:"text-sm text-muted-foreground max-w-2xl",children:e})]}),(0,b.jsxs)(h.Button,{variant:"ghost",size:"sm",className:"text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--destructive))] hover:bg-[hsl(var(--destructive))]/10",onClick:c,children:[(0,b.jsx)(i.Trash2,{className:"mr-2 h-4 w-4"}),"删除"]})]}),f&&f.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:f.map(a=>(0,b.jsx)(g.Badge,{variant:"secondary",className:"rounded-pill border-0 bg-[hsl(var(--primary-50))] text-primary text-xs font-normal",children:a},a))}),(0,b.jsxs)("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[k&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,b.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"已开启子空间隔离"]}),(0,b.jsx)(ac,{})]}),(0,b.jsxs)("span",{children:["创建于 ",(0,b.jsx)(j.RelativeTime,{timestamp:l})]}),(0,b.jsxs)("span",{children:["更新于 ",(0,b.jsx)(j.RelativeTime,{timestamp:m})]})]})]})}var ae=a.i(12583);let af=[{label:"文档",segment:"documents"},{label:"检索测试",segment:"retrieval"},{label:"问答测试",segment:"qa"},{label:"设置",segment:"settings"}];function ag({knowledgeBaseName:a}){let c=(0,d.usePathname)(),e=(0,d.useSearchParams)(),f=`/knowledge-base/${encodeURIComponent(a)}`,g=(0,ab.useSubspaceOptional)()?.subspace??null,h=new URLSearchParams(e.toString());g?h.set("subspace",g):h.delete("subspace");let i=h.toString(),j=i?`?${i}`:"";return(0,b.jsx)("nav",{className:"flex gap-1 border-b border-[hsl(var(--border))]",children:af.map(a=>{let d=`${f}/${a.segment}`,e=`${d}${j}`,g=c.startsWith(d);return(0,b.jsxs)(ae.default,{href:e,className:(0,_.cn)("relative px-5 py-2.5 text-sm font-medium transition-colors duration-150 rounded-t-md",g?"text-[hsl(var(--primary))] bg-[hsl(var(--primary))]/5":"text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] hover:bg-[hsl(var(--accent))]"),children:[a.label,(0,b.jsx)("span",{className:(0,_.cn)("absolute inset-x-0 bottom-0 h-0.5 rounded-full bg-[hsl(var(--primary))] transition-all duration-200 ease-out",g?"opacity-100 scale-x-100":"opacity-0 scale-x-50")})]},a.segment)})})}var ah=a.i(13773);a.s(["default",0,function({children:a}){let g=decodeURIComponent((0,d.useParams)().name),{data:h,isLoading:i}=(0,f.useKnowledgeBase)(g),[j,k]=(0,c.useState)(!1);return i?(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)(e.Skeleton,{className:"h-10 w-64"}),(0,b.jsx)(e.Skeleton,{className:"h-4 w-96"}),(0,b.jsx)(e.Skeleton,{className:"h-4 w-48"})]}),(0,b.jsx)(e.Skeleton,{className:"h-10 w-full"}),(0,b.jsx)(e.Skeleton,{className:"h-64 w-full"})]}):h?(0,b.jsxs)("div",{children:[(0,b.jsx)(c.Suspense,{fallback:(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)(e.Skeleton,{className:"h-10 w-64"}),(0,b.jsx)(e.Skeleton,{className:"h-4 w-96"}),(0,b.jsx)(e.Skeleton,{className:"h-4 w-48"})]}),(0,b.jsx)(e.Skeleton,{className:"h-10 w-full"}),(0,b.jsx)(e.Skeleton,{className:"h-[400px] w-full"})]}),children:(0,b.jsx)(ab.SubspaceProvider,{knowledgeBaseName:g,children:(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsx)(ad,{knowledgeBase:h,onDelete:()=>k(!0)}),(0,b.jsx)(ag,{knowledgeBaseName:g}),(0,b.jsx)("div",{children:a})]})})}),(0,b.jsx)(ah.KBDeleteDialog,{knowledgeBaseName:g,open:j,onOpenChange:k})]}):(0,b.jsx)("div",{className:"flex items-center justify-center py-20 text-muted-foreground",children:"知识库不存在或已被删除"})}],17177)}];
2
2
 
3
3
  //# sourceMappingURL=dashboard_src_app_%28dashboard%29_knowledge-base_%5Bname%5D_layout-client_tsx_05momc5._.js.map
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
7
7
  "static/chunks/03~yq9q893hmn.js"
8
8
  ],
9
9
  "lowPriorityFiles": [
10
- "static/MjeKF5uLzEvAqWkR9O6Ts/_buildManifest.js",
11
- "static/MjeKF5uLzEvAqWkR9O6Ts/_ssgManifest.js",
12
- "static/MjeKF5uLzEvAqWkR9O6Ts/_clientMiddlewareManifest.js"
10
+ "static/wWmSSYUu4w4mIF1R_7UoM/_buildManifest.js",
11
+ "static/wWmSSYUu4w4mIF1R_7UoM/_ssgManifest.js",
12
+ "static/wWmSSYUu4w4mIF1R_7UoM/_clientMiddlewareManifest.js"
13
13
  ],
14
14
  "rootMainFiles": [
15
15
  "static/chunks/0hmuddei8wdpj.js",