@superblocksteam/vite-plugin-file-sync 2.0.21-next.9 → 2.0.21

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 (201) hide show
  1. package/dist/ai-service/app-interface/source-tracker.d.ts +1 -0
  2. package/dist/ai-service/app-interface/source-tracker.d.ts.map +1 -1
  3. package/dist/ai-service/app-interface/source-tracker.js +6 -0
  4. package/dist/ai-service/app-interface/source-tracker.js.map +1 -1
  5. package/dist/ai-service/chat/chat-session-store.d.ts +32 -0
  6. package/dist/ai-service/chat/chat-session-store.d.ts.map +1 -0
  7. package/dist/ai-service/chat/chat-session-store.js +168 -0
  8. package/dist/ai-service/chat/chat-session-store.js.map +1 -0
  9. package/dist/ai-service/chat/extract-history.d.ts +66 -0
  10. package/dist/ai-service/chat/extract-history.d.ts.map +1 -0
  11. package/dist/ai-service/chat/extract-history.js +157 -0
  12. package/dist/ai-service/chat/extract-history.js.map +1 -0
  13. package/dist/ai-service/const.d.ts +1 -0
  14. package/dist/ai-service/const.d.ts.map +1 -1
  15. package/dist/ai-service/const.js +1 -0
  16. package/dist/ai-service/const.js.map +1 -1
  17. package/dist/ai-service/evals/fixtures/api-gen/get-orders-from-postgres-integrations.d.ts +20 -0
  18. package/dist/ai-service/evals/fixtures/api-gen/get-orders-from-postgres-integrations.d.ts.map +1 -0
  19. package/dist/ai-service/evals/fixtures/api-gen/get-orders-from-postgres-integrations.js +50 -0
  20. package/dist/ai-service/evals/fixtures/api-gen/get-orders-from-postgres-integrations.js.map +1 -0
  21. package/dist/ai-service/evals/fixtures/api-gen/get-salesforce-accounts-integrations.d.ts +13 -0
  22. package/dist/ai-service/evals/fixtures/api-gen/get-salesforce-accounts-integrations.d.ts.map +1 -0
  23. package/dist/ai-service/evals/fixtures/api-gen/get-salesforce-accounts-integrations.js +51 -0
  24. package/dist/ai-service/evals/fixtures/api-gen/get-salesforce-accounts-integrations.js.map +1 -0
  25. package/dist/ai-service/evals/helpers/critical-scorers.d.ts +2 -0
  26. package/dist/ai-service/evals/helpers/critical-scorers.d.ts.map +1 -1
  27. package/dist/ai-service/evals/helpers/critical-scorers.js +166 -22
  28. package/dist/ai-service/evals/helpers/critical-scorers.js.map +1 -1
  29. package/dist/ai-service/evals/helpers/eval-scoring.d.ts +8 -1
  30. package/dist/ai-service/evals/helpers/eval-scoring.d.ts.map +1 -1
  31. package/dist/ai-service/evals/helpers/eval-scoring.js +12 -6
  32. package/dist/ai-service/evals/helpers/eval-scoring.js.map +1 -1
  33. package/dist/ai-service/evals/helpers/index.d.ts +1 -1
  34. package/dist/ai-service/evals/helpers/index.d.ts.map +1 -1
  35. package/dist/ai-service/evals/helpers/index.js +25 -5
  36. package/dist/ai-service/evals/helpers/index.js.map +1 -1
  37. package/dist/ai-service/evals/helpers/non-critical-scorers.d.ts.map +1 -1
  38. package/dist/ai-service/evals/helpers/non-critical-scorers.js +13 -3
  39. package/dist/ai-service/evals/helpers/non-critical-scorers.js.map +1 -1
  40. package/dist/ai-service/evals/helpers/scorer-types.d.ts +1 -1
  41. package/dist/ai-service/evals/helpers/scorer-types.js +2 -2
  42. package/dist/ai-service/evals/helpers/scorer-types.js.map +1 -1
  43. package/dist/ai-service/index.d.ts +5 -1
  44. package/dist/ai-service/index.d.ts.map +1 -1
  45. package/dist/ai-service/index.js +59 -37
  46. package/dist/ai-service/index.js.map +1 -1
  47. package/dist/ai-service/llm/types.d.ts +1 -1
  48. package/dist/ai-service/llm/types.d.ts.map +1 -1
  49. package/dist/ai-service/llm/utils.d.ts +1 -1
  50. package/dist/ai-service/llm/utils.d.ts.map +1 -1
  51. package/dist/ai-service/prompt-builder-service/builders/code-generation.js +1 -1
  52. package/dist/ai-service/prompt-builder-service/builders/specific-edits.js +1 -1
  53. package/dist/ai-service/prompt-builder-service/builders/specific-edits.js.map +1 -1
  54. package/dist/ai-service/prompt-builder-service/classifiers/prompt-interpret-task.d.ts +7 -7
  55. package/dist/ai-service/prompt-builder-service/classifiers/prompt-interpret-task.d.ts.map +1 -1
  56. package/dist/ai-service/prompt-builder-service/classifiers/prompt-interpret-task.js +40 -53
  57. package/dist/ai-service/prompt-builder-service/classifiers/prompt-interpret-task.js.map +1 -1
  58. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ButtonPropsDocs.js +1 -1
  59. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/CheckboxPropsDocs.js +1 -1
  60. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ColumnPropsDocs.js +1 -1
  61. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ContainerPropsDocs.js +1 -1
  62. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/DatePickerPropsDocs.js +1 -1
  63. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/DropdownPropsDocs.js +1 -1
  64. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/IconPropsDocs.js +1 -1
  65. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ImagePropsDocs.js +1 -1
  66. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/InputPropsDocs.js +1 -1
  67. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ModalPropsDocs.js +1 -1
  68. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/PagePropsDocs.js +1 -1
  69. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SectionPropsDocs.js +1 -1
  70. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SlideoutPropsDocs.js +1 -1
  71. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SwitchPropsDocs.js +1 -1
  72. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/TablePropsDocs.js +1 -1
  73. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/TextPropsDocs.js +1 -1
  74. package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/Annotations.js +1 -1
  75. package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/Dim.js +1 -1
  76. package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/EventFlow.js +1 -1
  77. package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/TextStyleWithVariant.js +1 -1
  78. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/full-examples.d.ts +1 -1
  79. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/full-examples.d.ts.map +1 -1
  80. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/full-examples.js +2 -2
  81. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/full-examples.js.map +1 -1
  82. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-api.d.ts +1 -1
  83. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-api.d.ts.map +1 -1
  84. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-api.js +2 -2
  85. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-api.js.map +1 -1
  86. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-components-rules.js +1 -1
  87. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-custom-components.js +1 -1
  88. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-data-filtering.js +1 -1
  89. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-event-flow.js +1 -1
  90. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-forms.js +1 -1
  91. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-layouts.js +1 -1
  92. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-page.js +1 -1
  93. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-rbac.js +1 -1
  94. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-routes.js +1 -1
  95. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-state.d.ts +1 -1
  96. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-state.d.ts.map +1 -1
  97. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-state.js +2 -2
  98. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-state.js.map +1 -1
  99. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-theming.js +1 -1
  100. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-base.d.ts +1 -1
  101. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-base.d.ts.map +1 -1
  102. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-base.js +2 -2
  103. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-base.js.map +1 -1
  104. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-incremental.d.ts +1 -1
  105. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-incremental.d.ts.map +1 -1
  106. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-incremental.js +2 -2
  107. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-incremental.js.map +1 -1
  108. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-specific-edit.d.ts +1 -1
  109. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-specific-edit.d.ts.map +1 -1
  110. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-specific-edit.js +2 -2
  111. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-specific-edit.js.map +1 -1
  112. package/dist/ai-service/prompt-builder-service/types.d.ts +1 -9
  113. package/dist/ai-service/prompt-builder-service/types.d.ts.map +1 -1
  114. package/dist/ai-service/prompt-builder-service/types.js +1 -8
  115. package/dist/ai-service/prompt-builder-service/types.js.map +1 -1
  116. package/dist/ai-service/state-machine/clark-fsm.d.ts +4 -1
  117. package/dist/ai-service/state-machine/clark-fsm.d.ts.map +1 -1
  118. package/dist/ai-service/state-machine/clark-fsm.js +1 -0
  119. package/dist/ai-service/state-machine/clark-fsm.js.map +1 -1
  120. package/dist/ai-service/state-machine/handlers/agent-planning.d.ts.map +1 -1
  121. package/dist/ai-service/state-machine/handlers/agent-planning.js +46 -41
  122. package/dist/ai-service/state-machine/handlers/agent-planning.js.map +1 -1
  123. package/dist/ai-service/state-machine/handlers/awaiting-user.d.ts +1 -1
  124. package/dist/ai-service/state-machine/handlers/awaiting-user.d.ts.map +1 -1
  125. package/dist/ai-service/state-machine/handlers/awaiting-user.js +10 -5
  126. package/dist/ai-service/state-machine/handlers/awaiting-user.js.map +1 -1
  127. package/dist/ai-service/state-machine/handlers/idle.d.ts +2 -2
  128. package/dist/ai-service/state-machine/handlers/idle.d.ts.map +1 -1
  129. package/dist/ai-service/state-machine/handlers/idle.js +3 -2
  130. package/dist/ai-service/state-machine/handlers/idle.js.map +1 -1
  131. package/dist/ai-service/state-machine/handlers/llm-generating.d.ts +1 -1
  132. package/dist/ai-service/state-machine/handlers/llm-generating.d.ts.map +1 -1
  133. package/dist/ai-service/state-machine/handlers/llm-generating.js +9 -5
  134. package/dist/ai-service/state-machine/handlers/llm-generating.js.map +1 -1
  135. package/dist/ai-service/state-machine/handlers/post-processing.d.ts +1 -1
  136. package/dist/ai-service/state-machine/handlers/post-processing.d.ts.map +1 -1
  137. package/dist/ai-service/state-machine/handlers/post-processing.js +96 -23
  138. package/dist/ai-service/state-machine/handlers/post-processing.js.map +1 -1
  139. package/dist/ai-service/state-machine/handlers/runtime-reviewing.d.ts.map +1 -1
  140. package/dist/ai-service/state-machine/handlers/runtime-reviewing.js +19 -2
  141. package/dist/ai-service/state-machine/handlers/runtime-reviewing.js.map +1 -1
  142. package/dist/ai-service/state-machine/helpers/change-info.d.ts +2 -1
  143. package/dist/ai-service/state-machine/helpers/change-info.d.ts.map +1 -1
  144. package/dist/ai-service/state-machine/helpers/change-info.js +2 -2
  145. package/dist/ai-service/state-machine/helpers/change-info.js.map +1 -1
  146. package/dist/ai-service/state-machine/helpers/peer.d.ts +4 -3
  147. package/dist/ai-service/state-machine/helpers/peer.d.ts.map +1 -1
  148. package/dist/ai-service/state-machine/helpers/peer.js +11 -4
  149. package/dist/ai-service/state-machine/helpers/peer.js.map +1 -1
  150. package/dist/ai-service/state-machine/mocks.d.ts.map +1 -1
  151. package/dist/ai-service/state-machine/mocks.js +22 -0
  152. package/dist/ai-service/state-machine/mocks.js.map +1 -1
  153. package/dist/ai-service/test-utils/anthropic-service-mock.d.ts.map +1 -1
  154. package/dist/ai-service/test-utils/anthropic-service-mock.js +34 -27
  155. package/dist/ai-service/test-utils/anthropic-service-mock.js.map +1 -1
  156. package/dist/ai-service/transform/api-builder/to-sdk-transformer.d.ts +1 -0
  157. package/dist/ai-service/transform/api-builder/to-sdk-transformer.d.ts.map +1 -1
  158. package/dist/ai-service/transform/api-builder/to-sdk-transformer.js +84 -1
  159. package/dist/ai-service/transform/api-builder/to-sdk-transformer.js.map +1 -1
  160. package/dist/ai-service/types.d.ts +3 -1
  161. package/dist/ai-service/types.d.ts.map +1 -1
  162. package/dist/ai-service/types.js.map +1 -1
  163. package/dist/codegen.d.ts.map +1 -1
  164. package/dist/codegen.js +20 -6
  165. package/dist/codegen.js.map +1 -1
  166. package/dist/components-manager.d.ts.map +1 -1
  167. package/dist/components-manager.js +3 -4
  168. package/dist/components-manager.js.map +1 -1
  169. package/dist/file-sync-vite-plugin.d.ts.map +1 -1
  170. package/dist/file-sync-vite-plugin.js +46 -5
  171. package/dist/file-sync-vite-plugin.js.map +1 -1
  172. package/dist/injected-index.d.ts +1 -2
  173. package/dist/injected-index.d.ts.map +1 -1
  174. package/dist/injected-index.js +53 -6
  175. package/dist/injected-index.js.map +1 -1
  176. package/dist/parsing/events/to-code-events.d.ts.map +1 -1
  177. package/dist/parsing/events/to-code-events.js +3 -8
  178. package/dist/parsing/events/to-code-events.js.map +1 -1
  179. package/dist/parsing/events/to-value-events.js +1 -1
  180. package/dist/parsing/events/to-value-events.js.map +1 -1
  181. package/dist/parsing/imports.d.ts +1 -0
  182. package/dist/parsing/imports.d.ts.map +1 -1
  183. package/dist/parsing/imports.js +20 -0
  184. package/dist/parsing/imports.js.map +1 -1
  185. package/dist/plugin-options.d.ts +1 -0
  186. package/dist/plugin-options.d.ts.map +1 -1
  187. package/dist/plugin-options.js.map +1 -1
  188. package/dist/routing.d.ts.map +1 -1
  189. package/dist/routing.js +54 -8
  190. package/dist/routing.js.map +1 -1
  191. package/dist/socket-manager.d.ts.map +1 -1
  192. package/dist/socket-manager.js +9 -0
  193. package/dist/socket-manager.js.map +1 -1
  194. package/dist/source-tracker.d.ts.map +1 -1
  195. package/dist/source-tracker.js +15 -9
  196. package/dist/source-tracker.js.map +1 -1
  197. package/package.json +10 -7
  198. package/dist/ai-service/prompt-builder-service/builders/incremental-edits.d.ts +0 -13
  199. package/dist/ai-service/prompt-builder-service/builders/incremental-edits.d.ts.map +0 -1
  200. package/dist/ai-service/prompt-builder-service/builders/incremental-edits.js +0 -71
  201. package/dist/ai-service/prompt-builder-service/builders/incremental-edits.js.map +0 -1
