@tablestore/tablestore-agent-cli 0.1.7 → 0.1.9

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 (621) hide show
  1. package/dist/commands/dashboard.d.ts.map +1 -1
  2. package/dist/commands/dashboard.js +173 -4
  3. package/dist/commands/dashboard.js.map +1 -1
  4. package/dist/dashboard-runtime/dashboard/.next/BUILD_ID +1 -1
  5. package/dist/dashboard-runtime/dashboard/.next/app-path-routes-manifest.json +2 -0
  6. package/dist/dashboard-runtime/dashboard/.next/build-manifest.json +5 -5
  7. package/dist/dashboard-runtime/dashboard/.next/prerender-manifest.json +3 -3
  8. package/dist/dashboard-runtime/dashboard/.next/required-server-files.json +2 -0
  9. package/dist/dashboard-runtime/dashboard/.next/routes-manifest.json +12 -0
  10. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page/build-manifest.json +2 -2
  11. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page.js +2 -2
  12. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  13. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  14. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/documents/page/build-manifest.json +2 -2
  15. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/documents/page.js +2 -2
  16. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/documents/page.js.nft.json +1 -1
  17. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/documents/page_client-reference-manifest.js +1 -1
  18. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/page/build-manifest.json +2 -2
  19. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/page.js +2 -2
  20. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/page.js.nft.json +1 -1
  21. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/page_client-reference-manifest.js +1 -1
  22. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/qa/page/build-manifest.json +2 -2
  23. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/qa/page.js +2 -2
  24. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/qa/page.js.nft.json +1 -1
  25. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/qa/page_client-reference-manifest.js +1 -1
  26. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/retrieval/page/build-manifest.json +2 -2
  27. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/retrieval/page.js +2 -2
  28. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/retrieval/page.js.nft.json +1 -1
  29. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/retrieval/page_client-reference-manifest.js +1 -1
  30. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/settings/page/build-manifest.json +2 -2
  31. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/settings/page.js +2 -2
  32. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/settings/page.js.nft.json +1 -1
  33. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/settings/page_client-reference-manifest.js +1 -1
  34. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/create/page/build-manifest.json +2 -2
  35. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/create/page.js +2 -2
  36. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/create/page.js.nft.json +1 -1
  37. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/create/page_client-reference-manifest.js +1 -1
  38. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/page/build-manifest.json +2 -2
  39. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/page.js +2 -2
  40. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/page.js.nft.json +1 -1
  41. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/page_client-reference-manifest.js +1 -1
  42. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/[id]/page/build-manifest.json +2 -2
  43. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/[id]/page.js +2 -2
  44. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/[id]/page.js.nft.json +1 -1
  45. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/[id]/page_client-reference-manifest.js +1 -1
  46. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/new/page/build-manifest.json +2 -2
  47. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/new/page.js +2 -2
  48. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/new/page.js.nft.json +1 -1
  49. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/new/page_client-reference-manifest.js +1 -1
  50. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/page/build-manifest.json +2 -2
  51. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/page.js +2 -2
  52. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/page.js.nft.json +1 -1
  53. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/page_client-reference-manifest.js +1 -1
  54. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/messages/page/build-manifest.json +2 -2
  55. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/messages/page.js +2 -2
  56. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/messages/page.js.nft.json +1 -1
  57. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/messages/page_client-reference-manifest.js +1 -1
  58. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/page/build-manifest.json +2 -2
  59. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/page.js +2 -2
  60. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/page.js.nft.json +1 -1
  61. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/page_client-reference-manifest.js +1 -1
  62. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/requests/page/build-manifest.json +2 -2
  63. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/requests/page.js +2 -2
  64. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/requests/page.js.nft.json +1 -1
  65. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/requests/page_client-reference-manifest.js +1 -1
  66. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/search/page/build-manifest.json +2 -2
  67. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/search/page.js +2 -2
  68. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/search/page.js.nft.json +1 -1
  69. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/search/page_client-reference-manifest.js +1 -1
  70. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/settings/page/build-manifest.json +2 -2
  71. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/settings/page.js +2 -2
  72. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/settings/page.js.nft.json +1 -1
  73. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/settings/page_client-reference-manifest.js +1 -1
  74. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page/build-manifest.json +2 -2
  75. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page.js +2 -2
  76. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page.js.nft.json +1 -1
  77. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page_client-reference-manifest.js +1 -1
  78. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/create/page/build-manifest.json +2 -2
  79. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/create/page.js +2 -2
  80. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/create/page.js.nft.json +1 -1
  81. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/create/page_client-reference-manifest.js +1 -1
  82. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/page/build-manifest.json +2 -2
  83. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/page.js +2 -2
  84. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/page.js.nft.json +1 -1
  85. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/page_client-reference-manifest.js +1 -1
  86. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/projects/page/build-manifest.json +2 -2
  87. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/projects/page.js +2 -2
  88. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
  89. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
  90. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error/page/build-manifest.json +2 -2
  91. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.html +1 -1
  92. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.rsc +1 -1
  93. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  94. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  95. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  96. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  97. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  98. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found/page/build-manifest.json +2 -2
  99. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found/page.js +1 -1
  100. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
  101. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  102. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.html +1 -1
  103. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.rsc +20 -19
  104. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +20 -19
  105. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_head.segment.rsc +3 -3
  106. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_index.segment.rsc +10 -9
  107. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
  108. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  109. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  110. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/status/route.js +2 -2
  111. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/status/route.js.nft.json +1 -1
  112. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/token/route.js +2 -2
  113. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/token/route.js.nft.json +1 -1
  114. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/route.js +2 -2
  115. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/route.js.nft.json +1 -1
  116. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/token/route.js +2 -2
  117. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/token/route.js.nft.json +1 -1
  118. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/use/route.js +2 -2
  119. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/use/route.js.nft.json +1 -1
  120. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/route.js +2 -2
  121. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/route.js.nft.json +1 -1
  122. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/chunks/route.js +2 -2
  123. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/chunks/route.js.nft.json +1 -1
  124. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.js +2 -2
  125. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.js.nft.json +1 -1
  126. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.js +2 -2
  127. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.js.nft.json +1 -1
  128. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/route.js +2 -2
  129. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/route.js.nft.json +1 -1
  130. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/upload/route.js +2 -2
  131. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/upload/route.js.nft.json +1 -1
  132. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/retrieve/route.js +2 -2
  133. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/retrieve/route.js.nft.json +1 -1
  134. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/route.js +2 -2
  135. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/route.js.nft.json +1 -1
  136. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/route.js +2 -2
  137. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/route.js.nft.json +1 -1
  138. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/chat/route.js +2 -2
  139. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/chat/route.js.nft.json +1 -1
  140. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/models/route.js +2 -2
  141. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/models/route.js.nft.json +1 -1
  142. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/route.js +2 -2
  143. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/route.js.nft.json +1 -1
  144. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/test/route.js +2 -2
  145. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/test/route.js.nft.json +1 -1
  146. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/route.js +2 -2
  147. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/route.js.nft.json +1 -1
  148. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route/app-paths-manifest.json +3 -0
  149. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route/build-manifest.json +9 -0
  150. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route/server-reference-manifest.json +4 -0
  151. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js +6 -0
  152. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js.map +5 -0
  153. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js.nft.json +1 -0
  154. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route_client-reference-manifest.js +3 -0
  155. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js +2 -2
  156. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js.nft.json +1 -1
  157. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/requests/route.js +2 -2
  158. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/requests/route.js.nft.json +1 -1
  159. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/route.js +2 -2
  160. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/route.js.nft.json +1 -1
  161. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/search/route.js +2 -2
  162. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/search/route.js.nft.json +1 -1
  163. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/[memoryId]/route.js +2 -2
  164. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/[memoryId]/route.js.nft.json +1 -1
  165. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/route.js +2 -2
  166. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/route.js.nft.json +1 -1
  167. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/route.js +2 -2
  168. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/route.js.nft.json +1 -1
  169. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route/app-paths-manifest.json +3 -0
  170. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route/build-manifest.json +9 -0
  171. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route/server-reference-manifest.json +4 -0
  172. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js +6 -0
  173. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js.map +5 -0
  174. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js.nft.json +1 -0
  175. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route_client-reference-manifest.js +3 -0
  176. package/dist/dashboard-runtime/dashboard/.next/server/app/index.html +1 -1
  177. package/dist/dashboard-runtime/dashboard/.next/server/app/index.rsc +19 -18
  178. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  179. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_full.segment.rsc +19 -18
  180. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_head.segment.rsc +3 -3
  181. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_index.segment.rsc +10 -9
  182. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  183. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding/page/build-manifest.json +2 -2
  184. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding/page.js +1 -1
  185. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding/page.js.nft.json +1 -1
  186. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  187. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.html +1 -1
  188. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.rsc +23 -22
  189. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_full.segment.rsc +23 -22
  190. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_head.segment.rsc +3 -3
  191. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_index.segment.rsc +10 -9
  192. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
  193. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
  194. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/onboarding.segment.rsc +4 -4
  195. package/dist/dashboard-runtime/dashboard/.next/server/app/page/build-manifest.json +2 -2
  196. package/dist/dashboard-runtime/dashboard/.next/server/app/page.js +1 -1
  197. package/dist/dashboard-runtime/dashboard/.next/server/app/page.js.nft.json +1 -1
  198. package/dist/dashboard-runtime/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
  199. package/dist/dashboard-runtime/dashboard/.next/server/app-paths-manifest.json +2 -0
  200. package/dist/dashboard-runtime/dashboard/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0n~ec7s.js +6 -6
  201. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.gylau._.js +3 -0
  202. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.hvkwy._.js +3 -0
  203. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.qtdn4._.js +3 -0
  204. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__02p1x3t._.js +3 -0
  205. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04dd04u._.js +3 -0
  206. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04ujbw-._.js +3 -0
  207. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04zbudf._.js +3 -0
  208. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__05eryp~._.js +3 -0
  209. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__06fva9g._.js +3 -0
  210. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0byveuc._.js +3 -0
  211. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0cee_lo._.js +3 -0
  212. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0cyd2qb._.js +3 -0
  213. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ecs-9r._.js +3 -0
  214. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ejcow5._.js +3 -0
  215. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0fglxiw._.js +3 -0
  216. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0i1_p1s._.js +3 -0
  217. package/dist/dashboard-runtime/dashboard/.next/server/chunks/{[root-of-the-server]__0f990w9._.js → [root-of-the-server]__0lvi0g-._.js} +14 -12
  218. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0no9qm0._.js +3 -0
  219. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0q9fgt6._.js +3 -0
  220. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0rx9hon._.js +3 -0
  221. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0w_ig2a._.js +3 -0
  222. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0zmo~nd._.js +3 -0
  223. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__11s_zx6._.js +3 -0
  224. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__11wq90l._.js +3 -0
  225. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__126srko._.js +3 -0
  226. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12e1t6o._.js +3 -0
  227. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12ylr4n._.js +3 -0
  228. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__13g_f9w._.js +3 -0
  229. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__13~-fxp._.js +3 -0
  230. package/dist/dashboard-runtime/dashboard/.next/server/chunks/dashboard__next-internal_server_app_api_v1_logs_client_route_actions_0tnhyc7.js +3 -0
  231. package/dist/dashboard-runtime/dashboard/.next/server/chunks/dashboard__next-internal_server_app_api_v1_runtime_context_route_actions_0d9d6g_.js +3 -0
  232. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0b1r_app_(dashboard)_knowledge-base_[name]_documents_documents-client_tsx_0g2uxmt._.js +2 -2
  233. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0e95_src_app_(dashboard)_knowledge-base_[name]_settings_settings-client_tsx_13312zk._.js +1 -1
  234. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0p91_next_dist_shared_lib_deployment-id_0uu7yq4.js +3 -0
  235. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[externals]__0tqph4u._.js +3 -0
  236. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0_r24-c._.js +3 -0
  237. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0aqzu8w._.js +3 -0
  238. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0jb9ccl._.js +3 -0
  239. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__10rkv6z._.js +3 -0
  240. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__11yei-s._.js +3 -0
  241. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{_0hm68~i._.js → _0303qx7._.js} +2 -2
  242. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_03cxnik._.js +3 -0
  243. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_04f2u4t._.js +3 -0
  244. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06l.12l._.js +1 -1
  245. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_09eom0_._.js +3 -0
  246. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_09yzbcp._.js +1 -1
  247. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0dqi8bq._.js +3 -0
  248. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0e9y.xc._.js +1 -1
  249. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0f9u8i2._.js +3 -0
  250. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0i8py_a._.js +3 -0
  251. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0jlt.cx._.js +3 -0
  252. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0n5uozy._.js +3 -0
  253. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0o32d.y._.js +3 -0
  254. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0o665bf._.js +1 -1
  255. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0suxzcc._.js +3 -0
  256. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0tej2s.._.js +1 -1
  257. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0tyxwr3._.js +3 -0
  258. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0u9md36._.js +1 -1
  259. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{_0c7wecm._.js → _0v4jb2q._.js} +2 -2
  260. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0zn.ayc._.js +3 -0
  261. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_13l7w34._.js +1 -1
  262. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_065m1.j._.js +1 -1
  263. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0suis9l._.js +3 -3
  264. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0y49vhd._.js +1 -1
  265. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_10dsqx~._.js +1 -1
  266. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_knowledge-base_[name]_layout-client_tsx_05momc5._.js +1 -1
  267. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_knowledge-base_create_page_tsx_0916~g-._.js +1 -1
  268. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_settings_page_tsx_0y26.xu._.js +1 -1
  269. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_units_page_tsx_0.6xnei._.js +1 -1
  270. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_error_tsx_01x7ppm._.js +1 -1
  271. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_providers_runtime-context-provider_tsx_0wmj66z._.js +3 -0
  272. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_00arje5._.js +3 -0
  273. package/dist/dashboard-runtime/dashboard/.next/server/functions-config-manifest.json +28 -1
  274. package/dist/dashboard-runtime/dashboard/.next/server/middleware-build-manifest.js +5 -5
  275. package/dist/dashboard-runtime/dashboard/.next/server/pages/404.html +1 -1
  276. package/dist/dashboard-runtime/dashboard/.next/server/pages/500.html +1 -1
  277. package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.js +1 -1
  278. package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.json +1 -1
  279. package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0osozgwmk692r.js → 0-etecbti5x22.js} +1 -1
  280. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-xqk6wfme5fu.js +1 -0
  281. package/dist/dashboard-runtime/dashboard/.next/static/chunks/031-scv-8sah9.js +1 -0
  282. package/dist/dashboard-runtime/dashboard/.next/static/chunks/034uozc1ki09_.js +1 -0
  283. package/dist/dashboard-runtime/dashboard/.next/static/chunks/05ow1qzcjz3pz.js +1 -0
  284. package/dist/dashboard-runtime/dashboard/.next/static/chunks/087x52iesmpfe.js +1 -0
  285. package/dist/dashboard-runtime/dashboard/.next/static/chunks/08an3157he_ad.js +1 -0
  286. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0aak.679si-3m.js +1 -0
  287. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ai8f~-9ig.gz.js +138 -0
  288. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0c5tcbhzpwen7.js +1 -0
  289. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0dheju1t18upn.js +1 -0
  290. package/dist/dashboard-runtime/dashboard/.next/static/chunks/{07q4gw5gnh3.d.js → 0fagnytrt.3oe.js} +2 -2
  291. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ffr1_o~ss8r8.js +1 -0
  292. package/dist/dashboard-runtime/dashboard/.next/static/chunks/{123yjh849.vzp.js → 0gjljpk5qgdmz.js} +1 -1
  293. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0h38qfpz-dmiu.js +1 -0
  294. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0l1fmyhvp-k49.js +1 -0
  295. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0pcp6pjjz7o49.js +1 -0
  296. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0pdq-gljpy7gd.js +1 -0
  297. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0q6-s11w9.sgo.js +1 -0
  298. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0rnm58mg0whfk.js +1 -0
  299. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0rxp5ykl1_lyb.js +4 -0
  300. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0th7u6qvdy3x2.js +1 -0
  301. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v_~favugkv_a.js +1 -0
  302. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x3ysmon_~xsv.js +1 -0
  303. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x7sjde5wit~i.js +1 -0
  304. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0yzz97.2e6if6.js +138 -0
  305. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~alekqkiwwaq.js +1 -0
  306. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~e2n9bhosscr.js +1 -0
  307. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~i4llb9-utpp.css +1 -0
  308. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~kfzxrhgbkaz.js +1 -0
  309. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~n-y9cstar6b.js +5 -0
  310. package/dist/dashboard-runtime/dashboard/.next/static/chunks/14z_j1qzycpe1.js +1 -0
  311. package/dist/dashboard-runtime/dashboard/.next/static/chunks/154aheeo3m6bg.js +1 -0
  312. package/dist/dashboard-runtime/dashboard/.next/static/chunks/17k4h5zgalxqj.js +1 -0
  313. package/dist/dashboard-runtime/dashboard/.next/static/chunks/{turbopack-0jhqjurvu9x3y.js → turbopack-0ybyy.9-.w~ub.js} +1 -1
  314. package/dist/dashboard-runtime/dashboard/components.json +20 -0
  315. package/dist/dashboard-runtime/dashboard/instrumentation-node.ts +14 -0
  316. package/dist/dashboard-runtime/dashboard/instrumentation.ts +18 -0
  317. package/dist/dashboard-runtime/dashboard/next.config.ts +56 -0
  318. package/dist/dashboard-runtime/dashboard/postcss.config.mjs +8 -0
  319. package/dist/dashboard-runtime/dashboard/server.js +1 -1
  320. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/chat/error.tsx +44 -0
  321. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/chat/loading.tsx +29 -0
  322. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/chat/page.tsx +372 -0
  323. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/error.tsx +69 -0
  324. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/documents/documents-client.tsx +22 -11
  325. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/qa/page.tsx +28 -2
  326. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/layout.tsx +75 -0
  327. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/loading.tsx +26 -0
  328. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/layout.tsx +62 -0
  329. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/messages/_helpers.ts +109 -0
  330. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/messages/page.tsx +309 -0
  331. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/page.tsx +26 -0
  332. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/requests/_helpers.ts +234 -0
  333. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/requests/page.tsx +323 -0
  334. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/search/page.tsx +49 -0
  335. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/settings/page.tsx +71 -0
  336. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/units/page.tsx +277 -0
  337. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/create/page.tsx +30 -0
  338. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/error.tsx +44 -0
  339. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/loading.tsx +26 -0
  340. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/page.tsx +27 -0
  341. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/projects/error.tsx +43 -0
  342. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/projects/loading.tsx +25 -0
  343. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/projects/page.tsx +174 -0
  344. package/dist/dashboard-runtime/dashboard/src/app/api/v1/auth/status/route.ts +53 -0
  345. package/dist/dashboard-runtime/dashboard/src/app/api/v1/auth/token/route.ts +113 -0
  346. package/dist/dashboard-runtime/dashboard/src/app/api/v1/instances/[name]/route.ts +196 -0
  347. package/dist/dashboard-runtime/dashboard/src/app/api/v1/instances/[name]/token/route.ts +80 -0
  348. package/dist/dashboard-runtime/dashboard/src/app/api/v1/instances/[name]/use/route.ts +91 -0
  349. package/dist/dashboard-runtime/dashboard/src/app/api/v1/instances/route.ts +274 -0
  350. package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/chunks/route.ts +3 -0
  351. package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.ts +3 -0
  352. package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.ts +3 -0
  353. package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/documents/route.ts +3 -0
  354. package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/documents/upload/route.ts +3 -0
  355. package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/retrieve/route.ts +3 -0
  356. package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/route.ts +3 -0
  357. package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/route.ts +3 -0
  358. package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/route.ts +455 -0
  359. package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/providers/[id]/models/route.ts +46 -0
  360. package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/providers/[id]/route.ts +83 -0
  361. package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/providers/[id]/test/route.ts +40 -0
  362. package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/providers/route.ts +70 -0
  363. package/dist/dashboard-runtime/dashboard/src/app/api/v1/logs/client/route.ts +70 -0
  364. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/_scope.ts +84 -0
  365. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/messages/route.ts +64 -0
  366. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/requests/route.ts +65 -0
  367. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/route.ts +78 -0
  368. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/search/route.ts +49 -0
  369. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/units/[memoryId]/route.ts +126 -0
  370. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/units/route.ts +85 -0
  371. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/route.ts +60 -0
  372. package/dist/dashboard-runtime/dashboard/src/app/api/v1/runtime/context/route.ts +26 -0
  373. package/dist/dashboard-runtime/dashboard/src/app/error.tsx +84 -0
  374. package/dist/dashboard-runtime/dashboard/src/app/globals.css +262 -0
  375. package/dist/dashboard-runtime/dashboard/src/app/layout.tsx +38 -0
  376. package/dist/dashboard-runtime/dashboard/src/app/onboarding/error.tsx +54 -0
  377. package/dist/dashboard-runtime/dashboard/src/app/onboarding/layout.tsx +18 -0
  378. package/dist/dashboard-runtime/dashboard/src/app/onboarding/page.tsx +62 -0
  379. package/dist/dashboard-runtime/dashboard/src/app/page.tsx +10 -0
  380. package/dist/dashboard-runtime/dashboard/src/components/documents/doc-chunks-dialog.tsx +13 -4
  381. package/dist/dashboard-runtime/dashboard/src/components/documents/doc-upload-dialog.tsx +436 -94
  382. package/dist/dashboard-runtime/dashboard/src/components/instance/connect-instance-form.tsx +10 -2
  383. package/dist/dashboard-runtime/dashboard/src/components/instance/edit-instance-dialog.tsx +6 -2
  384. package/dist/dashboard-runtime/dashboard/src/components/instance/project-card.tsx +195 -0
  385. package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-card.tsx +8 -5
  386. package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-header.tsx +18 -10
  387. package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-list.tsx +6 -1
  388. package/dist/dashboard-runtime/dashboard/src/components/layout/sidebar.tsx +90 -0
  389. package/dist/dashboard-runtime/dashboard/src/components/logging/client-error-reporter.tsx +59 -0
  390. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-header.tsx +8 -12
  391. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-store-list.tsx +6 -1
  392. package/dist/dashboard-runtime/dashboard/src/components/qa/markdown.tsx +77 -0
  393. package/dist/dashboard-runtime/dashboard/src/components/qa/qa-chat-panel.tsx +45 -4
  394. package/dist/dashboard-runtime/dashboard/src/components/qa/qa-message.tsx +636 -36
  395. package/dist/dashboard-runtime/dashboard/src/components/shared/confirm-dialog.tsx +8 -1
  396. package/dist/dashboard-runtime/dashboard/src/components/shared/error-state.tsx +54 -0
  397. package/dist/dashboard-runtime/dashboard/src/components/shared/refresh-button.tsx +102 -86
  398. package/dist/dashboard-runtime/dashboard/src/components/ui/badge.tsx +36 -0
  399. package/dist/dashboard-runtime/dashboard/src/components/ui/button.tsx +57 -0
  400. package/dist/dashboard-runtime/dashboard/src/components/ui/card.tsx +97 -0
  401. package/dist/dashboard-runtime/dashboard/src/components/ui/checkbox.tsx +28 -0
  402. package/dist/dashboard-runtime/dashboard/src/components/ui/collapsible.tsx +11 -0
  403. package/dist/dashboard-runtime/dashboard/src/components/ui/command.tsx +153 -0
  404. package/dist/dashboard-runtime/dashboard/src/components/ui/dialog.tsx +127 -0
  405. package/dist/dashboard-runtime/dashboard/src/components/ui/form.tsx +178 -0
  406. package/dist/dashboard-runtime/dashboard/src/components/ui/input.tsx +22 -0
  407. package/dist/dashboard-runtime/dashboard/src/components/ui/label.tsx +24 -0
  408. package/dist/dashboard-runtime/dashboard/src/components/ui/popover.tsx +34 -0
  409. package/dist/dashboard-runtime/dashboard/src/components/ui/select.tsx +162 -0
  410. package/dist/dashboard-runtime/dashboard/src/components/ui/separator.tsx +31 -0
  411. package/dist/dashboard-runtime/dashboard/src/components/ui/sheet.tsx +129 -0
  412. package/dist/dashboard-runtime/dashboard/src/components/ui/skeleton.tsx +49 -0
  413. package/dist/dashboard-runtime/dashboard/src/components/ui/slider.tsx +28 -0
  414. package/dist/dashboard-runtime/dashboard/src/components/ui/sonner.tsx +29 -0
  415. package/dist/dashboard-runtime/dashboard/src/components/ui/switch.tsx +66 -0
  416. package/dist/dashboard-runtime/dashboard/src/components/ui/table.tsx +120 -0
  417. package/dist/dashboard-runtime/dashboard/src/components/ui/tabs.tsx +69 -0
  418. package/dist/dashboard-runtime/dashboard/src/components/ui/textarea.tsx +22 -0
  419. package/dist/dashboard-runtime/dashboard/src/components/ui/tooltip.tsx +30 -0
  420. package/dist/dashboard-runtime/dashboard/src/config/navigation.ts +39 -0
  421. package/dist/dashboard-runtime/dashboard/src/hooks/use-active-instance.ts +20 -0
  422. package/dist/dashboard-runtime/dashboard/src/hooks/use-add-memory.ts +3 -4
  423. package/dist/dashboard-runtime/dashboard/src/hooks/use-chat-history.ts +212 -99
  424. package/dist/dashboard-runtime/dashboard/src/hooks/use-create-kb.ts +2 -1
  425. package/dist/dashboard-runtime/dashboard/src/hooks/use-create-llm-provider.ts +2 -3
  426. package/dist/dashboard-runtime/dashboard/src/hooks/use-create-memory-store.ts +2 -1
  427. package/dist/dashboard-runtime/dashboard/src/hooks/use-delete-documents.ts +10 -5
  428. package/dist/dashboard-runtime/dashboard/src/hooks/use-delete-kb.ts +2 -1
  429. package/dist/dashboard-runtime/dashboard/src/hooks/use-delete-llm-provider.ts +2 -3
  430. package/dist/dashboard-runtime/dashboard/src/hooks/use-delete-memory-store.ts +2 -1
  431. package/dist/dashboard-runtime/dashboard/src/hooks/use-delete-memory-unit.ts +3 -3
  432. package/dist/dashboard-runtime/dashboard/src/hooks/use-documents.ts +7 -5
  433. package/dist/dashboard-runtime/dashboard/src/hooks/use-instances.ts +38 -19
  434. package/dist/dashboard-runtime/dashboard/src/hooks/use-knowledge-base.ts +5 -2
  435. package/dist/dashboard-runtime/dashboard/src/hooks/use-knowledge-bases.ts +5 -1
  436. package/dist/dashboard-runtime/dashboard/src/hooks/use-llm-provider-models.ts +5 -2
  437. package/dist/dashboard-runtime/dashboard/src/hooks/use-llm-provider.ts +5 -2
  438. package/dist/dashboard-runtime/dashboard/src/hooks/use-llm-providers.ts +5 -1
  439. package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-messages.ts +12 -6
  440. package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-requests.ts +12 -2
  441. package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-store.ts +5 -2
  442. package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-stores.ts +5 -1
  443. package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-unit.ts +16 -2
  444. package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-units.ts +11 -2
  445. package/dist/dashboard-runtime/dashboard/src/hooks/use-qa-chat.ts +263 -58
  446. package/dist/dashboard-runtime/dashboard/src/hooks/use-update-kb.ts +3 -5
  447. package/dist/dashboard-runtime/dashboard/src/hooks/use-update-llm-provider.ts +2 -4
  448. package/dist/dashboard-runtime/dashboard/src/hooks/use-update-memory-store.ts +3 -5
  449. package/dist/dashboard-runtime/dashboard/src/hooks/use-update-memory-unit.ts +3 -2
  450. package/dist/dashboard-runtime/dashboard/src/hooks/use-upload-documents.ts +26 -7
  451. package/dist/dashboard-runtime/dashboard/src/lib/chat-message-ops.ts +76 -0
  452. package/dist/dashboard-runtime/dashboard/src/lib/constants.ts +22 -0
  453. package/dist/dashboard-runtime/dashboard/src/lib/dev-flags.ts +24 -0
  454. package/dist/dashboard-runtime/dashboard/src/lib/fonts.ts +9 -0
  455. package/dist/dashboard-runtime/dashboard/src/lib/memory.ts +69 -0
  456. package/dist/dashboard-runtime/dashboard/src/lib/normalize-oss-endpoint.ts +28 -0
  457. package/dist/dashboard-runtime/dashboard/src/lib/query-keys.ts +147 -0
  458. package/dist/dashboard-runtime/dashboard/src/lib/server/api-helpers.ts +193 -9
  459. package/dist/dashboard-runtime/dashboard/src/lib/server/chat-project-context.ts +17 -0
  460. package/dist/dashboard-runtime/dashboard/src/lib/server/runtime-context.ts +108 -0
  461. package/dist/dashboard-runtime/dashboard/src/lib/server/sdk-client.ts +250 -22
  462. package/dist/dashboard-runtime/dashboard/src/lib/utils.ts +15 -0
  463. package/dist/dashboard-runtime/dashboard/src/providers/query-provider.tsx +4 -1
  464. package/dist/dashboard-runtime/dashboard/src/providers/runtime-context-provider.tsx +237 -0
  465. package/dist/dashboard-runtime/dashboard/src/schemas/common.ts +8 -0
  466. package/dist/dashboard-runtime/dashboard/src/schemas/document.ts +28 -0
  467. package/dist/dashboard-runtime/dashboard/src/schemas/instance.ts +107 -0
  468. package/dist/dashboard-runtime/dashboard/src/schemas/llm-chat.ts +1 -0
  469. package/dist/dashboard-runtime/dashboard/src/schemas/retrieval.ts +28 -0
  470. package/dist/dashboard-runtime/dashboard/src/services/api-client.ts +138 -33
  471. package/dist/dashboard-runtime/dashboard/src/services/auth.ts +18 -0
  472. package/dist/dashboard-runtime/dashboard/src/services/chunks.ts +49 -0
  473. package/dist/dashboard-runtime/dashboard/src/services/documents.ts +208 -0
  474. package/dist/dashboard-runtime/dashboard/src/services/instances.ts +71 -0
  475. package/dist/dashboard-runtime/dashboard/src/services/memory.ts +158 -0
  476. package/dist/dashboard-runtime/dashboard/src/services/retrieval.ts +16 -0
  477. package/dist/dashboard-runtime/dashboard/src/services/runtime-context.ts +8 -0
  478. package/dist/dashboard-runtime/dashboard/src/types/api.ts +18 -0
  479. package/dist/dashboard-runtime/dashboard/src/types/instance.ts +68 -0
  480. package/dist/dashboard-runtime/dashboard/src/types/llm-chat.ts +21 -0
  481. package/dist/dashboard-runtime/dashboard/src/types/memory.ts +106 -0
  482. package/dist/dashboard-runtime/dashboard/src/types/retrieval.ts +43 -0
  483. package/dist/dashboard-runtime/dashboard/src/types/runtime-context.ts +12 -0
  484. package/dist/dashboard-runtime/dashboard/tailwind.config.ts +92 -0
  485. package/dist/dashboard-runtime/dashboard/tsconfig.json +43 -0
  486. package/dist/dashboard-runtime/dashboard/vitest.config.mjs +12 -0
  487. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts +1 -0
  488. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts.map +1 -1
  489. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js +64 -20
  490. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js.map +1 -1
  491. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +1 -0
  492. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts.map +1 -1
  493. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js +62 -18
  494. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js.map +1 -1
  495. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
  496. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/config.d.ts +1 -0
  497. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/config.d.ts.map +1 -1
  498. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/config.js +19 -0
  499. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/config.js.map +1 -1
  500. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/constants.d.ts.map +1 -1
  501. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/constants.js +4 -2
  502. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/constants.js.map +1 -1
  503. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/index.d.ts +1 -0
  504. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/index.d.ts.map +1 -1
  505. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/index.js +1 -0
  506. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/index.js.map +1 -1
  507. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/logging.d.ts +78 -0
  508. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/logging.d.ts.map +1 -0
  509. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/logging.js +398 -0
  510. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/logging.js.map +1 -0
  511. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/tsconfig.tsbuildinfo +1 -1
  512. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts +1 -0
  513. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts.map +1 -1
  514. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js +64 -20
  515. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js.map +1 -1
  516. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +1 -0
  517. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts.map +1 -1
  518. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js +62 -18
  519. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js.map +1 -1
  520. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
  521. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/config.d.ts +1 -0
  522. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/config.d.ts.map +1 -1
  523. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/config.js +19 -0
  524. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/config.js.map +1 -1
  525. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/constants.d.ts.map +1 -1
  526. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/constants.js +4 -2
  527. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/constants.js.map +1 -1
  528. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/index.d.ts +1 -0
  529. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/index.d.ts.map +1 -1
  530. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/index.js +1 -0
  531. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/index.js.map +1 -1
  532. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/logging.d.ts +78 -0
  533. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/logging.d.ts.map +1 -0
  534. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/logging.js +398 -0
  535. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/logging.js.map +1 -0
  536. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/tsconfig.tsbuildinfo +1 -1
  537. package/package.json +1 -1
  538. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__03742bf._.js +0 -3
  539. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__037l_3-._.js +0 -3
  540. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__05pd96o._.js +0 -3
  541. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__07jfil8._.js +0 -38
  542. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__089jtfp._.js +0 -3
  543. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__08w-nm2._.js +0 -3
  544. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0_o02fk._.js +0 -3
  545. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0b50n21._.js +0 -3
  546. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0bfezi5._.js +0 -3
  547. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0btp1y7._.js +0 -3
  548. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0fqdh7c._.js +0 -3
  549. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0g9--xh._.js +0 -3
  550. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0gqr7to._.js +0 -3
  551. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0h71~~8._.js +0 -3
  552. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0l1bgu.._.js +0 -3
  553. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0lcurm3._.js +0 -3
  554. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0n3pam7._.js +0 -3
  555. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0nkghp7._.js +0 -3
  556. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0r4amj5._.js +0 -3
  557. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0td5dey._.js +0 -3
  558. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0tsud8x._.js +0 -3
  559. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0wl_vik._.js +0 -3
  560. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0x7~7nk._.js +0 -3
  561. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0xvok7r._.js +0 -3
  562. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0~tse9o._.js +0 -3
  563. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12lk-nv._.js +0 -3
  564. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12sqoa8._.js +0 -3
  565. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0e.4_sonner_dist_index_mjs_0u2em8w._.js +0 -3
  566. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/12df_@tanstack_react-query_build_modern_0em_ajy._.js +0 -3
  567. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[externals]__0wijiwt._.js +0 -3
  568. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0i0y9.r._.js +0 -3
  569. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0nwf4e.._.js +0 -3
  570. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0r_6wpx._.js +0 -3
  571. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0y8rrcu._.js +0 -3
  572. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0-dlo4s._.js +0 -3
  573. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_00f15bk._.js +0 -3
  574. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_02e0c00._.js +0 -3
  575. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0476v7r._.js +0 -3
  576. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ct0n55._.js +0 -3
  577. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0doczxg._.js +0 -3
  578. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0fg6iap._.js +0 -3
  579. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0mzxmfh._.js +0 -3
  580. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0naqa6h._.js +0 -3
  581. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ti~om_._.js +0 -3
  582. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0~s~e-0._.js +0 -3
  583. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_11fig8y._.js +0 -3
  584. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_00o55he._.js +0 -3
  585. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0qzg4vh._.js +0 -3
  586. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-mr2-dyb-szq.js +0 -1
  587. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0003a8l0skc88.js +0 -1
  588. package/dist/dashboard-runtime/dashboard/.next/static/chunks/00m4164p4ip7m.js +0 -1
  589. package/dist/dashboard-runtime/dashboard/.next/static/chunks/02b1c4t1dy1ri.js +0 -1
  590. package/dist/dashboard-runtime/dashboard/.next/static/chunks/055_bo6_3nt-s.js +0 -1
  591. package/dist/dashboard-runtime/dashboard/.next/static/chunks/06v~rjrrn4ugo.js +0 -1
  592. package/dist/dashboard-runtime/dashboard/.next/static/chunks/07l4dodn5t6l4.js +0 -4
  593. package/dist/dashboard-runtime/dashboard/.next/static/chunks/07v08gtfpo2yk.js +0 -1
  594. package/dist/dashboard-runtime/dashboard/.next/static/chunks/07xvdo2w9s4~p.js +0 -1
  595. package/dist/dashboard-runtime/dashboard/.next/static/chunks/09qsmnfvk8dm3.js +0 -1
  596. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0a5ass8u78k90.js +0 -1
  597. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0gkonvtvjhg-p.js +0 -1
  598. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0hpoawl1bb10g.js +0 -1
  599. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0i5aqiffpm9jr.js +0 -1
  600. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jeb9kxtd_jq..js +0 -1
  601. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0j~63ld9lbb25.js +0 -1
  602. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0l6znnjqw.4yw.js +0 -1
  603. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0m2p301.a174k.js +0 -1
  604. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0o-c2g8y5pw-c.js +0 -1
  605. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0o0i2ke2jbdvq.js +0 -138
  606. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0rywhgbu_16tm.js +0 -5
  607. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0r~6kt_pkm4di.js +0 -1
  608. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0s3mvx9_dr13c.js +0 -1
  609. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u2lo2lzizxy_.js +0 -1
  610. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v.hno.6q74nn.css +0 -1
  611. package/dist/dashboard-runtime/dashboard/.next/static/chunks/100.ax5hitxko.js +0 -1
  612. package/dist/dashboard-runtime/dashboard/.next/static/chunks/14-39g6hwhcgn.js +0 -1
  613. package/dist/dashboard-runtime/dashboard/.next/static/chunks/14ti2gx~1fiub.js +0 -1
  614. package/dist/dashboard-runtime/dashboard/.next/static/chunks/14vqmdm7sosj2.js +0 -1
  615. package/dist/dashboard-runtime/dashboard/.next/static/chunks/17h~onnkksf44.js +0 -138
  616. package/dist/dashboard-runtime/dashboard/.next/static/chunks/17nx_vdk_qemm.js +0 -1
  617. package/dist/dashboard-runtime/dashboard/.next/static/chunks/1864_5-9a61tw.js +0 -1
  618. package/dist/dashboard-runtime/dashboard/.next/static/chunks/186jubvt5xyuj.js +0 -1
  619. /package/dist/dashboard-runtime/dashboard/.next/static/{wWmSSYUu4w4mIF1R_7UoM → nPPow7lCVx1fYDGH2XCxQ}/_buildManifest.js +0 -0
  620. /package/dist/dashboard-runtime/dashboard/.next/static/{wWmSSYUu4w4mIF1R_7UoM → nPPow7lCVx1fYDGH2XCxQ}/_clientMiddlewareManifest.js +0 -0
  621. /package/dist/dashboard-runtime/dashboard/.next/static/{wWmSSYUu4w4mIF1R_7UoM → nPPow7lCVx1fYDGH2XCxQ}/_ssgManifest.js +0 -0
@@ -0,0 +1,29 @@
1
+ import { Skeleton } from "@/components/ui/skeleton";
2
+
3
+ /**
4
+ * Initial loading state for the `/chat` route. The chat shell needs the
5
+ * sidebar list, the active session messages and the LLM provider list
6
+ * before it can hydrate, so we render a two-column placeholder that
7
+ * preserves the eventual layout to avoid layout shift.
8
+ */
9
+ export default function ChatLoading() {
10
+ return (
11
+ <div
12
+ className="grid grid-cols-1 gap-4 md:grid-cols-[260px_1fr]"
13
+ aria-busy="true"
14
+ aria-live="polite"
15
+ >
16
+ <div className="space-y-3">
17
+ <Skeleton className="h-9 w-full rounded-md" />
18
+ {Array.from({ length: 6 }).map((_, idx) => (
19
+ <Skeleton key={idx} className="h-12 w-full rounded-md" />
20
+ ))}
21
+ </div>
22
+ <div className="space-y-3">
23
+ <Skeleton className="h-10 w-1/2 rounded-md" />
24
+ <Skeleton className="h-[60vh] w-full rounded-lg" />
25
+ <Skeleton className="h-12 w-full rounded-md" />
26
+ </div>
27
+ </div>
28
+ );
29
+ }
@@ -0,0 +1,372 @@
1
+ "use client";
2
+
3
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
4
+ import { Settings2 } from "lucide-react";
5
+
6
+ import { Button } from "@/components/ui/button";
7
+ import { QaChatPanel } from "@/components/qa/qa-chat-panel";
8
+ import { ChatHistorySidebar } from "@/components/chat/chat-history-sidebar";
9
+ import { ChatMountConfig } from "@/components/chat/chat-mount-config";
10
+ import {
11
+ ChatConfigProvider,
12
+ DEFAULT_AGGREGATE_TOP_K,
13
+ DEFAULT_PER_KB_TOP_K,
14
+ buildRagFromMounts,
15
+ useChatConfig,
16
+ } from "@/components/chat/chat-config-context";
17
+ import {
18
+ useChatHistory,
19
+ deriveSessionTitle,
20
+ type ChatSession,
21
+ } from "@/hooks/use-chat-history";
22
+ import { useQaChat } from "@/hooks/use-qa-chat";
23
+ import {
24
+ readLastConfig,
25
+ writeLastConfig,
26
+ } from "@/hooks/use-chat-last-config";
27
+ import {
28
+ useActiveInstance,
29
+ type ActiveInstanceState,
30
+ } from "@/hooks/use-active-instance";
31
+ import { newId } from "@/lib/random-id";
32
+ import { findUserAnchorAbove } from "@/lib/chat-message-ops";
33
+ import { PENDING_DATA_SCOPE_KEY } from "@/lib/query-keys";
34
+ import type { ChatMessage } from "@/types/llm-chat";
35
+
36
+ /** Next.js page entry for the chat homepage. Wraps the UI tree with the
37
+ * shared config context so mount/prompt/model state survives across
38
+ * renders and session switches. */
39
+ export default function ChatPage() {
40
+ return (
41
+ <ChatConfigProvider>
42
+ <ChatHomepage />
43
+ </ChatConfigProvider>
44
+ );
45
+ }
46
+
47
+ function ChatHomepage() {
48
+ const cfg = useChatConfig();
49
+ const activeInstanceState = useActiveInstance();
50
+ const activeInstance = activeInstanceState.activeInstance;
51
+ const history = useChatHistory(activeInstanceState);
52
+
53
+ const [activeSessionId, setActiveSessionId] = useState<string | null>(null);
54
+ const [sheetOpen, setSheetOpen] = useState(false);
55
+ // Guard to skip persistence on the very first render of a blank session;
56
+ // otherwise we'd spam localStorage with empty rows whenever the user just
57
+ // opens the page.
58
+ const hasSentRef = useRef(false);
59
+
60
+ /**
61
+ * Unified session snapshot helper used by both the stream-end auto-save
62
+ * (`persistSession`) and the manual "save config" CTA (`handleSaveConfig`).
63
+ *
64
+ * The two call sites were previously ~95% identical — only the `title`
65
+ * fallback and the `hasSentRef` guard differed. Folding them into a
66
+ * single function eliminates the drift risk flagged in CR round 2
67
+ * (N-L3) while preserving the distinct intents through the flags:
68
+ * - `requireSent`: skip persistence when `hasSentRef` is false
69
+ * (used by auto-save to avoid spamming empty sessions).
70
+ * - `preserveTitle`: keep the existing stored title instead of
71
+ * re-deriving from the possibly-empty message list (used by the
72
+ * manual save path where the user may click "save config" before
73
+ * sending a single message).
74
+ */
75
+ const saveChatSession = useCallback(
76
+ (
77
+ messages: ChatMessage[],
78
+ opts: { requireSent: boolean; preserveTitle: boolean },
79
+ ) => {
80
+ if (!activeInstanceState.ready) return;
81
+ if (opts.requireSent && !hasSentRef.current) return;
82
+ const id = activeSessionId ?? newId("session");
83
+ if (!activeSessionId) setActiveSessionId(id);
84
+ const existing = opts.preserveTitle ? history.get(id) : null;
85
+ const title = existing?.title ?? deriveSessionTitle(messages);
86
+ const session: ChatSession = {
87
+ id,
88
+ title,
89
+ updatedAt: Date.now(),
90
+ activeInstance,
91
+ config: cfg.toSessionConfig(),
92
+ messages,
93
+ };
94
+ history.upsert(session);
95
+ // Remember this instance's last-used provider/model so the next new
96
+ // chat on this instance auto-fills the same pair.
97
+ if (cfg.providerId) {
98
+ writeLastConfig(activeInstance, {
99
+ providerId: cfg.providerId,
100
+ model: cfg.model,
101
+ });
102
+ }
103
+ },
104
+ [activeSessionId, cfg, history, activeInstance, activeInstanceState.ready],
105
+ );
106
+
107
+ const persistSession = useCallback(
108
+ (messages: ChatMessage[]) => {
109
+ saveChatSession(messages, { requireSent: true, preserveTitle: false });
110
+ },
111
+ [saveChatSession],
112
+ );
113
+
114
+ // Build the RAG slice from the current mount list on every send so mid-session
115
+ // mount edits take effect on the next turn without requiring a restart.
116
+ const rag = useMemo(() => buildRagFromMounts(cfg), [cfg]);
117
+
118
+ const chat = useQaChat({
119
+ activeInstance,
120
+ providerId: cfg.providerId,
121
+ model: cfg.model,
122
+ systemPrompt: cfg.systemPrompt,
123
+ temperature: cfg.temperature,
124
+ rag,
125
+ onPersist: persistSession,
126
+ });
127
+
128
+ // Load an existing session from localStorage into the chat + config state.
129
+ const loadSession = useCallback(
130
+ (id: string) => {
131
+ if (!activeInstanceState.ready) return;
132
+ const session = history.get(id);
133
+ if (!session) return;
134
+ if ((session.activeInstance ?? null) !== activeInstance) return;
135
+ setActiveSessionId(id);
136
+ hasSentRef.current = session.messages.length > 0;
137
+ chat.setMessages(session.messages);
138
+ cfg.hydrate({
139
+ providerId: session.config.providerId ?? "",
140
+ model: session.config.model ?? "",
141
+ systemPrompt: session.config.systemPrompt ?? "",
142
+ temperature: session.config.temperature,
143
+ aggregateTopK: session.config.aggregateTopK ?? DEFAULT_AGGREGATE_TOP_K,
144
+ perKbTopK: session.config.perKbTopK ?? DEFAULT_PER_KB_TOP_K,
145
+ retrieval: session.config.retrieval ?? {},
146
+ mounts: session.config.mounts ?? [],
147
+ });
148
+ },
149
+ // `chat.setMessages` and `cfg.hydrate` are stable references; depend on
150
+ // the ids instead of the full objects to avoid reload loops.
151
+ // eslint-disable-next-line react-hooks/exhaustive-deps
152
+ [history, chat.setMessages, cfg.hydrate, activeInstance, activeInstanceState.ready],
153
+ );
154
+
155
+ const newSession = useCallback(() => {
156
+ setActiveSessionId(null);
157
+ hasSentRef.current = false;
158
+ chat.clear();
159
+ // Preserve mounts/prompt/temperature/retrieval so rapid-fire "new chat"
160
+ // doesn't force users to remount KBs; only refresh provider/model from
161
+ // this instance's remembered pair.
162
+ const last = readLastConfig(activeInstance);
163
+ cfg.setProvider(last.providerId ?? "", last.model ?? "");
164
+ // eslint-disable-next-line react-hooks/exhaustive-deps
165
+ }, [chat.clear, activeInstance, cfg.setProvider]);
166
+
167
+ const deleteSession = useCallback(
168
+ (id: string) => {
169
+ history.remove(id);
170
+ if (activeSessionId === id) {
171
+ setActiveSessionId(null);
172
+ hasSentRef.current = false;
173
+ chat.clear();
174
+ }
175
+ },
176
+ [history, activeSessionId, chat],
177
+ );
178
+
179
+ const clearAll = useCallback(() => {
180
+ history.clear();
181
+ setActiveSessionId(null);
182
+ hasSentRef.current = false;
183
+ chat.clear();
184
+ // eslint-disable-next-line react-hooks/exhaustive-deps
185
+ }, [history, chat.clear]);
186
+
187
+ const handleSend = useCallback(
188
+ (text: string) => {
189
+ hasSentRef.current = true;
190
+ void chat.send(text);
191
+ },
192
+ [chat],
193
+ );
194
+
195
+ // Edit-and-resend: rewrite the user message in place, then rerun the
196
+ // assistant pipeline against the new content.
197
+ const handleEditSave = useCallback(
198
+ (userId: string, nextContent: string) => {
199
+ hasSentRef.current = true;
200
+ chat.editUserMessage(userId, nextContent);
201
+ void chat.reissueTurn(userId);
202
+ },
203
+ [chat],
204
+ );
205
+
206
+ // Regenerate-from-assistant: walk back to the user message above and
207
+ // reissue. The truncate happens inside reissueTurn, so callers don't need
208
+ // to pre-trim — passing the user anchor id is enough.
209
+ const handleRegenerate = useCallback(
210
+ (assistantId: string) => {
211
+ const anchor = findUserAnchorAbove(chat.messages, assistantId);
212
+ if (!anchor) return;
213
+ hasSentRef.current = true;
214
+ void chat.reissueTurn(anchor.id);
215
+ },
216
+ [chat],
217
+ );
218
+
219
+ // Snapshot the current config to localStorage on demand. Unlike
220
+ // `persistSession`, this path runs even when no message has been sent yet
221
+ // so users can lock in their setup before chatting; the resulting session
222
+ // simply carries an empty message list until the first turn.
223
+ const handleSaveConfig = useCallback(() => {
224
+ hasSentRef.current = chat.messages.length > 0 || hasSentRef.current;
225
+ saveChatSession(chat.messages, {
226
+ requireSent: false,
227
+ preserveTitle: true,
228
+ });
229
+ }, [chat.messages, saveChatSession]);
230
+
231
+ // Cross-tab / CLI config-change fallback. The runtime context poller and
232
+ // focus refetch update this scope when the active project or current
233
+ // project's underlying credentials change. Without this guard the chat page
234
+ // would keep showing the previous scope's mounted KBs and unsent draft.
235
+ const lastInstanceRef = useRef<ActiveInstanceState>({
236
+ activeInstance: null,
237
+ ready: false,
238
+ dataScopeKey: PENDING_DATA_SCOPE_KEY,
239
+ configRevision: "",
240
+ });
241
+ useEffect(() => {
242
+ const prev = lastInstanceRef.current;
243
+ // Only act after runtime context has produced a stable scope. The first
244
+ // loading -> ready transition must not wipe a freshly-opened blank chat.
245
+ if (
246
+ prev.ready &&
247
+ activeInstanceState.ready &&
248
+ prev.dataScopeKey !== activeInstanceState.dataScopeKey
249
+ ) {
250
+ cfg.reset();
251
+ setActiveSessionId(null);
252
+ hasSentRef.current = false;
253
+ chat.clear();
254
+ }
255
+ if (activeInstanceState.ready) {
256
+ lastInstanceRef.current = activeInstanceState;
257
+ }
258
+ // `cfg.reset` and `chat.clear` are stable; tracking the primitive scope
259
+ // key keeps this to one purge per runtime context change.
260
+ // eslint-disable-next-line react-hooks/exhaustive-deps
261
+ }, [activeInstanceState.dataScopeKey, activeInstanceState.ready]);
262
+
263
+ // Auto-fill provider/model with the pair remembered for the current
264
+ // instance on first mount, and whenever the active instance changes
265
+ // (instance switcher / cross-tab focus). Only runs while no existing
266
+ // session is loaded and the context is still in its blank slate, so we
267
+ // never clobber a session the user just opened.
268
+ useEffect(() => {
269
+ if (activeSessionId) return;
270
+ if (cfg.providerId) return;
271
+ const last = readLastConfig(activeInstance);
272
+ if (last.providerId) {
273
+ cfg.setProvider(last.providerId, last.model ?? "");
274
+ }
275
+ // `cfg.setProvider` is stable from the reducer; depending on the
276
+ // primitive instance name keeps this to one fill per instance change.
277
+ // eslint-disable-next-line react-hooks/exhaustive-deps
278
+ }, [activeInstance, activeSessionId, cfg.providerId]);
279
+
280
+ const activeSession = activeSessionId ? history.get(activeSessionId) : null;
281
+ const canSend = activeInstanceState.ready && Boolean(cfg.providerId && cfg.model);
282
+ const headerTitle = activeSession?.title ?? "新对话";
283
+ const mountCount = cfg.mounts.length;
284
+
285
+ // Hint surfaced in the empty-state copy when the user just clicked
286
+ // 「新对话」 and inherited mounts from the previous session. Addresses
287
+ // the cognitive bias of "this fresh session feels like it remembers
288
+ // things" — that perception is mostly RAG retrieving similar chunks,
289
+ // and showing the carry-over count makes the cause visible.
290
+ const mountsCarryover =
291
+ !activeSessionId && cfg.mounts.length > 0
292
+ ? `已沿用上一会话的 ${cfg.mounts.length} 个知识库挂载,按右上角齿轮可调整。`
293
+ : null;
294
+
295
+ return (
296
+ <div className="flex h-[calc(100vh-8rem)] overflow-hidden rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--surface))]">
297
+ <ChatHistorySidebar
298
+ sessions={history.sessions}
299
+ activeSessionId={activeSessionId}
300
+ onNewSession={newSession}
301
+ onSelectSession={loadSession}
302
+ onDeleteSession={deleteSession}
303
+ onClearAll={clearAll}
304
+ />
305
+
306
+ <div className="flex min-w-0 flex-1 flex-col">
307
+ <header className="flex items-center justify-between border-b border-[hsl(var(--border))] bg-[hsl(var(--surface))] px-4 py-3">
308
+ <div className="min-w-0">
309
+ <h1 className="truncate text-sm font-semibold">{headerTitle}</h1>
310
+ <p className="mt-0.5 text-xs text-muted-foreground">
311
+ {cfg.providerId && cfg.model ? (
312
+ <>
313
+ {cfg.model} · {mountCount} 个知识库 · 聚合 {cfg.aggregateTopK}
314
+ </>
315
+ ) : (
316
+ "点击右上角设置挂载模型与知识库"
317
+ )}
318
+ </p>
319
+ </div>
320
+ <Button
321
+ type="button"
322
+ variant="ghost"
323
+ size="icon"
324
+ onClick={() => setSheetOpen(true)}
325
+ title="对话配置"
326
+ >
327
+ <Settings2 className="h-4 w-4" />
328
+ </Button>
329
+ </header>
330
+
331
+ <div className="flex-1 overflow-hidden p-4">
332
+ {/*
333
+ The composer is always rendered (even on a fresh session) so
334
+ users can start typing immediately. Empty-state copy + a CTA
335
+ into the config drawer surface inside the panel; this matches
336
+ the ChatGPT / Claude convention of a sticky composer at the
337
+ bottom and contextual guidance above it.
338
+ */}
339
+ <QaChatPanel
340
+ messages={chat.messages}
341
+ isStreaming={chat.isStreaming}
342
+ canSend={canSend}
343
+ error={chat.error}
344
+ onSend={handleSend}
345
+ onStop={chat.stop}
346
+ onDelete={chat.deleteMessage}
347
+ onResend={chat.reissueTurn}
348
+ onRegenerate={handleRegenerate}
349
+ onEditSave={handleEditSave}
350
+ emptyState={{
351
+ title: canSend ? "可以开始对话了" : "开始对话",
352
+ description: mountsCarryover
353
+ ? `${mountsCarryover} 直接在下方输入你的问题。`
354
+ : canSend
355
+ ? "直接在下方输入你的问题;随时可以通过右上角齿轮调整模型或挂载的知识库"
356
+ : "点击右上角齿轮,选择模型并挂载知识库,即可开始问答",
357
+ actionLabel: "打开配置",
358
+ onAction: () => setSheetOpen(true),
359
+ }}
360
+ disabledPlaceholder="请先点击右上角齿轮配置模型与知识库"
361
+ />
362
+ </div>
363
+ </div>
364
+
365
+ <ChatMountConfig
366
+ open={sheetOpen}
367
+ onOpenChange={setSheetOpen}
368
+ onSave={handleSaveConfig}
369
+ />
370
+ </div>
371
+ );
372
+ }
@@ -0,0 +1,69 @@
1
+ "use client";
2
+
3
+ import { useEffect } from "react";
4
+ import { AlertTriangle, RefreshCw } from "lucide-react";
5
+
6
+ import { Button } from "@/components/ui/button";
7
+ import { reportClientError } from "@/components/logging/client-error-reporter";
8
+
9
+ /**
10
+ * Route-segment error boundary for every page rendered under
11
+ * `(dashboard)/layout.tsx`. Next.js mounts this component when a page
12
+ * (or any of its children) throws during render, replacing the page
13
+ * tree but keeping the surrounding sidebar / breadcrumb shell intact.
14
+ *
15
+ * The top-level `app/error.tsx` already catches truly catastrophic
16
+ * failures; this dashboard-scoped boundary keeps the failure local so
17
+ * users can navigate away via the sidebar without a full reload.
18
+ */
19
+ export default function DashboardError({
20
+ error,
21
+ reset,
22
+ }: {
23
+ error: Error & { digest?: string };
24
+ reset: () => void;
25
+ }) {
26
+ useEffect(() => {
27
+ // Surface the error to the browser console so engineers can copy the
28
+ // stack trace; the digest field links the client-side message to the
29
+ // server-side log line emitted by Next.js.
30
+ console.error("Dashboard route error:", error);
31
+ reportClientError({
32
+ event: "browser.error_boundary.dashboard",
33
+ message: error.message,
34
+ name: error.name,
35
+ stack: error.stack,
36
+ digest: error.digest,
37
+ });
38
+ }, [error]);
39
+
40
+ return (
41
+ <div className="flex min-h-[60vh] flex-col items-center justify-center gap-6 px-4 text-center">
42
+ <div className="flex h-14 w-14 items-center justify-center rounded-full bg-destructive/10 text-destructive">
43
+ <AlertTriangle className="h-7 w-7" aria-hidden="true" />
44
+ </div>
45
+ <div className="space-y-2 max-w-md">
46
+ <h2 className="font-display text-2xl font-semibold tracking-tight text-foreground">
47
+ 页面出错了
48
+ </h2>
49
+ <p className="text-sm text-muted-foreground break-words">
50
+ {error.message || "发生了未知错误,请稍后重试。"}
51
+ </p>
52
+ {error.digest ? (
53
+ <p className="text-xs text-muted-foreground/70">
54
+ 错误编号:<code className="font-mono">{error.digest}</code>
55
+ </p>
56
+ ) : null}
57
+ </div>
58
+ <div className="flex gap-3">
59
+ <Button onClick={reset} variant="default">
60
+ <RefreshCw className="mr-2 h-4 w-4" aria-hidden="true" />
61
+ 重试
62
+ </Button>
63
+ <Button asChild variant="outline">
64
+ <a href="/">返回首页</a>
65
+ </Button>
66
+ </div>
67
+ </div>
68
+ );
69
+ }
@@ -106,9 +106,11 @@ export default function DocumentsClient() {
106
106
  async (document: Document) => {
107
107
  try {
108
108
  await deleteDocuments.mutateAsync({
109
- knowledgeBaseName,
110
- subspace: effectiveSubspace,
111
- documents: [{ docId: document.docId }],
109
+ request: {
110
+ knowledgeBaseName,
111
+ subspace: effectiveSubspace,
112
+ documents: [{ docId: document.docId }],
113
+ },
112
114
  });
113
115
  toast.success("文档已删除");
114
116
  setDeleteTarget(null);
@@ -123,19 +125,26 @@ export default function DocumentsClient() {
123
125
  );
124
126
 
125
127
  const handleBatchDelete = useCallback(async () => {
128
+ const total = selectedDocuments.length;
129
+ const toastId = toast.loading(`正在删除 0/${total} 个文档...`);
126
130
  try {
127
131
  await deleteDocuments.mutateAsync({
128
- knowledgeBaseName,
129
- subspace: effectiveSubspace,
130
- documents: selectedDocuments.map((doc) => ({ docId: doc.docId })),
132
+ request: {
133
+ knowledgeBaseName,
134
+ subspace: effectiveSubspace,
135
+ documents: selectedDocuments.map((doc) => ({ docId: doc.docId })),
136
+ },
137
+ onProgress: (completed, all) => {
138
+ toast.loading(`正在删除 ${completed}/${all} 个文档...`, { id: toastId });
139
+ },
131
140
  });
132
- toast.success(`成功删除 ${selectedDocuments.length} 个文档`);
141
+ toast.success(`成功删除 ${total} 个文档`, { id: toastId });
133
142
  setSelectedDocuments([]);
134
143
  setShowBatchDeleteConfirm(false);
135
144
  } catch (error) {
136
145
  const message =
137
146
  error instanceof Error ? error.message : "批量删除失败";
138
- toast.error(message);
147
+ toast.error(message, { id: toastId });
139
148
  }
140
149
  }, [knowledgeBaseName, selectedDocuments, deleteDocuments, effectiveSubspace]);
141
150
 
@@ -164,8 +173,8 @@ export default function DocumentsClient() {
164
173
  }
165
174
 
166
175
  const titleText = isSubspaceEnabled
167
- ? `文档 (${filteredDocuments.length}) — ${subspace}`
168
- : `文档 (${filteredDocuments.length})`;
176
+ ? `文档 — ${subspace}`
177
+ : "文档";
169
178
 
170
179
  // Empty subspace — show a friendly upload CTA but keep the subspace active.
171
180
  const isEmptySubspace =
@@ -244,7 +253,9 @@ export default function DocumentsClient() {
244
253
 
245
254
  {/* 分页控件 */}
246
255
  <div className="flex items-center justify-between py-2">
247
- <div className="flex items-center gap-2 text-sm text-[hsl(var(--muted-foreground))]">
256
+ <div className="flex items-center gap-3 text-sm text-[hsl(var(--muted-foreground))]">
257
+ <span>本页 <span className="font-medium text-[hsl(var(--foreground))]">{filteredDocuments.length}</span> 条</span>
258
+ <span className="text-[hsl(var(--border))]">|</span>
248
259
  <span>每页</span>
249
260
  <select
250
261
  className="rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--background))] px-2 py-1 text-sm"
@@ -1,11 +1,13 @@
1
1
  "use client";
2
2
 
3
- import { use, useState } from "react";
3
+ import { use, useCallback, useState } from "react";
4
4
 
5
5
  import { QaChatPanel } from "@/components/qa/qa-chat-panel";
6
6
  import { QaForm, type QaFormState } from "@/components/qa/qa-form";
7
7
  import { useKnowledgeBase } from "@/hooks/use-knowledge-base";
8
+ import { useActiveInstance } from "@/hooks/use-active-instance";
8
9
  import { useQaChat } from "@/hooks/use-qa-chat";
10
+ import { findUserAnchorAbove } from "@/lib/chat-message-ops";
9
11
 
10
12
  interface PageProps {
11
13
  params: Promise<{ name: string }>;
@@ -15,10 +17,12 @@ export default function QaPlaygroundPage({ params }: PageProps) {
15
17
  const { name: rawName } = use(params);
16
18
  const knowledgeBaseName = decodeURIComponent(rawName);
17
19
  const { data: knowledgeBase } = useKnowledgeBase(knowledgeBaseName);
20
+ const activeInstanceState = useActiveInstance();
18
21
 
19
22
  const [formState, setFormState] = useState<QaFormState | null>(null);
20
23
 
21
24
  const chat = useQaChat({
25
+ activeInstance: activeInstanceState.activeInstance,
22
26
  providerId: formState?.providerId ?? "",
23
27
  model: formState?.model ?? "",
24
28
  systemPrompt: formState?.systemPrompt ?? "",
@@ -26,7 +30,25 @@ export default function QaPlaygroundPage({ params }: PageProps) {
26
30
  rag: formState?.rag,
27
31
  });
28
32
 
29
- const canSend = Boolean(formState?.providerId && formState?.model);
33
+ const canSend =
34
+ activeInstanceState.ready && Boolean(formState?.providerId && formState?.model);
35
+
36
+ const handleEditSave = useCallback(
37
+ (userId: string, nextContent: string) => {
38
+ chat.editUserMessage(userId, nextContent);
39
+ void chat.reissueTurn(userId);
40
+ },
41
+ [chat],
42
+ );
43
+
44
+ const handleRegenerate = useCallback(
45
+ (assistantId: string) => {
46
+ const anchor = findUserAnchorAbove(chat.messages, assistantId);
47
+ if (!anchor) return;
48
+ void chat.reissueTurn(anchor.id);
49
+ },
50
+ [chat],
51
+ );
30
52
 
31
53
  return (
32
54
  <div className="grid gap-6 lg:grid-cols-[360px_1fr]">
@@ -48,6 +70,10 @@ export default function QaPlaygroundPage({ params }: PageProps) {
48
70
  error={chat.error}
49
71
  onSend={chat.send}
50
72
  onStop={chat.stop}
73
+ onDelete={chat.deleteMessage}
74
+ onResend={chat.reissueTurn}
75
+ onRegenerate={handleRegenerate}
76
+ onEditSave={handleEditSave}
51
77
  />
52
78
  </section>
53
79
  </div>
@@ -0,0 +1,75 @@
1
+ import { redirect } from 'next/navigation';
2
+
3
+ import { listInstances } from '@tablestore/tablestore-agent-shared';
4
+
5
+ import { BreadcrumbBar } from '@/components/layout/breadcrumb-bar';
6
+ import { Sidebar } from '@/components/layout/sidebar';
7
+ import { SidebarMobile } from '@/components/layout/sidebar-mobile';
8
+ import { SidebarOffset } from '@/components/layout/sidebar-offset';
9
+
10
+ // The layout reads runtime state (TOML config, env vars) to decide whether
11
+ // to redirect to onboarding. Must opt out of static rendering so the check
12
+ // runs on every request rather than being cached from build time.
13
+ export const dynamic = "force-dynamic";
14
+
15
+ /**
16
+ * Whether any credential source (env vars, legacy [default] TOML section, or
17
+ * a named instance) exists. When nothing is configured we redirect to the
18
+ * onboarding flow so first-time users see the welcome card instead of a
19
+ * broken dashboard.
20
+ */
21
+ function hasUsableCredentials(): boolean {
22
+ const envConfigured =
23
+ !!process.env.TABLESTORE_ACCESS_KEY_ID &&
24
+ !!process.env.TABLESTORE_ACCESS_KEY_SECRET &&
25
+ !!process.env.TABLESTORE_ENDPOINT &&
26
+ !!process.env.TABLESTORE_INSTANCE_NAME;
27
+ if (envConfigured) return true;
28
+
29
+ try {
30
+ const rows = listInstances();
31
+ // Named instances or the legacy [default] section both count.
32
+ return rows.length > 0;
33
+ } catch {
34
+ return false;
35
+ }
36
+ }
37
+
38
+ export default function DashboardLayout({
39
+ children,
40
+ }: {
41
+ children: React.ReactNode;
42
+ }) {
43
+ if (!hasUsableCredentials()) {
44
+ redirect('/onboarding');
45
+ }
46
+
47
+ return (
48
+ <div className="min-h-screen">
49
+ {/*
50
+ Skip-to-content link: visually hidden until focused. Keyboard users
51
+ can press Tab once on the page to jump straight to the main region,
52
+ bypassing the sidebar / breadcrumb on every navigation.
53
+ */}
54
+ <a
55
+ href="#main-content"
56
+ className="sr-only focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-50 focus:rounded-md focus:bg-primary focus:px-3 focus:py-2 focus:text-sm focus:font-medium focus:text-primary-foreground focus:shadow-md"
57
+ >
58
+ 跳转到主内容
59
+ </a>
60
+ <Sidebar />
61
+ <SidebarOffset>
62
+ <SidebarMobile />
63
+ <BreadcrumbBar />
64
+ <main
65
+ id="main-content"
66
+ tabIndex={-1}
67
+ aria-label="主内容"
68
+ className="mx-auto max-w-350 px-8 py-8 max-md:px-4 animate-in fade-in duration-300"
69
+ >
70
+ {children}
71
+ </main>
72
+ </SidebarOffset>
73
+ </div>
74
+ );
75
+ }