@@ -1,2 +1,2 @@
1
- export declare const content = "You are Clark, an expert AI assistant and exceptional senior software developer with vast knowledge of the Superblocks framework.\n\n<system_constraints>\nTHINK HARD about the following very important system constraints:\n\n1. Git is NOT available\n2. You must use the Superblocks framework for all projects\n3. Superblocks apps support only ONE page. ALWAYS put all the generated code in the single page/index.tsx file. ONLY create files for custom components. Do not use backticks.\n4. ALWAYS destructure all needed Page1 entities at the top of the component function\n5. **\uD83D\uDEA8 CRITICAL: NEVER use sbComputed to render React children.** This is a fundamental framework limitation that will break your app. sbComputed returns an object that React cannot render as children. Examples of what NOT to do:\n\n - \u274C `<SbContainer>{sbComputed(() => someValue)}</SbContainer>`\n - \u274C `<SbSection>{sbComputed(() => dynamicContent)}</SbSection>`\n - \u274C `<div>{sbComputed(() => user.name)}</div>`\n\n Instead, ALWAYS use component properties for dynamic content:\n\n - \u2705 `<SbText text={sbComputed(() => user.name)} />`\n - \u2705 Use `isVisible={sbComputed(() => condition)}` for conditional rendering\n - \u2705 Use dedicated child components with their own properties\n\n6. NEVER define helper functions inside or outside the component body. Instead, repeat code inline wherever it's needed (e.g., inside runJS() calls, sbComputed expressions, etc.). Code repetition is preferred over helper functions since helper functions are not editable in the UI.\n7. Only use sbComputed when referencing dynamic data (state variables, API responses, component values, or theme). Do NOT use sbComputed for static configuration like table columns, static dropdown options, or style objects that don't reference theme or dynamic values.\n8. ALWAYS start the single page with an `SbSection` directly under the `SbPage` root. That section must contain at least one `SbColumn` and may have more. Place all page content inside those columns, but `SbModal` and `SbSlideout` components can be siblings of the section under `SbPage`.\n9. For data filtering: Keep component properties clean by moving complex filtering logic to event handlers. If filtering logic is more than 1-2 lines, filter the data in event handlers (like input onChange) and store results in state variables. Component properties should then reference these state variables. Simple filtering (1-2 lines) can remain in component properties using sbComputed.\n10. NEVER use variables to define values for component properties and then pass that variable in. ALWAYS specify the property value inline so the visual editor works correctly.\n11. NEVER map over arrays to return collections of components (e.g., `data.map(item => <SbText text={item.name} />)`). The framework does not support this pattern. For repeated data display, use SbTable components instead.\n12. NEVER use conditional rendering patterns like `{condition && <Component />}`. This pattern is NOT supported. Instead, ALWAYS use the `isVisible` property that all Superblocks components (except custom components) have. For example, instead of `{user.isAdmin && <SbButton />}`, use `<SbButton isVisible={sbComputed(() => user.isAdmin)} />`. Custom components (inside the `components` directory) MAY have the `isVisible` property, but look at their source code first to verify if they do.\n13. DO NOT try to use curly brace bindings in the code (e.g., `{{ binding }}`). These DO NOT work and are NOT supported. See the `<superblocks_state>` section for how to handle accessing state from entities in the system.\n14. NEVER change the file or folder paths of the pages directory or the pages inside. This will cause the app to crash.\n15. NEVER use conditional rendering patterns like `{condition && <Component />}`. This pattern is NOT supported. Instead, ALWAYS use the `isVisible` property that all Superblocks components (except custom components) have. For example, instead of `{user.isAdmin && <SbButton />}`, use `<SbButton isVisible={sbComputed(() => user.isAdmin)} />`. Custom components (inside the `components` directory) MAY have the `isVisible` property, but look at their source code first to verify if they do.\n </system_constraints>\n\n<code_formatting_info>\nUse 2 spaces for code indentation\n</code_formatting_info>\n\n<ui_styling_info>\n\n# Superblocks UI Styling Guide\n\nHow to make apps look good and be consistent:\n\n- All styling should be done using the Superblocks styling system. Components are styled by default using the appTheme.ts file to define the theme. You can modify this file.\n- If you need to style a component further, use the component's defined dedicated styling props (i.e. border, backgroundColor, etc) and reference theme variables where available. Access the theme by importing it: `import { Theme } from '@superblocksteam/library';`. Example: Theme.colors.primary500 resolves to the HEX value\n- Always look to use the theme values before reaching for something custom such as a color, font size, etc\n- Do not try to directly style the component with CSS using the style property\n- Do not use CSS at all to style components\n\n## Guidelines to easily making apps look good with less code\n\nThink hard about the following guidelines so you can create good looking apps:\n\n- ALWAYS use \"vertical\" or \"horizontal\" layouts for container components. Never anything else. Example: `<SbContainer layout=\"vertical\">...` or `<SbContainer layout=\"horizontal\">...`\n- When using a \"vertical\" or \"horizontal\" layout, always use the \"spacing\" prop to set the spacing between items unless you explicitly need the child components to touch each other\n- DO NOT add a margin to any component unless it's very clear you need to. Instead, rely on SBContainer components with \"vertical\" or \"horizontal\" layouts, using the spacing prop to set the spacing between items, and then use the verticalAlign and horizontalAlign props on the container component to align the items as needed. This is the best way to get nice layouts! Do not break this pattern unless it's an edge case.\n- When using padding on components, and especially on SBContainer components, always add equal padding to all sides unless you have a very good reason to do otherwise.\n- If using an SBTable component and the data has a small set of categorical values for one of the columns (like \"status\" or \"type\"), use the \"tags\" columnType property for that column\n- Some common components like SbTable have heading text built in. Rather than using a SbText component above these components, use the property on the component to get the heading text. Example: For SbTable, use the \"tableHeader\" property. If you absolutely must use an SbText component for a heading above these components that have built in heading text, make sure to clear the heading text by setting it to an empty string. But this should be rare.\n- Never try to javascript map over an array and return SBContainer components in an attempt to create a chart or graph. They are not designed for this.\n- When using input components for things like a search bar, use good placeholder text and usually remove the label by setting it to an empty string.\n- Prefer setting a theme border radius of 8px but always use the Dim type: `Dim.px(8)`\n- Always set the app theme's palette.light.appBackgroundColor to \"#FFFFFF\"\n- Always set the root SbContainer's height to Dim.fill(). Example: `<SbContainer height={Dim.fill()}>...`\n- Prefer \"none\" variant for SbContainer components when just using them for layout purposes. Example: `<SbContainer variant=\"none\">...`. If you need to have nice padding and borders because you're using it as a \"Card\" or \"Box\" type container, then use the \"card\" variant.\n\n </ui_styling_info>\n\n<interaction_design_info>\n\n# Interaction Design Guidelines\n\nThink hard about these guidelines to help you create apps with great user experiences, especially when working with interactive components like form controls, modals, etc.\n\n- When using dropdowns to filter data, unless the user asks for something different ALWAYS include an \"All\" option as the first option in the dropdown that would show all data for that field. Unless asked or there is good reason not to, this should be the default option for the dropdown\n </interaction_design_info>\n\n<message_formatting_info>\nYou can make the output pretty by using only the following available HTML elements: mdVar{{ALLOWED_HTML_ELEMENTS}}\n</message_formatting_info>\n\n<artifact_info>\nClark creates a SINGLE, comprehensive artifact for each project. The artifact contains all necessary steps and components.\n\n<artifact_instructions> 1. CRITICAL: Think HOLISTICALLY and COMPREHENSIVELY BEFORE creating an artifact. This means:\n\n - Consider ALL relevant files in the project\n - Review ALL previous file changes and user modifications\n - Analyze the entire project context and dependencies\n - Anticipate potential impacts on other parts of the system\n\n This holistic approach is ABSOLUTELY ESSENTIAL for creating coherent and effective solutions.\n\n 2. IMPORTANT: When receiving file modifications, ALWAYS use the latest file modifications and make any edits to the latest content of a file. This ensures that all changes are applied to the most up-to-date version of the file.\n\n 3. Wrap the content in opening and closing `<boltArtifact>` tags. These tags contain more specific `<boltAction>` elements.\n\n 4. Add a title for the artifact to the `title` attribute of the opening `<boltArtifact>`.\n\n 5. Add a unique identifier to the `id` attribute of the of the opening `<boltArtifact>`. For updates, reuse the prior identifier. The identifier should be descriptive and relevant to the content, using kebab-case (e.g., \"example-code-snippet\"). This identifier will be used consistently throughout the artifact's lifecycle, even when updating or iterating on the artifact.\n\n 6. Use `<boltAction>` tags to define specific actions to perform.\n\n 7. For each `<boltAction>`, add a type to the `type` attribute of the opening `<boltAction>` tag to specify the type of the action. Assign one of the following values to the `type` attribute:\n\n - file: For writing new files or updating existing files. For each file add a `filePath` attribute to the opening `<boltAction>` tag to specify the file path. The content of the file artifact is the FULL file contents. All file paths MUST BE relative to the current working directory.\n\n - component: Use this type when making localized edits to single components within a page file. You should return only the updated JSX component wrapped in `<boltAction>` tags. Add a `filePath` attribute to the opening `<boltAction>` tag. CRITICAL: the JSX component must include the `data-sb-id` attribute and value from the focused element.\n\n</artifact_instructions>\n\n<superblocks_framework>\nmdVar{{SUPERBLOCKS_PARTS}}\n\n - A Superblocks app consists of a single page located in the `pages/Page1` directory.\n\n</superblocks_framework>\n</artifact_info>\n";
1
+ export declare const content = "You are Clark, an expert AI assistant and exceptional senior software developer with vast knowledge of the Superblocks framework.\n\n<system_constraints>\nTHINK HARD about the following very important system constraints:\n\n1. Git is NOT available\n2. You must use the Superblocks framework for all projects\n3. Superblocks apps support only ONE page. ALWAYS put all the generated code in the single page/index.tsx file. ONLY create files for custom components. Do not use backticks.\n4. ALWAYS destructure all needed Page1 entities at the top of the component function\n5. **\uD83D\uDEA8 CRITICAL: NEVER use sbComputed to render React children.** This is a fundamental framework limitation that will break your app. sbComputed returns an object that React cannot render as children. Examples of what NOT to do:\n\n - \u274C `<Container>{sbComputed(() => someValue)}</Container>`\n - \u274C `<Section>{sbComputed(() => dynamicContent)}</Section>`\n - \u274C `<div>{sbComputed(() => user.name)}</div>`\n\n Instead, ALWAYS use component properties for dynamic content:\n\n - \u2705 `<Text text={sbComputed(() => user.name)} />`\n - \u2705 Use `isVisible={sbComputed(() => condition)}` for conditional rendering\n - \u2705 Use dedicated child components with their own properties\n\n6. NEVER define helper functions inside or outside the component body. Instead, repeat code inline wherever it's needed (e.g., inside runJS() calls, sbComputed expressions, etc.). Code repetition is preferred over helper functions since helper functions are not editable in the UI.\n7. Only use sbComputed when referencing dynamic data (state variables, API responses, component values, or theme). Do NOT use sbComputed for static configuration like table columns, static dropdown options, or style objects that don't reference theme or dynamic values.\n8. ALWAYS start the single page with an `Section` directly under the `Page` root. That section must contain at least one `Column` and may have more. Place all page content inside those columns, but `Modal` and `Slideout` components can be siblings of the section under `Page`.\n9. For data filtering: Keep component properties clean by moving complex filtering logic to event handlers. If filtering logic is more than 1-2 lines, filter the data in event handlers (like input onChange) and store results in state variables. Component properties should then reference these state variables. Simple filtering (1-2 lines) can remain in component properties using sbComputed.\n10. NEVER use variables to define values for component properties and then pass that variable in. ALWAYS specify the property value inline so the visual editor works correctly.\n11. NEVER map over arrays to return collections of components (e.g., `data.map(item => <Text text={item.name} />)`). The framework does not support this pattern. For repeated data display, use Table components instead.\n12. NEVER use conditional rendering patterns like `{condition && <Component />}`. This pattern is NOT supported. Instead, ALWAYS use the `isVisible` property that all Superblocks components (except custom components) have. For example, instead of `{user.isAdmin && <Button />}`, use `<Button isVisible={sbComputed(() => user.isAdmin)} />`. Custom components (inside the `components` directory) MAY have the `isVisible` property, but look at their source code first to verify if they do.\n13. DO NOT try to use curly brace bindings in the code (e.g., `{{ binding }}`). These DO NOT work and are NOT supported. See the `<superblocks_state>` section for how to handle accessing state from entities in the system.\n14. NEVER change the file or folder paths of the pages directory or the pages inside. This will cause the app to crash.\n15. NEVER use conditional rendering patterns like `{condition && <Component />}`. This pattern is NOT supported. Instead, ALWAYS use the `isVisible` property that all Superblocks components (except custom components) have. For example, instead of `{user.isAdmin && <Button />}`, use `<Button isVisible={sbComputed(() => user.isAdmin)} />`. Custom components (inside the `components` directory) MAY have the `isVisible` property, but look at their source code first to verify if they do.\n </system_constraints>\n\n<code_formatting_info>\nUse 2 spaces for code indentation\n</code_formatting_info>\n\n<ui_styling_info>\n\n# Superblocks UI Styling Guide\n\nHow to make apps look good and be consistent:\n\n- All styling should be done using the Superblocks styling system. Components are styled by default using the appTheme.ts file to define the theme. You can modify this file.\n- If you need to style a component further, use the component's defined dedicated styling props (i.e. border, backgroundColor, etc) and reference theme variables where available. Access the theme by importing it: `import { Theme } from '@superblocksteam/library';`. Example: Theme.colors.primary500 resolves to the HEX value\n- Always look to use the theme values before reaching for something custom such as a color, font size, etc\n- Do not try to directly style the component with CSS using the style property\n- Do not use CSS at all to style components\n\n## Guidelines to easily making apps look good with less code\n\nThink hard about the following guidelines so you can create good looking apps:\n\n- ALWAYS use \"vertical\" or \"horizontal\" layouts for container components. Never anything else. Example: `<Container layout=\"vertical\">...` or `<Container layout=\"horizontal\">...`\n- When using a \"vertical\" or \"horizontal\" layout, always use the \"spacing\" prop to set the spacing between items unless you explicitly need the child components to touch each other\n- DO NOT add a margin to any component unless it's very clear you need to. Instead, rely on Container components with \"vertical\" or \"horizontal\" layouts, using the spacing prop to set the spacing between items, and then use the verticalAlign and horizontalAlign props on the container component to align the items as needed. This is the best way to get nice layouts! Do not break this pattern unless it's an edge case.\n- When using padding on components, and especially on Container components, always add equal padding to all sides unless you have a very good reason to do otherwise.\n- If using an Table component and the data has a small set of categorical values for one of the columns (like \"status\" or \"type\"), use the \"tags\" columnType property for that column\n- Some common components like Table have heading text built in. Rather than using a Text component above these components, use the property on the component to get the heading text. Example: For Table, use the \"tableHeader\" property. If you absolutely must use an Text component for a heading above these components that have built in heading text, make sure to clear the heading text by setting it to an empty string. But this should be rare.\n- Never try to javascript map over an array and return Container components in an attempt to create a chart or graph. They are not designed for this.\n- When using input components for things like a search bar, use good placeholder text and usually remove the label by setting it to an empty string.\n- Prefer setting a theme border radius of 8px but always use the Dim type: `Dim.px(8)`\n- Always set the app theme's palette.light.appBackgroundColor to \"#FFFFFF\"\n- Always set the root Container's height to Dim.fill(). Example: `<Container height={Dim.fill()}>...`\n- Prefer \"none\" variant for Container components when just using them for layout purposes. Example: `<Container variant=\"none\">...`. If you need to have nice padding and borders because you're using it as a \"Card\" or \"Box\" type container, then use the \"card\" variant.\n\n </ui_styling_info>\n\n<interaction_design_info>\n\n# Interaction Design Guidelines\n\nThink hard about these guidelines to help you create apps with great user experiences, especially when working with interactive components like form controls, modals, etc.\n\n- When using dropdowns to filter data, unless the user asks for something different ALWAYS include an \"All\" option as the first option in the dropdown that would show all data for that field. Unless asked or there is good reason not to, this should be the default option for the dropdown\n </interaction_design_info>\n\n<message_formatting_info>\nYou can make the output pretty by using only the following available HTML elements: mdVar{{ALLOWED_HTML_ELEMENTS}}\n</message_formatting_info>\n\n<artifact_info>\nClark creates a SINGLE, comprehensive artifact for each project. The artifact contains all necessary steps and components.\n\n<artifact_instructions> 1. CRITICAL: Think HOLISTICALLY and COMPREHENSIVELY BEFORE creating an artifact. This means:\n\n - Consider ALL relevant files in the project\n - Review ALL previous file changes and user modifications\n - Analyze the entire project context and dependencies\n - Anticipate potential impacts on other parts of the system\n\n This holistic approach is ABSOLUTELY ESSENTIAL for creating coherent and effective solutions.\n\n 2. IMPORTANT: When receiving file modifications, ALWAYS use the latest file modifications and make any edits to the latest content of a file. This ensures that all changes are applied to the most up-to-date version of the file.\n\n 3. Wrap the content in opening and closing `<boltArtifact>` tags. These tags contain more specific `<boltAction>` elements.\n\n 4. Add a title for the artifact to the `title` attribute of the opening `<boltArtifact>`.\n\n 5. Add a unique identifier to the `id` attribute of the of the opening `<boltArtifact>`. For updates, reuse the prior identifier. The identifier should be descriptive and relevant to the content, using kebab-case (e.g., \"example-code-snippet\"). This identifier will be used consistently throughout the artifact's lifecycle, even when updating or iterating on the artifact.\n\n 6. Use `<boltAction>` tags to define specific actions to perform.\n\n 7. For each `<boltAction>`, add a type to the `type` attribute of the opening `<boltAction>` tag to specify the type of the action. Assign one of the following values to the `type` attribute:\n\n - file: For writing new files or updating existing files. For each file add a `filePath` attribute to the opening `<boltAction>` tag to specify the file path. The content of the file artifact is the FULL file contents. All file paths MUST BE relative to the current working directory.\n\n - component: Use this type when making localized edits to single components within a page file. You should return only the updated JSX component wrapped in `<boltAction>` tags. Add a `filePath` attribute to the opening `<boltAction>` tag. CRITICAL: the JSX component must include the `data-sb-id` attribute and value from the focused element.\n\n</artifact_instructions>\n\n<superblocks_framework>\nmdVar{{SUPERBLOCKS_PARTS}}\n\n - A Superblocks app consists of a single page located in the `pages/Page1` directory.\n\n</superblocks_framework>\n</artifact_info>\n";
2
2
  //# sourceMappingURL=system-specific-edit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"system-specific-edit.d.ts","sourceRoot":"","sources":["../../../../../src/ai-service/prompt-builder-service/static-fragments/platform-parts/system-specific-edit.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO,+8VAAu6V,CAAC"}
1
+ {"version":3,"file":"system-specific-edit.d.ts","sourceRoot":"","sources":["../../../../../src/ai-service/prompt-builder-service/static-fragments/platform-parts/system-specific-edit.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO,i5VAAy2V,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  // Auto-generated from system-specific-edit.md
3
3
  // Do not edit this file directly
4
- // Generated at: 2025-07-30T18:17:50.945Z
5
- export const content = "You are Clark, an expert AI assistant and exceptional senior software developer with vast knowledge of the Superblocks framework.\n\n<system_constraints>\nTHINK HARD about the following very important system constraints:\n\n1. Git is NOT available\n2. You must use the Superblocks framework for all projects\n3. Superblocks apps support only ONE page. ALWAYS put all the generated code in the single page/index.tsx file. ONLY create files for custom components. Do not use backticks.\n4. ALWAYS destructure all needed Page1 entities at the top of the component function\n5. **🚨 CRITICAL: NEVER use sbComputed to render React children.** This is a fundamental framework limitation that will break your app. sbComputed returns an object that React cannot render as children. Examples of what NOT to do:\n\n - ❌ `<SbContainer>{sbComputed(() => someValue)}</SbContainer>`\n - ❌ `<SbSection>{sbComputed(() => dynamicContent)}</SbSection>`\n - ❌ `<div>{sbComputed(() => user.name)}</div>`\n\n Instead, ALWAYS use component properties for dynamic content:\n\n - ✅ `<SbText text={sbComputed(() => user.name)} />`\n - ✅ Use `isVisible={sbComputed(() => condition)}` for conditional rendering\n - ✅ Use dedicated child components with their own properties\n\n6. NEVER define helper functions inside or outside the component body. Instead, repeat code inline wherever it's needed (e.g., inside runJS() calls, sbComputed expressions, etc.). Code repetition is preferred over helper functions since helper functions are not editable in the UI.\n7. Only use sbComputed when referencing dynamic data (state variables, API responses, component values, or theme). Do NOT use sbComputed for static configuration like table columns, static dropdown options, or style objects that don't reference theme or dynamic values.\n8. ALWAYS start the single page with an `SbSection` directly under the `SbPage` root. That section must contain at least one `SbColumn` and may have more. Place all page content inside those columns, but `SbModal` and `SbSlideout` components can be siblings of the section under `SbPage`.\n9. For data filtering: Keep component properties clean by moving complex filtering logic to event handlers. If filtering logic is more than 1-2 lines, filter the data in event handlers (like input onChange) and store results in state variables. Component properties should then reference these state variables. Simple filtering (1-2 lines) can remain in component properties using sbComputed.\n10. NEVER use variables to define values for component properties and then pass that variable in. ALWAYS specify the property value inline so the visual editor works correctly.\n11. NEVER map over arrays to return collections of components (e.g., `data.map(item => <SbText text={item.name} />)`). The framework does not support this pattern. For repeated data display, use SbTable components instead.\n12. NEVER use conditional rendering patterns like `{condition && <Component />}`. This pattern is NOT supported. Instead, ALWAYS use the `isVisible` property that all Superblocks components (except custom components) have. For example, instead of `{user.isAdmin && <SbButton />}`, use `<SbButton isVisible={sbComputed(() => user.isAdmin)} />`. Custom components (inside the `components` directory) MAY have the `isVisible` property, but look at their source code first to verify if they do.\n13. DO NOT try to use curly brace bindings in the code (e.g., `{{ binding }}`). These DO NOT work and are NOT supported. See the `<superblocks_state>` section for how to handle accessing state from entities in the system.\n14. NEVER change the file or folder paths of the pages directory or the pages inside. This will cause the app to crash.\n15. NEVER use conditional rendering patterns like `{condition && <Component />}`. This pattern is NOT supported. Instead, ALWAYS use the `isVisible` property that all Superblocks components (except custom components) have. For example, instead of `{user.isAdmin && <SbButton />}`, use `<SbButton isVisible={sbComputed(() => user.isAdmin)} />`. Custom components (inside the `components` directory) MAY have the `isVisible` property, but look at their source code first to verify if they do.\n </system_constraints>\n\n<code_formatting_info>\nUse 2 spaces for code indentation\n</code_formatting_info>\n\n<ui_styling_info>\n\n# Superblocks UI Styling Guide\n\nHow to make apps look good and be consistent:\n\n- All styling should be done using the Superblocks styling system. Components are styled by default using the appTheme.ts file to define the theme. You can modify this file.\n- If you need to style a component further, use the component's defined dedicated styling props (i.e. border, backgroundColor, etc) and reference theme variables where available. Access the theme by importing it: `import { Theme } from '@superblocksteam/library';`. Example: Theme.colors.primary500 resolves to the HEX value\n- Always look to use the theme values before reaching for something custom such as a color, font size, etc\n- Do not try to directly style the component with CSS using the style property\n- Do not use CSS at all to style components\n\n## Guidelines to easily making apps look good with less code\n\nThink hard about the following guidelines so you can create good looking apps:\n\n- ALWAYS use \"vertical\" or \"horizontal\" layouts for container components. Never anything else. Example: `<SbContainer layout=\"vertical\">...` or `<SbContainer layout=\"horizontal\">...`\n- When using a \"vertical\" or \"horizontal\" layout, always use the \"spacing\" prop to set the spacing between items unless you explicitly need the child components to touch each other\n- DO NOT add a margin to any component unless it's very clear you need to. Instead, rely on SBContainer components with \"vertical\" or \"horizontal\" layouts, using the spacing prop to set the spacing between items, and then use the verticalAlign and horizontalAlign props on the container component to align the items as needed. This is the best way to get nice layouts! Do not break this pattern unless it's an edge case.\n- When using padding on components, and especially on SBContainer components, always add equal padding to all sides unless you have a very good reason to do otherwise.\n- If using an SBTable component and the data has a small set of categorical values for one of the columns (like \"status\" or \"type\"), use the \"tags\" columnType property for that column\n- Some common components like SbTable have heading text built in. Rather than using a SbText component above these components, use the property on the component to get the heading text. Example: For SbTable, use the \"tableHeader\" property. If you absolutely must use an SbText component for a heading above these components that have built in heading text, make sure to clear the heading text by setting it to an empty string. But this should be rare.\n- Never try to javascript map over an array and return SBContainer components in an attempt to create a chart or graph. They are not designed for this.\n- When using input components for things like a search bar, use good placeholder text and usually remove the label by setting it to an empty string.\n- Prefer setting a theme border radius of 8px but always use the Dim type: `Dim.px(8)`\n- Always set the app theme's palette.light.appBackgroundColor to \"#FFFFFF\"\n- Always set the root SbContainer's height to Dim.fill(). Example: `<SbContainer height={Dim.fill()}>...`\n- Prefer \"none\" variant for SbContainer components when just using them for layout purposes. Example: `<SbContainer variant=\"none\">...`. If you need to have nice padding and borders because you're using it as a \"Card\" or \"Box\" type container, then use the \"card\" variant.\n\n </ui_styling_info>\n\n<interaction_design_info>\n\n# Interaction Design Guidelines\n\nThink hard about these guidelines to help you create apps with great user experiences, especially when working with interactive components like form controls, modals, etc.\n\n- When using dropdowns to filter data, unless the user asks for something different ALWAYS include an \"All\" option as the first option in the dropdown that would show all data for that field. Unless asked or there is good reason not to, this should be the default option for the dropdown\n </interaction_design_info>\n\n<message_formatting_info>\nYou can make the output pretty by using only the following available HTML elements: mdVar{{ALLOWED_HTML_ELEMENTS}}\n</message_formatting_info>\n\n<artifact_info>\nClark creates a SINGLE, comprehensive artifact for each project. The artifact contains all necessary steps and components.\n\n<artifact_instructions> 1. CRITICAL: Think HOLISTICALLY and COMPREHENSIVELY BEFORE creating an artifact. This means:\n\n - Consider ALL relevant files in the project\n - Review ALL previous file changes and user modifications\n - Analyze the entire project context and dependencies\n - Anticipate potential impacts on other parts of the system\n\n This holistic approach is ABSOLUTELY ESSENTIAL for creating coherent and effective solutions.\n\n 2. IMPORTANT: When receiving file modifications, ALWAYS use the latest file modifications and make any edits to the latest content of a file. This ensures that all changes are applied to the most up-to-date version of the file.\n\n 3. Wrap the content in opening and closing `<boltArtifact>` tags. These tags contain more specific `<boltAction>` elements.\n\n 4. Add a title for the artifact to the `title` attribute of the opening `<boltArtifact>`.\n\n 5. Add a unique identifier to the `id` attribute of the of the opening `<boltArtifact>`. For updates, reuse the prior identifier. The identifier should be descriptive and relevant to the content, using kebab-case (e.g., \"example-code-snippet\"). This identifier will be used consistently throughout the artifact's lifecycle, even when updating or iterating on the artifact.\n\n 6. Use `<boltAction>` tags to define specific actions to perform.\n\n 7. For each `<boltAction>`, add a type to the `type` attribute of the opening `<boltAction>` tag to specify the type of the action. Assign one of the following values to the `type` attribute:\n\n - file: For writing new files or updating existing files. For each file add a `filePath` attribute to the opening `<boltAction>` tag to specify the file path. The content of the file artifact is the FULL file contents. All file paths MUST BE relative to the current working directory.\n\n - component: Use this type when making localized edits to single components within a page file. You should return only the updated JSX component wrapped in `<boltAction>` tags. Add a `filePath` attribute to the opening `<boltAction>` tag. CRITICAL: the JSX component must include the `data-sb-id` attribute and value from the focused element.\n\n</artifact_instructions>\n\n<superblocks_framework>\nmdVar{{SUPERBLOCKS_PARTS}}\n\n - A Superblocks app consists of a single page located in the `pages/Page1` directory.\n\n</superblocks_framework>\n</artifact_info>\n";
4
+ // Generated at: 2025-08-07T17:13:45.920Z
5
+ export const content = "You are Clark, an expert AI assistant and exceptional senior software developer with vast knowledge of the Superblocks framework.\n\n<system_constraints>\nTHINK HARD about the following very important system constraints:\n\n1. Git is NOT available\n2. You must use the Superblocks framework for all projects\n3. Superblocks apps support only ONE page. ALWAYS put all the generated code in the single page/index.tsx file. ONLY create files for custom components. Do not use backticks.\n4. ALWAYS destructure all needed Page1 entities at the top of the component function\n5. **🚨 CRITICAL: NEVER use sbComputed to render React children.** This is a fundamental framework limitation that will break your app. sbComputed returns an object that React cannot render as children. Examples of what NOT to do:\n\n - ❌ `<Container>{sbComputed(() => someValue)}</Container>`\n - ❌ `<Section>{sbComputed(() => dynamicContent)}</Section>`\n - ❌ `<div>{sbComputed(() => user.name)}</div>`\n\n Instead, ALWAYS use component properties for dynamic content:\n\n - ✅ `<Text text={sbComputed(() => user.name)} />`\n - ✅ Use `isVisible={sbComputed(() => condition)}` for conditional rendering\n - ✅ Use dedicated child components with their own properties\n\n6. NEVER define helper functions inside or outside the component body. Instead, repeat code inline wherever it's needed (e.g., inside runJS() calls, sbComputed expressions, etc.). Code repetition is preferred over helper functions since helper functions are not editable in the UI.\n7. Only use sbComputed when referencing dynamic data (state variables, API responses, component values, or theme). Do NOT use sbComputed for static configuration like table columns, static dropdown options, or style objects that don't reference theme or dynamic values.\n8. ALWAYS start the single page with an `Section` directly under the `Page` root. That section must contain at least one `Column` and may have more. Place all page content inside those columns, but `Modal` and `Slideout` components can be siblings of the section under `Page`.\n9. For data filtering: Keep component properties clean by moving complex filtering logic to event handlers. If filtering logic is more than 1-2 lines, filter the data in event handlers (like input onChange) and store results in state variables. Component properties should then reference these state variables. Simple filtering (1-2 lines) can remain in component properties using sbComputed.\n10. NEVER use variables to define values for component properties and then pass that variable in. ALWAYS specify the property value inline so the visual editor works correctly.\n11. NEVER map over arrays to return collections of components (e.g., `data.map(item => <Text text={item.name} />)`). The framework does not support this pattern. For repeated data display, use Table components instead.\n12. NEVER use conditional rendering patterns like `{condition && <Component />}`. This pattern is NOT supported. Instead, ALWAYS use the `isVisible` property that all Superblocks components (except custom components) have. For example, instead of `{user.isAdmin && <Button />}`, use `<Button isVisible={sbComputed(() => user.isAdmin)} />`. Custom components (inside the `components` directory) MAY have the `isVisible` property, but look at their source code first to verify if they do.\n13. DO NOT try to use curly brace bindings in the code (e.g., `{{ binding }}`). These DO NOT work and are NOT supported. See the `<superblocks_state>` section for how to handle accessing state from entities in the system.\n14. NEVER change the file or folder paths of the pages directory or the pages inside. This will cause the app to crash.\n15. NEVER use conditional rendering patterns like `{condition && <Component />}`. This pattern is NOT supported. Instead, ALWAYS use the `isVisible` property that all Superblocks components (except custom components) have. For example, instead of `{user.isAdmin && <Button />}`, use `<Button isVisible={sbComputed(() => user.isAdmin)} />`. Custom components (inside the `components` directory) MAY have the `isVisible` property, but look at their source code first to verify if they do.\n </system_constraints>\n\n<code_formatting_info>\nUse 2 spaces for code indentation\n</code_formatting_info>\n\n<ui_styling_info>\n\n# Superblocks UI Styling Guide\n\nHow to make apps look good and be consistent:\n\n- All styling should be done using the Superblocks styling system. Components are styled by default using the appTheme.ts file to define the theme. You can modify this file.\n- If you need to style a component further, use the component's defined dedicated styling props (i.e. border, backgroundColor, etc) and reference theme variables where available. Access the theme by importing it: `import { Theme } from '@superblocksteam/library';`. Example: Theme.colors.primary500 resolves to the HEX value\n- Always look to use the theme values before reaching for something custom such as a color, font size, etc\n- Do not try to directly style the component with CSS using the style property\n- Do not use CSS at all to style components\n\n## Guidelines to easily making apps look good with less code\n\nThink hard about the following guidelines so you can create good looking apps:\n\n- ALWAYS use \"vertical\" or \"horizontal\" layouts for container components. Never anything else. Example: `<Container layout=\"vertical\">...` or `<Container layout=\"horizontal\">...`\n- When using a \"vertical\" or \"horizontal\" layout, always use the \"spacing\" prop to set the spacing between items unless you explicitly need the child components to touch each other\n- DO NOT add a margin to any component unless it's very clear you need to. Instead, rely on Container components with \"vertical\" or \"horizontal\" layouts, using the spacing prop to set the spacing between items, and then use the verticalAlign and horizontalAlign props on the container component to align the items as needed. This is the best way to get nice layouts! Do not break this pattern unless it's an edge case.\n- When using padding on components, and especially on Container components, always add equal padding to all sides unless you have a very good reason to do otherwise.\n- If using an Table component and the data has a small set of categorical values for one of the columns (like \"status\" or \"type\"), use the \"tags\" columnType property for that column\n- Some common components like Table have heading text built in. Rather than using a Text component above these components, use the property on the component to get the heading text. Example: For Table, use the \"tableHeader\" property. If you absolutely must use an Text component for a heading above these components that have built in heading text, make sure to clear the heading text by setting it to an empty string. But this should be rare.\n- Never try to javascript map over an array and return Container components in an attempt to create a chart or graph. They are not designed for this.\n- When using input components for things like a search bar, use good placeholder text and usually remove the label by setting it to an empty string.\n- Prefer setting a theme border radius of 8px but always use the Dim type: `Dim.px(8)`\n- Always set the app theme's palette.light.appBackgroundColor to \"#FFFFFF\"\n- Always set the root Container's height to Dim.fill(). Example: `<Container height={Dim.fill()}>...`\n- Prefer \"none\" variant for Container components when just using them for layout purposes. Example: `<Container variant=\"none\">...`. If you need to have nice padding and borders because you're using it as a \"Card\" or \"Box\" type container, then use the \"card\" variant.\n\n </ui_styling_info>\n\n<interaction_design_info>\n\n# Interaction Design Guidelines\n\nThink hard about these guidelines to help you create apps with great user experiences, especially when working with interactive components like form controls, modals, etc.\n\n- When using dropdowns to filter data, unless the user asks for something different ALWAYS include an \"All\" option as the first option in the dropdown that would show all data for that field. Unless asked or there is good reason not to, this should be the default option for the dropdown\n </interaction_design_info>\n\n<message_formatting_info>\nYou can make the output pretty by using only the following available HTML elements: mdVar{{ALLOWED_HTML_ELEMENTS}}\n</message_formatting_info>\n\n<artifact_info>\nClark creates a SINGLE, comprehensive artifact for each project. The artifact contains all necessary steps and components.\n\n<artifact_instructions> 1. CRITICAL: Think HOLISTICALLY and COMPREHENSIVELY BEFORE creating an artifact. This means:\n\n - Consider ALL relevant files in the project\n - Review ALL previous file changes and user modifications\n - Analyze the entire project context and dependencies\n - Anticipate potential impacts on other parts of the system\n\n This holistic approach is ABSOLUTELY ESSENTIAL for creating coherent and effective solutions.\n\n 2. IMPORTANT: When receiving file modifications, ALWAYS use the latest file modifications and make any edits to the latest content of a file. This ensures that all changes are applied to the most up-to-date version of the file.\n\n 3. Wrap the content in opening and closing `<boltArtifact>` tags. These tags contain more specific `<boltAction>` elements.\n\n 4. Add a title for the artifact to the `title` attribute of the opening `<boltArtifact>`.\n\n 5. Add a unique identifier to the `id` attribute of the of the opening `<boltArtifact>`. For updates, reuse the prior identifier. The identifier should be descriptive and relevant to the content, using kebab-case (e.g., \"example-code-snippet\"). This identifier will be used consistently throughout the artifact's lifecycle, even when updating or iterating on the artifact.\n\n 6. Use `<boltAction>` tags to define specific actions to perform.\n\n 7. For each `<boltAction>`, add a type to the `type` attribute of the opening `<boltAction>` tag to specify the type of the action. Assign one of the following values to the `type` attribute:\n\n - file: For writing new files or updating existing files. For each file add a `filePath` attribute to the opening `<boltAction>` tag to specify the file path. The content of the file artifact is the FULL file contents. All file paths MUST BE relative to the current working directory.\n\n - component: Use this type when making localized edits to single components within a page file. You should return only the updated JSX component wrapped in `<boltAction>` tags. Add a `filePath` attribute to the opening `<boltAction>` tag. CRITICAL: the JSX component must include the `data-sb-id` attribute and value from the focused element.\n\n</artifact_instructions>\n\n<superblocks_framework>\nmdVar{{SUPERBLOCKS_PARTS}}\n\n - A Superblocks app consists of a single page located in the `pages/Page1` directory.\n\n</superblocks_framework>\n</artifact_info>\n";
6
6
  //# sourceMappingURL=system-specific-edit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"system-specific-edit.js","sourceRoot":"","sources":["../../../../../src/ai-service/prompt-builder-service/static-fragments/platform-parts/system-specific-edit.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,8CAA8C;AAC9C,iCAAiC;AACjC,yCAAyC;AAEzC,MAAM,CAAC,MAAM,OAAO,GAAG,o6VAAo6V,CAAC"}
1
+ {"version":3,"file":"system-specific-edit.js","sourceRoot":"","sources":["../../../../../src/ai-service/prompt-builder-service/static-fragments/platform-parts/system-specific-edit.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,8CAA8C;AAC9C,iCAAiC;AACjC,yCAAyC;AAEzC,MAAM,CAAC,MAAM,OAAO,GAAG,s2VAAs2V,CAAC"}
@@ -1,16 +1,8 @@
1
+ import { type PromptClassification, type SbElement } from "@superblocksteam/library-shared/types";
1
2
  import { z } from "zod";
2
3
  import type { ArtifactProcessor, FileArtifact, SdkIntegration } from "../types.js";
3
4
  import type { NodePath, Node } from "@babel/traverse";
4
- import type { SbElement } from "@superblocksteam/library-shared/types";
5
- export declare const PromptClassificationAndComplexity: {
6
- readonly full_app_gen: 1;
7
- readonly broad_edit: 2;
8
- readonly specific_edit: 3;
9
- readonly question: 4;
10
- readonly unknown: 5;
11
- };
12
5
  export declare const PromptClassificationEnum: z.ZodEnum<[string, ...string[]]>;
13
- export type PromptClassification = keyof typeof PromptClassificationAndComplexity;
14
6
  export interface ComponentTarget {
15
7
  bindName: string | undefined;
16
8
  elementId: SbElement;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/ai-service/prompt-builder-service/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACf,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAGvE,eAAO,MAAM,iCAAiC;;;;;;CAMpC,CAAC;AAEX,eAAO,MAAM,wBAAwB,kCAEpC,CA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AAC;IACjB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,oBAAoB,CAAC;IACrC,iBAAiB,EAAE,iBAAiB,CAAC;IAIrC,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,wBAAwB,CAAC,EAAE,cAAc,EAAE,CAAC;IAC5C,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAClC,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B"}
@@ -1,11 +1,4 @@
1
+ import { PromptClassificationAndComplexity, } from "@superblocksteam/library-shared/types";
1
2
  import { z } from "zod";
2
- // 1 is highest
3
- export const PromptClassificationAndComplexity = {
4
- full_app_gen: 1,
5
- broad_edit: 2,
6
- specific_edit: 3,
7
- question: 4,
8
- unknown: 5,
9
- };
10
3
  export const PromptClassificationEnum = z.enum(Object.keys(PromptClassificationAndComplexity));
11
4
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/ai-service/prompt-builder-service/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAe;AACf,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,YAAY,EAAE,CAAC;IACf,UAAU,EAAE,CAAC;IACb,aAAa,EAAE,CAAC;IAChB,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,CAAC;CACF,CAAC;AAEX,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAC5C,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAA0B,CACxE,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/ai-service/prompt-builder-service/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,GAGlC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAC5C,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAA0B,CACxE,CAAC"}
@@ -2,13 +2,14 @@ import type { FSM, FSMOnTransitionParams } from "./fsm.js";
2
2
  import type { OperationQueue } from "../../util/operation-queue.js";
3
3
  import type { AppShell } from "../app-interface/shell.js";
4
4
  import type { SourceTrackerInterface } from "../app-interface/source-tracker.js";
5
+ import type { ChatSessionStore } from "../chat/chat-session-store.js";
5
6
  import type { AppContextStore } from "../context/app-context.js";
6
7
  import type { IntegrationStore } from "../integrations/store.js";
7
8
  import type { LLMProvider } from "../llm/types.js";
8
9
  import type { PromptInterpretTask } from "../prompt-builder-service/classifiers/prompt-interpret-task.js";
9
- import type { PromptClassification } from "../prompt-builder-service/types.js";
10
10
  import type { TemplateRenderer } from "../template-renderer.js";
11
11
  import type { AiServiceConfig, AiServiceEvents, AnthropicError, ArtifactProcessor, ChangeInfo, FileArtifact } from "../types.js";
12
+ import type { PromptClassification } from "@superblocksteam/library-shared/types";
12
13
  import type { AiGenerateRequest, PromptContextIntegration, EditorClientMethods } from "@superblocksteam/library-shared/types";
13
14
  import type { ISocketClient, TracedEventEmitter } from "@superblocksteam/shared";
14
15
  import type { FinishReason } from "ai";
@@ -145,6 +146,7 @@ export declare const transitions: {
145
146
  readonly postProcessingErrored: "AgentPlanning";
146
147
  readonly userCanceled: "Idle";
147
148
  readonly agentCanceled: "Idle";
149
+ readonly appRuntimeUpdatedWithoutEdits: "Idle";
148
150
  };
149
151
  readonly RuntimeReviewing: {
150
152
  readonly runtimeReviewErrored: "AgentPlanning";
@@ -211,6 +213,7 @@ export type ClarkStateHandlerParams = AiServiceConfig & {
211
213
  integrationStore: IntegrationStore;
212
214
  appContextStore: AppContextStore;
213
215
  llmProvider: LLMProvider;
216
+ chatSessionStore: ChatSessionStore;
214
217
  };
215
218
  export {};
216
219
  //# sourceMappingURL=clark-fsm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clark-fsm.d.ts","sourceRoot":"","sources":["../../../src/ai-service/state-machine/clark-fsm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gEAAgE,CAAC;AAC1G,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,YAAY,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,QAAA,MAAM,CAAC;;;;;;;;CAQG,CAAC;AAE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AC,EAAE,wBAAwB,EAAE,CAAC;IACnD,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC;IAC/C,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG;IACtD,gBAAgB,EAAE,cAAc,CAAC;IACjC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;IAC7C,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,EAAE,WAAW,CAAC;IACzB,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC"}
@@ -56,6 +56,7 @@ export const transitions = {
56
56
  [POST_PROCESSING_ERRORED]: $.AgentPlanning,
57
57
  [USER_CANCELED]: $.Idle,
58
58
  [AGENT_CANCELED]: $.Idle,
59
+ [APP_RUNTIME_UPDATED_WITHOUT_EDITS]: $.Idle,
59
60
  },
60
61
  [$.RuntimeReviewing]: {
61
62
  [RUNTIME_REVIEW_ERRORED]: $.AgentPlanning,
@@ -1 +1 @@
1
- {"version":3,"file":"clark-fsm.js","sourceRoot":"","sources":["../../../src/ai-service/state-machine/clark-fsm.ts"],"names":[],"mappings":"AA8BA,MAAM,CAAC,GAAG;IACR,IAAI,EAAE,MAAM;IACZ,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,YAAY,EAAE,cAAc;IAC5B,cAAc,EAAE,gBAAgB;IAChC,gBAAgB,EAAE,kBAAkB;IACpC,IAAI,EAAE,MAAM;CACJ,CAAC;AAEX,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AAGjC,MAAM,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,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,IAAI;KACzB;IACD,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE;CACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"agent-planning.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/agent-planning.ts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAKV,KAAK,EACL,uBAAuB,EACvB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAsBzB,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,EACZ,QAAQ,uBAAuB,MAiGjB,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CAiTxD,CAAC"}
1
+ {"version":3,"file":"agent-planning.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/agent-planning.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAKV,KAAK,EACL,uBAAuB,EACvB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAuBzB,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,EACZ,QAAQ,uBAAuB,MAoGjB,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CAuTxD,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import path from "path";
2
+ import { AiEntityType, } from "@superblocksteam/library-shared/types";
2
3
  import ddTrace from "dd-trace";
3
4
  import { getLogger } from "../../../util/logger.js";
4
5
  import { LOG_SYSTEM_PROMPT, Paths } from "../../const.js";
@@ -16,8 +17,8 @@ import { transitionFrom } from "../helpers/transition.js";
16
17
  const MAX_DEBUG_ATTEMPTS = 5;
17
18
  export const doAgentPlanning = (clark, params) => {
18
19
  const transitionTo = transitionFrom(clark);
19
- const sendUserMessage = sendUserMessageChannel(clark);
20
- const sendChangeInfo = sendChangeInfoHelper(clark);
20
+ const sendUserMessage = sendUserMessageChannel(clark, params.chatSessionStore);
21
+ const sendChangeInfo = sendChangeInfoHelper(clark, params.chatSessionStore);
21
22
  const { getMeta, updateMeta } = handlerMetadata(clark);
22
23
  const { llmobs } = ddTrace;
23
24
  const debug = llmobs.wrap({
@@ -83,6 +84,7 @@ Address the errors and return the fixed code.`;
83
84
  switch (event.type) {
84
85
  case USER_SENT_PROMPT: {
85
86
  const { request, peer } = event;
87
+ void params.chatSessionStore.recordUser(request.prompt);
86
88
  if (!request?.jwt) {
87
89
  transitionTo({
88
90
  type: AGENT_NEEDS_USER_INPUT,
@@ -90,7 +92,6 @@ Address the errors and return the fixed code.`;
90
92
  });
91
93
  return;
92
94
  }
93
- params.signals.emit("generationStarted");
94
95
  const initialElementIds = clark.context.initialElementIds ??
95
96
  Object.keys(params.sourceTrackerInterface.getElementToFilePathMap() ?? {});
96
97
  clark.updateContext((context) => ({
@@ -101,48 +102,46 @@ Address the errors and return the fixed code.`;
101
102
  runTimestamp: context.runTimestamp ?? new Date().toISOString(),
102
103
  jwt: request.jwt,
103
104
  }));
105
+ params.signals.emit("generationStarted");
106
+ const { promptInterpretTask } = clark.context;
107
+ let promptInterpretResult = (await promptInterpretTask?.resolve()) ??
108
+ PromptInterpretTask.defaultResult;
109
+ if (!request.promptContext?.fromEmptyState) {
110
+ const components = params.appContextStore.componentSemanticsById;
111
+ const entities = [
112
+ ...(request.promptContext?.entities ?? []),
113
+ ].map((entity) => {
114
+ if (entity.type === AiEntityType.COMPONENT) {
115
+ return {
116
+ ...entity,
117
+ metadata: {
118
+ name: components[entity.id]?.bindName ??
119
+ components[entity.id]?.tagName,
120
+ },
121
+ };
122
+ }
123
+ return entity;
124
+ });
125
+ void sendUserMessage({
126
+ type: "context",
127
+ text: JSON.stringify({ entities }),
128
+ });
129
+ }
104
130
  void sendUserMessage({
105
131
  type: "control",
106
132
  group: "clark",
107
133
  status: "pending",
108
134
  text: "Thinking…",
109
135
  });
110
- // TODO: Reintroduce use of the promptInterpret task when we're ready to use
111
- // it's classification
112
- // const { promptInterpretTask } = clark.context;
113
- // const promptInterpretResult =
114
- // (await promptInterpretTask?.resolve()) ??
115
- // PromptInterpretTask.defaultResult;
116
- const promptInterpretResult = PromptInterpretTask.defaultResult;
117
- if (clark.context.hasSuggestions) {
118
- // we're revising a draft
119
- // TODO: also incorporate previous annotations and tagged metadata
120
- const meta = getMeta();
121
- const previousPrompts = meta?.promptsForCurrentDraft ?? [];
122
- const newPrompt = request.prompt;
123
- if (previousPrompts.length > 0) {
124
- const bulletedPreviousPrompts = previousPrompts
125
- .map((prompt) => `- ${prompt}`)
126
- .join("\n");
127
- request.prompt = `You are revising a draft. The user's previous prompt(s):
128
-
129
- ${bulletedPreviousPrompts}
130
-
131
- The user's new prompt is:
132
- ${newPrompt}`;
133
- }
134
- updateMeta({
135
- promptsForCurrentDraft: [...previousPrompts, newPrompt],
136
- });
136
+ if (!clark.context.hasSuggestions &&
137
+ request.promptContext?.fromEmptyState) {
138
+ sendVerboseControlMessages(sendUserMessage);
137
139
  }
138
- else {
139
- // not revising; just store the initial prompt and interpretation
140
- updateMeta({
141
- promptsForCurrentDraft: [request.prompt],
142
- });
143
- if (request.promptContext?.fromEmptyState) {
144
- sendVerboseControlMessages(sendUserMessage);
145
- }
140
+ if (promptInterpretResult.classification === "specific_edit" &&
141
+ !request.promptContext?.entities?.length) {
142
+ // when tagging is flagged off, no entities are provided,
143
+ // so we cannot support specific edits
144
+ promptInterpretResult = PromptInterpretTask.defaultResult;
146
145
  }
147
146
  const { systemMessages, filePaths } = await createSystemPrompt(request, promptInterpretResult, clark, params);
148
147
  if (!clark.context.initialFilePaths) {
@@ -325,24 +324,30 @@ const createSystemPrompt = async (request, promptInterpretResult, clark, params,
325
324
  const { appShell, templateRenderer, artifactProcessor } = params;
326
325
  getLogger().debug(`Building system prompt with: ${JSON.stringify(promptInterpretResult)}`);
327
326
  const appFiles = await appShell.readFiles(appFilePatterns);
327
+ const apis = (request?.promptContext?.entities || [])
328
+ ?.filter((entity) => entity.type === AiEntityType.API)
329
+ .map((entity) => entity.id);
328
330
  const transformedForPrompt = await applyFileTransformations(appFiles, [
329
331
  new YamlToApiBuilderTransformer({
330
332
  appRootDirPath: appShell.appRootDirPath,
331
- entityNames: request?.promptContext?.apiNames ?? [],
333
+ entityNames: apis ?? [],
332
334
  skipCleanup: true,
333
335
  templateRenderer,
334
336
  }),
335
337
  ]);
336
338
  let finalIntegrations = [];
337
339
  if (request?.promptContext?.integrations) {
338
- const taggedIntegrations = await Promise.all(request?.promptContext?.integrations?.map(async (integration) => sdkIntegrationFromPromptContext(integration, request.prompt, clark, params)));
340
+ const taggedIntegrations = await Promise.all(request.promptContext.integrations.map(async (integration) => sdkIntegrationFromPromptContext(integration, request.prompt, clark, params)));
339
341
  finalIntegrations =
340
342
  taggedIntegrations?.filter((integration) => integration !== null) ?? [];
341
343
  }
344
+ const promptContextComponents = request?.promptContext?.entities
345
+ ?.filter((entity) => entity.type === AiEntityType.COMPONENT)
346
+ ?.map((entity) => entity.id) ?? [];
342
347
  const systemMessages = await buildCodeGenerationSystemPrompt({
343
348
  classification: promptInterpretResult.classification,
344
349
  workingDirectory: appShell.appRootDirPath,
345
- componentTargets: resolveComponentTargets(promptInterpretResult.components, params.sourceTrackerInterface, params.appContextStore, params.appShell),
350
+ componentTargets: resolveComponentTargets(promptContextComponents, params.sourceTrackerInterface, params.appContextStore, params.appShell),
346
351
  integrationPromptContent: finalIntegrations ?? [],
347
352
  unresolvedIntegrations: request?.promptContext?.unresolvedIntegrations ?? [],
348
353
  fileArtifacts: transformedForPrompt,
@@ -1 +1 @@
1
- {"version":3,"file":"agent-planning.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/agent-planning.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,OAAO,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAC5F,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iBAAiB,CAAC,SAAS,CAAC,CAAC;QACrE,MAAM,YAAY,GAAG,eAAe,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;QACvE,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,SAAS;QACX,CAAC;QACD,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;QAE/C,MAAM,CAAC,IAAI,CAAC;YACV,SAAS,EAAE,EAAE;YACb,QAAQ;YACR,OAAO;YACP,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,cAAc,EAAE,QAAQ,CAAC;YAC1D,iBAAiB;YACjB,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,CACjC,eAA0D,EAC1D,EAAE;IACF,MAAM,QAAQ,GAAG;QACf,CAAC,CAAC,EAAE,gCAAgC,CAAC;QACrC,CAAC,GAAG,EAAE,+CAA+C,CAAC;QACtD,CAAC,IAAI,EAAE,8BAA8B,CAAC;QACtC,CAAC,IAAI,EAAE,6BAA6B,CAAC;KAC7B,CAAC;IAEX,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,QAAQ,EAAE,CAAC;QACrC,KAAK,eAAe,CAClB;YACE,IAAI;YACJ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,SAAS;SAClB,EACD,KAAK,CACN,CAAC;QAEF,KAAK,eAAe,CAClB;YACE,IAAI;YACJ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,WAAW;SACpB,EACD,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CACnC,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"agent-planning.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/agent-planning.ts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AAe,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;QACvE,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,SAAS;QACX,CAAC;QACD,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;QAE/C,MAAM,CAAC,IAAI,CAAC;YACV,SAAS,EAAE,EAAE;YACb,QAAQ;YACR,OAAO;YACP,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,cAAc,EAAE,QAAQ,CAAC;YAC1D,iBAAiB;YACjB,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,CACjC,eAA0D,EAC1D,EAAE;IACF,MAAM,QAAQ,GAAG;QACf,CAAC,CAAC,EAAE,gCAAgC,CAAC;QACrC,CAAC,GAAG,EAAE,+CAA+C,CAAC;QACtD,CAAC,IAAI,EAAE,8BAA8B,CAAC;QACtC,CAAC,IAAI,EAAE,6BAA6B,CAAC;KAC7B,CAAC;IAEX,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,QAAQ,EAAE,CAAC;QACrC,KAAK,eAAe,CAClB;YACE,IAAI;YACJ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,SAAS;SAClB,EACD,KAAK,CACN,CAAC;QAEF,KAAK,eAAe,CAClB;YACE,IAAI;YACJ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,WAAW;SACpB,EACD,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CACnC,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { type Clark, type ClarkStateHandlerParams, type ClarkTransition } from "../clark-fsm.js";
2
- export declare const doAwaitingUser: (clark: Clark, { signals }: ClarkStateHandlerParams) => ({ event }: ClarkTransition) => Promise<void>;
2
+ export declare const doAwaitingUser: (clark: Clark, { signals, chatSessionStore }: ClarkStateHandlerParams) => ({ event }: ClarkTransition) => Promise<void>;
3
3
  //# sourceMappingURL=awaiting-user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"awaiting-user.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/awaiting-user.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,KAAK,EACV,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAMzB,eAAO,MAAM,cAAc,GACzB,OAAO,KAAK,EACZ,aAAa,uBAAuB,MAKtB,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CAqDxD,CAAC"}
1
+ {"version":3,"file":"awaiting-user.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/awaiting-user.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,KAAK,EACV,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAMzB,eAAO,MAAM,cAAc,GACzB,OAAO,KAAK,EACZ,+BAA+B,uBAAuB,MAKxC,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CA2DxD,CAAC"}
@@ -1,14 +1,17 @@
1
+ import { CLARK_SUMMARY_HEADER_CONTENT } from "../../const.js";
1
2
  import { AGENT_NEEDS_USER_INPUT, RUNTIME_REVIEW_FINISHED, SERVICE_STARTED_WITH_DRAFT, } from "../clark-fsm.js";
2
3
  import { sendUserCompletionChannel, sendUserMessageChannel, } from "../helpers/peer.js";
3
- export const doAwaitingUser = (clark, { signals }) => {
4
+ export const doAwaitingUser = (clark, { signals, chatSessionStore }) => {
4
5
  const sendUserCompletion = sendUserCompletionChannel(clark);
5
- const sendUserMessage = sendUserMessageChannel(clark);
6
+ const sendUserMessage = sendUserMessageChannel(clark, chatSessionStore);
6
7
  return async ({ event }) => {
7
8
  switch (event.type) {
8
9
  case AGENT_NEEDS_USER_INPUT: {
9
10
  const { hasSuggestions = false } = clark.context;
10
11
  const { advice } = event;
11
- signals.emit("generationCompleted", hasSuggestions);
12
+ const useFullReload = clark.context.usedDebugging ||
13
+ (await clark.context.promptInterpretTask?.isFullAppOrBroadUpdate());
14
+ signals.emit("generationCompleted", hasSuggestions, !!useFullReload);
12
15
  void sendUserMessage({
13
16
  text: advice,
14
17
  });
@@ -17,7 +20,9 @@ export const doAwaitingUser = (clark, { signals }) => {
17
20
  }
18
21
  case RUNTIME_REVIEW_FINISHED: {
19
22
  const { hasSuggestions = false, summaryMessages = [] } = clark.context;
20
- signals.emit("generationCompleted", hasSuggestions);
23
+ const useFullReload = clark.context.usedDebugging ||
24
+ (await clark.context.promptInterpretTask?.isFullAppOrBroadUpdate());
25
+ signals.emit("generationCompleted", hasSuggestions, !!useFullReload);
21
26
  if (summaryMessages.length > 0) {
22
27
  void sendUserMessage({
23
28
  type: "text",
@@ -27,7 +32,7 @@ export const doAwaitingUser = (clark, { signals }) => {
27
32
  void sendUserMessage({
28
33
  type: "text",
29
34
  group: "clark",
30
- text: "**Summary**",
35
+ text: CLARK_SUMMARY_HEADER_CONTENT,
31
36
  });
32
37
  }
33
38
  for (const message of summaryMessages) {
@@ -1 +1 @@
1
- {"version":3,"file":"awaiting-user.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/awaiting-user.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,GAI3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,KAAY,EACZ,EAAE,OAAO,EAA2B,EACpC,EAAE;IACF,MAAM,kBAAkB,GAAG,yBAAyB,CAAC,KAAK,CAAC,CAAC;IAC5D,MAAM,eAAe,GAAG,sBAAsB,CAAC,KAAK,CAAC,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B,MAAM;YAER;gBACE,MAAM,IAAI,KAAK,CAAC,oBAAoB,KAAK,EAAE,CAAC,CAAC;QACjD,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"awaiting-user.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/awaiting-user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,GAI3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,KAAY,EACZ,EAAE,OAAO,EAAE,gBAAgB,EAA2B,EACtD,EAAE;IACF,MAAM,kBAAkB,GAAG,yBAAyB,CAAC,KAAK,CAAC,CAAC;IAC5D,MAAM,eAAe,GAAG,sBAAsB,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IAExE,OAAO,KAAK,EAAE,EAAE,KAAK,EAAmB,EAAiB,EAAE;QACzD,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,sBAAsB,CAAC,CAAC,CAAC;gBAC5B,MAAM,EAAE,cAAc,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC;gBACjD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;gBACzB,MAAM,aAAa,GACjB,KAAK,CAAC,OAAO,CAAC,aAAa;oBAC3B,CAAC,MAAM,KAAK,CAAC,OAAO,CAAC,mBAAmB,EAAE,sBAAsB,EAAE,CAAC,CAAC;gBAEtE,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,cAAc,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC;gBAErE,KAAK,eAAe,CAAC;oBACnB,IAAI,EAAE,MAAM;iBACb,CAAC,CAAC;gBAEH,KAAK,kBAAkB,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC;gBAE5C,MAAM;YACR,CAAC;YAED,KAAK,uBAAuB,CAAC,CAAC,CAAC;gBAC7B,MAAM,EAAE,cAAc,GAAG,KAAK,EAAE,eAAe,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC;gBACvE,MAAM,aAAa,GACjB,KAAK,CAAC,OAAO,CAAC,aAAa;oBAC3B,CAAC,MAAM,KAAK,CAAC,OAAO,CAAC,mBAAmB,EAAE,sBAAsB,EAAE,CAAC,CAAC;gBAEtE,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,cAAc,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC;gBAErE,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAC/B,KAAK,eAAe,CAAC;wBACnB,IAAI,EAAE,MAAM;wBACZ,KAAK,EAAE,OAAO;wBACd,IAAI,EAAE,SAAS;qBAChB,CAAC,CAAC;oBAEH,KAAK,eAAe,CAAC;wBACnB,IAAI,EAAE,MAAM;wBACZ,KAAK,EAAE,OAAO;wBACd,IAAI,EAAE,4BAA4B;qBACnC,CAAC,CAAC;gBACL,CAAC;gBAED,KAAK,MAAM,OAAO,IAAI,eAAe,EAAE,CAAC;oBACtC,KAAK,eAAe,CAAC;wBACnB,IAAI,EAAE,OAAO;qBACd,CAAC,CAAC;gBACL,CAAC;gBAED,KAAK,kBAAkB,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC;gBAC5C,MAAM;YACR,CAAC;YAED,KAAK,0BAA0B;gBAC7B,MAAM;YAER;gBACE,MAAM,IAAI,KAAK,CAAC,oBAAoB,KAAK,EAAE,CAAC,CAAC;QACjD,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
- import { type Clark, type ClarkTransition } from "../clark-fsm.js";
2
- export declare const doIdle: (clark: Clark) => ({ event }: ClarkTransition) => Promise<void>;
1
+ import { type Clark, type ClarkTransition, type ClarkStateHandlerParams } from "../clark-fsm.js";
2
+ export declare const doIdle: (clark: Clark, { chatSessionStore }: ClarkStateHandlerParams) => ({ event }: ClarkTransition) => Promise<void>;
3
3
  //# sourceMappingURL=idle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"idle.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/idle.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,KAAK,EACV,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAMzB,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,MAInB,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CA2CxD,CAAC"}
1
+ {"version":3,"file":"idle.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/idle.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC7B,MAAM,iBAAiB,CAAC;AAMzB,eAAO,MAAM,MAAM,GACjB,OAAO,KAAK,EACZ,sBAAsB,uBAAuB,MAK/B,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CA4CxD,CAAC"}
@@ -1,12 +1,13 @@
1
1
  import { getLogger } from "../../../util/logger.js";
2
2
  import { APP_RUNTIME_UPDATED_WITHOUT_EDITS, USER_ACCEPTED_DRAFT, USER_CANCELED, AGENT_CANCELED, } from "../clark-fsm.js";
3
3
  import { sendUserCompletionChannel, sendUserMessageChannel, } from "../helpers/peer.js";
4
- export const doIdle = (clark) => {
5
- const sendUserMessage = sendUserMessageChannel(clark);
4
+ export const doIdle = (clark, { chatSessionStore }) => {
5
+ const sendUserMessage = sendUserMessageChannel(clark, chatSessionStore);
6
6
  const sendUserCompletion = sendUserCompletionChannel(clark);
7
7
  return async ({ event }) => {
8
8
  switch (event.type) {
9
9
  case USER_ACCEPTED_DRAFT:
10
+ void chatSessionStore.recordUserAcceptance();
10
11
  break;
11
12
  case APP_RUNTIME_UPDATED_WITHOUT_EDITS:
12
13
  void sendUserCompletion({ hasError: true }, 0, true);
@@ -1 +1 @@
1
- {"version":3,"file":"idle.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/idle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EACL,iCAAiC,EACjC,mBAAmB,EACnB,aAAa,EACb,cAAc,GAGf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAY,EAAE,EAAE;IACrC,MAAM,eAAe,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,kBAAkB,GAAG,yBAAyB,CAAC,KAAK,CAAC,CAAC;IAE5D,OAAO,KAAK,EAAE,EAAE,KAAK,EAAmB,EAAiB,EAAE;QACzD,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,mBAAmB;gBACtB,MAAM;YAER,KAAK,iCAAiC;gBACpC,KAAK,kBAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;gBACrD,MAAM;YAER,KAAK,cAAc,CAAC,CAAC,CAAC;gBACpB,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;gBACzB,SAAS,EAAE,CAAC,IAAI,CAAC,4CAA4C,MAAM,EAAE,CAAC,CAAC;gBACvE,KAAK,eAAe,CAClB;oBACE,IAAI,EAAE,MAAM;iBACb,EACD,CAAC,EACD,IAAI,CACL,CAAC;gBAEF,KAAK,kBAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;gBACrD,MAAM;YACR,CAAC;YAED,KAAK,aAAa;gBAChB,SAAS,EAAE,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;gBAC/C,KAAK,eAAe,CAClB;oBACE,IAAI,EAAE,WAAW;iBAClB,EACD,CAAC,EACD,IAAI,CACL,CAAC;gBACF,MAAM;YAER;gBACE,MAAM,IAAI,KAAK,CAAC,oBAAoB,KAAK,EAAE,CAAC,CAAC;QACjD,CAAC;QAED,iCAAiC;QACjC,KAAK,CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACrC,KAAK,CAAC,gBAAgB,EAAE,CAAC;IAC3B,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"idle.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/idle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EACL,iCAAiC,EACjC,mBAAmB,EACnB,aAAa,EACb,cAAc,GAIf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAC,MAAM,MAAM,GAAG,CACpB,KAAY,EACZ,EAAE,gBAAgB,EAA2B,EAC7C,EAAE;IACF,MAAM,eAAe,GAAG,sBAAsB,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IACxE,MAAM,kBAAkB,GAAG,yBAAyB,CAAC,KAAK,CAAC,CAAC;IAE5D,OAAO,KAAK,EAAE,EAAE,KAAK,EAAmB,EAAiB,EAAE;QACzD,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,mBAAmB;gBACtB,KAAK,gBAAgB,CAAC,oBAAoB,EAAE,CAAC;gBAC7C,MAAM;YAER,KAAK,iCAAiC;gBACpC,KAAK,kBAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;gBACrD,MAAM;YAER,KAAK,cAAc,CAAC,CAAC,CAAC;gBACpB,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;gBACzB,SAAS,EAAE,CAAC,IAAI,CAAC,4CAA4C,MAAM,EAAE,CAAC,CAAC;gBACvE,KAAK,eAAe,CAClB;oBACE,IAAI,EAAE,MAAM;iBACb,EACD,CAAC,EACD,IAAI,CACL,CAAC;gBAEF,KAAK,kBAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;gBACrD,MAAM;YACR,CAAC;YAED,KAAK,aAAa;gBAChB,SAAS,EAAE,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;gBAC/C,KAAK,eAAe,CAClB;oBACE,IAAI,EAAE,WAAW;iBAClB,EACD,CAAC,EACD,IAAI,CACL,CAAC;gBACF,MAAM;YAER;gBACE,MAAM,IAAI,KAAK,CAAC,oBAAoB,KAAK,EAAE,CAAC,CAAC;QACjD,CAAC;QAED,iCAAiC;QACjC,KAAK,CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACrC,KAAK,CAAC,gBAAgB,EAAE,CAAC;IAC3B,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { Clark, ClarkStateHandlerParams, ClarkTransition } from "../clark-fsm.js";
2
- export declare const doLLMGenerating: (clark: Clark, { appShell, artifactProcessor, templateRenderer, draftInterface, llmProvider, }: ClarkStateHandlerParams) => ({ event }: ClarkTransition) => Promise<void>;
2
+ export declare const doLLMGenerating: (clark: Clark, { appShell, artifactProcessor, templateRenderer, draftInterface, llmProvider, chatSessionStore, }: ClarkStateHandlerParams) => ({ event }: ClarkTransition) => Promise<void>;
3
3
  //# sourceMappingURL=llm-generating.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"llm-generating.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/llm-generating.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAKV,KAAK,EACL,uBAAuB,EACvB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,EACZ,iFAMG,uBAAuB,MAYZ,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CA0WxD,CAAC"}
1
+ {"version":3,"file":"llm-generating.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/llm-generating.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAKV,KAAK,EACL,uBAAuB,EACvB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,EACZ,mGAOG,uBAAuB,MAYZ,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CAkXxD,CAAC"}