@molecule/app-ide-panel-logic 0.0.0-stage → 0.0.1-stage

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 (147) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +2925 -2
  3. package/dist/chatTimelineOrdering.d.ts +50 -0
  4. package/dist/chatTimelineOrdering.d.ts.map +1 -0
  5. package/dist/chatTimelineOrdering.js +46 -0
  6. package/dist/chatTimelineOrdering.js.map +1 -0
  7. package/dist/command-metadata.d.ts +117 -0
  8. package/dist/command-metadata.d.ts.map +1 -0
  9. package/dist/command-metadata.js +271 -0
  10. package/dist/command-metadata.js.map +1 -0
  11. package/dist/components/activity-utilities.d.ts +107 -0
  12. package/dist/components/activity-utilities.d.ts.map +1 -0
  13. package/dist/components/activity-utilities.js +154 -0
  14. package/dist/components/activity-utilities.js.map +1 -0
  15. package/dist/components/chat-autocommit-utilities.d.ts +172 -0
  16. package/dist/components/chat-autocommit-utilities.d.ts.map +1 -0
  17. package/dist/components/chat-autocommit-utilities.js +185 -0
  18. package/dist/components/chat-autocommit-utilities.js.map +1 -0
  19. package/dist/components/chat-card-style.d.ts +81 -0
  20. package/dist/components/chat-card-style.d.ts.map +1 -0
  21. package/dist/components/chat-card-style.js +78 -0
  22. package/dist/components/chat-card-style.js.map +1 -0
  23. package/dist/components/chat-commands.d.ts +17 -0
  24. package/dist/components/chat-commands.d.ts.map +1 -0
  25. package/dist/components/chat-commands.js +17 -0
  26. package/dist/components/chat-commands.js.map +1 -0
  27. package/dist/components/chat-commit-utilities.d.ts +29 -0
  28. package/dist/components/chat-commit-utilities.d.ts.map +1 -0
  29. package/dist/components/chat-commit-utilities.js +31 -0
  30. package/dist/components/chat-commit-utilities.js.map +1 -0
  31. package/dist/components/chat-cost-utilities.d.ts +62 -0
  32. package/dist/components/chat-cost-utilities.d.ts.map +1 -0
  33. package/dist/components/chat-cost-utilities.js +66 -0
  34. package/dist/components/chat-cost-utilities.js.map +1 -0
  35. package/dist/components/chat-effort-utilities.d.ts +104 -0
  36. package/dist/components/chat-effort-utilities.d.ts.map +1 -0
  37. package/dist/components/chat-effort-utilities.js +99 -0
  38. package/dist/components/chat-effort-utilities.js.map +1 -0
  39. package/dist/components/chat-help-utilities.d.ts +89 -0
  40. package/dist/components/chat-help-utilities.d.ts.map +1 -0
  41. package/dist/components/chat-help-utilities.js +131 -0
  42. package/dist/components/chat-help-utilities.js.map +1 -0
  43. package/dist/components/chat-model-mode-utilities.d.ts +169 -0
  44. package/dist/components/chat-model-mode-utilities.d.ts.map +1 -0
  45. package/dist/components/chat-model-mode-utilities.js +221 -0
  46. package/dist/components/chat-model-mode-utilities.js.map +1 -0
  47. package/dist/components/chat-models-utilities.d.ts +162 -0
  48. package/dist/components/chat-models-utilities.d.ts.map +1 -0
  49. package/dist/components/chat-models-utilities.js +302 -0
  50. package/dist/components/chat-models-utilities.js.map +1 -0
  51. package/dist/components/chat-report-utilities.d.ts +149 -0
  52. package/dist/components/chat-report-utilities.d.ts.map +1 -0
  53. package/dist/components/chat-report-utilities.js +151 -0
  54. package/dist/components/chat-report-utilities.js.map +1 -0
  55. package/dist/components/chat-scripts-utilities.d.ts +185 -0
  56. package/dist/components/chat-scripts-utilities.d.ts.map +1 -0
  57. package/dist/components/chat-scripts-utilities.js +199 -0
  58. package/dist/components/chat-scripts-utilities.js.map +1 -0
  59. package/dist/components/chat-settings-utilities.d.ts +72 -0
  60. package/dist/components/chat-settings-utilities.d.ts.map +1 -0
  61. package/dist/components/chat-settings-utilities.js +56 -0
  62. package/dist/components/chat-settings-utilities.js.map +1 -0
  63. package/dist/components/chat-share-utilities.d.ts +110 -0
  64. package/dist/components/chat-share-utilities.d.ts.map +1 -0
  65. package/dist/components/chat-share-utilities.js +90 -0
  66. package/dist/components/chat-share-utilities.js.map +1 -0
  67. package/dist/components/chat-skills-utilities.d.ts +242 -0
  68. package/dist/components/chat-skills-utilities.d.ts.map +1 -0
  69. package/dist/components/chat-skills-utilities.js +433 -0
  70. package/dist/components/chat-skills-utilities.js.map +1 -0
  71. package/dist/components/chat-stream-utilities.d.ts +74 -0
  72. package/dist/components/chat-stream-utilities.d.ts.map +1 -0
  73. package/dist/components/chat-stream-utilities.js +103 -0
  74. package/dist/components/chat-stream-utilities.js.map +1 -0
  75. package/dist/components/chat-timestamps-utilities.d.ts +123 -0
  76. package/dist/components/chat-timestamps-utilities.d.ts.map +1 -0
  77. package/dist/components/chat-timestamps-utilities.js +177 -0
  78. package/dist/components/chat-timestamps-utilities.js.map +1 -0
  79. package/dist/components/chat-tips-utilities.d.ts +108 -0
  80. package/dist/components/chat-tips-utilities.d.ts.map +1 -0
  81. package/dist/components/chat-tips-utilities.js +137 -0
  82. package/dist/components/chat-tips-utilities.js.map +1 -0
  83. package/dist/components/device-cycle.d.ts +84 -0
  84. package/dist/components/device-cycle.d.ts.map +1 -0
  85. package/dist/components/device-cycle.js +77 -0
  86. package/dist/components/device-cycle.js.map +1 -0
  87. package/dist/components/fileExplorerPersistence.d.ts +50 -0
  88. package/dist/components/fileExplorerPersistence.d.ts.map +1 -0
  89. package/dist/components/fileExplorerPersistence.js +63 -0
  90. package/dist/components/fileExplorerPersistence.js.map +1 -0
  91. package/dist/components/search-utilities.d.ts +15 -0
  92. package/dist/components/search-utilities.d.ts.map +1 -0
  93. package/dist/components/search-utilities.js +26 -0
  94. package/dist/components/search-utilities.js.map +1 -0
  95. package/dist/components/tests-bar-utilities.d.ts +106 -0
  96. package/dist/components/tests-bar-utilities.d.ts.map +1 -0
  97. package/dist/components/tests-bar-utilities.js +167 -0
  98. package/dist/components/tests-bar-utilities.js.map +1 -0
  99. package/dist/components/tests-card-utilities.d.ts +280 -0
  100. package/dist/components/tests-card-utilities.d.ts.map +1 -0
  101. package/dist/components/tests-card-utilities.js +591 -0
  102. package/dist/components/tests-card-utilities.js.map +1 -0
  103. package/dist/components/tool-call-utilities.d.ts +256 -0
  104. package/dist/components/tool-call-utilities.d.ts.map +1 -0
  105. package/dist/components/tool-call-utilities.js +1004 -0
  106. package/dist/components/tool-call-utilities.js.map +1 -0
  107. package/dist/components/user-avatar-utilities.d.ts +41 -0
  108. package/dist/components/user-avatar-utilities.d.ts.map +1 -0
  109. package/dist/components/user-avatar-utilities.js +56 -0
  110. package/dist/components/user-avatar-utilities.js.map +1 -0
  111. package/dist/components/workspace-layout-utilities.d.ts +37 -0
  112. package/dist/components/workspace-layout-utilities.d.ts.map +1 -0
  113. package/dist/components/workspace-layout-utilities.js +58 -0
  114. package/dist/components/workspace-layout-utilities.js.map +1 -0
  115. package/dist/customEventCards.d.ts +147 -0
  116. package/dist/customEventCards.d.ts.map +1 -0
  117. package/dist/customEventCards.js +36 -0
  118. package/dist/customEventCards.js.map +1 -0
  119. package/dist/icon-names.d.ts +26 -0
  120. package/dist/icon-names.d.ts.map +1 -0
  121. package/dist/icon-names.js +14 -0
  122. package/dist/icon-names.js.map +1 -0
  123. package/dist/index.d.ts +51 -0
  124. package/dist/index.d.ts.map +1 -0
  125. package/dist/index.js +51 -0
  126. package/dist/index.js.map +1 -0
  127. package/dist/keyboard-shortcut-utilities.d.ts +63 -0
  128. package/dist/keyboard-shortcut-utilities.d.ts.map +1 -0
  129. package/dist/keyboard-shortcut-utilities.js +100 -0
  130. package/dist/keyboard-shortcut-utilities.js.map +1 -0
  131. package/dist/panels.d.ts +26 -0
  132. package/dist/panels.d.ts.map +1 -0
  133. package/dist/panels.js +26 -0
  134. package/dist/panels.js.map +1 -0
  135. package/dist/settings-metadata.d.ts +78 -0
  136. package/dist/settings-metadata.d.ts.map +1 -0
  137. package/dist/settings-metadata.js +137 -0
  138. package/dist/settings-metadata.js.map +1 -0
  139. package/dist/types.d.ts +588 -0
  140. package/dist/types.d.ts.map +1 -0
  141. package/dist/types.js +9 -0
  142. package/dist/types.js.map +1 -0
  143. package/dist/viewport-queries.d.ts +19 -0
  144. package/dist/viewport-queries.d.ts.map +1 -0
  145. package/dist/viewport-queries.js +19 -0
  146. package/dist/viewport-queries.js.map +1 -0
  147. package/package.json +74 -4
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Framework-neutral matching for the IDE's global keyboard shortcuts: each
3
+ * framework's `useKeyboardShortcuts` listens on `document` and asks
4
+ * {@link findKeyboardShortcut} which shortcut, if any, a keydown is.
5
+ *
6
+ * @module
7
+ */
8
+ import type { KeyboardShortcut } from './types.js';
9
+ /** Whether the platform is macOS or iOS, where `mod` means Cmd instead of Ctrl. */
10
+ export declare const IS_MAC: boolean;
11
+ /**
12
+ * Serialize a `KeyboardEvent` into a normalized combo string.
13
+ * Format: modifier keys in order `mod+ctrl+alt+shift+key` (lowercase).
14
+ * `mod` maps to Meta on Mac, Control elsewhere.
15
+ * @param e - The keyboard event.
16
+ * @param isMac - Override platform detection (for testing).
17
+ * @returns Serialized combo string.
18
+ */
19
+ export declare function serializeEvent(e: KeyboardEvent, isMac?: boolean): string;
20
+ /**
21
+ * Normalize a shortcut definition string into the same format produced by
22
+ * `serializeEvent`. Accepts `mod+shift+f` style strings (case-insensitive).
23
+ * @param keys - Raw shortcut string.
24
+ * @returns Normalized lowercase combo string.
25
+ */
26
+ export declare function normalizeKeys(keys: string): string;
27
+ /**
28
+ * Returns true when the event target is an interactive input element
29
+ * where shortcuts should be suppressed by default.
30
+ * @param e - The keyboard event.
31
+ * @returns Whether an input-like element is focused.
32
+ */
33
+ export declare function isInputFocused(e: KeyboardEvent): boolean;
34
+ /**
35
+ * Returns true when focus is inside a Monaco editor instance.
36
+ * @param e - The keyboard event.
37
+ * @returns Whether the target is inside `.monaco-editor`.
38
+ */
39
+ export declare function isMonacoFocused(e: KeyboardEvent): boolean;
40
+ /**
41
+ * Whether where the key was pressed rules a shortcut out. Inside the Monaco
42
+ * editor only `allowInEditor` decides: Monaco takes keys through its own hidden
43
+ * `<textarea>`, which is the editor, not a text field, so `allowInInput` neither
44
+ * blocks nor allows it there. Elsewhere a text field (`<input>`, `<textarea>`,
45
+ * `<select>`, an editable element) rules it out unless `allowInInput` is set.
46
+ *
47
+ * @param shortcut - The shortcut's focus flags.
48
+ * @param e - The keyboard event.
49
+ * @returns `true` when the shortcut must not fire for this event.
50
+ */
51
+ export declare function isShortcutBlockedByFocus(shortcut: Pick<KeyboardShortcut, 'allowInInput' | 'allowInEditor'>, e: KeyboardEvent): boolean;
52
+ /**
53
+ * The shortcut a keydown triggers: the first whose keys match the event's combo
54
+ * and whose focus flags allow where it was pressed ({@link isShortcutBlockedByFocus}).
55
+ * A matching shortcut the focus rules out lets a later one with the same keys fire.
56
+ *
57
+ * @param shortcuts - The registered shortcuts, in priority order.
58
+ * @param e - The keyboard event.
59
+ * @param isMac - Override platform detection (for testing).
60
+ * @returns The shortcut to run, or `undefined` when the key is not one.
61
+ */
62
+ export declare function findKeyboardShortcut<S extends KeyboardShortcut>(shortcuts: readonly S[], e: KeyboardEvent, isMac?: boolean): S | undefined;
63
+ //# sourceMappingURL=keyboard-shortcut-utilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard-shortcut-utilities.d.ts","sourceRoot":"","sources":["../src/keyboard-shortcut-utilities.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,mFAAmF;AACnF,eAAO,MAAM,MAAM,SACoE,CAAA;AAEvF;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,KAAK,UAAS,GAAG,MAAM,CAQvE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMlD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,aAAa,GAAG,OAAO,CAOxD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,aAAa,GAAG,OAAO,CAGzD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAAE,cAAc,GAAG,eAAe,CAAC,EAClE,CAAC,EAAE,aAAa,GACf,OAAO,CAGT;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,gBAAgB,EAC7D,SAAS,EAAE,SAAS,CAAC,EAAE,EACvB,CAAC,EAAE,aAAa,EAChB,KAAK,UAAS,GACb,CAAC,GAAG,SAAS,CAKf"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Framework-neutral matching for the IDE's global keyboard shortcuts: each
3
+ * framework's `useKeyboardShortcuts` listens on `document` and asks
4
+ * {@link findKeyboardShortcut} which shortcut, if any, a keydown is.
5
+ *
6
+ * @module
7
+ */
8
+ /** Whether the platform is macOS or iOS, where `mod` means Cmd instead of Ctrl. */
9
+ export const IS_MAC = typeof navigator !== 'undefined' && /Mac|iPhone|iPad|iPod/i.test(navigator.userAgent);
10
+ /**
11
+ * Serialize a `KeyboardEvent` into a normalized combo string.
12
+ * Format: modifier keys in order `mod+ctrl+alt+shift+key` (lowercase).
13
+ * `mod` maps to Meta on Mac, Control elsewhere.
14
+ * @param e - The keyboard event.
15
+ * @param isMac - Override platform detection (for testing).
16
+ * @returns Serialized combo string.
17
+ */
18
+ export function serializeEvent(e, isMac = IS_MAC) {
19
+ const parts = [];
20
+ if (isMac ? e.metaKey : e.ctrlKey)
21
+ parts.push('mod');
22
+ if (isMac ? e.ctrlKey : false)
23
+ parts.push('ctrl');
24
+ if (e.altKey)
25
+ parts.push('alt');
26
+ if (e.shiftKey)
27
+ parts.push('shift');
28
+ parts.push(e.key.toLowerCase());
29
+ return parts.join('+');
30
+ }
31
+ /**
32
+ * Normalize a shortcut definition string into the same format produced by
33
+ * `serializeEvent`. Accepts `mod+shift+f` style strings (case-insensitive).
34
+ * @param keys - Raw shortcut string.
35
+ * @returns Normalized lowercase combo string.
36
+ */
37
+ export function normalizeKeys(keys) {
38
+ return keys
39
+ .toLowerCase()
40
+ .split('+')
41
+ .map((s) => s.trim())
42
+ .join('+');
43
+ }
44
+ /**
45
+ * Returns true when the event target is an interactive input element
46
+ * where shortcuts should be suppressed by default.
47
+ * @param e - The keyboard event.
48
+ * @returns Whether an input-like element is focused.
49
+ */
50
+ export function isInputFocused(e) {
51
+ const el = e.target;
52
+ if (!el)
53
+ return false;
54
+ const tag = el.tagName;
55
+ if (tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT')
56
+ return true;
57
+ if (el.isContentEditable)
58
+ return true;
59
+ return false;
60
+ }
61
+ /**
62
+ * Returns true when focus is inside a Monaco editor instance.
63
+ * @param e - The keyboard event.
64
+ * @returns Whether the target is inside `.monaco-editor`.
65
+ */
66
+ export function isMonacoFocused(e) {
67
+ const el = e.target;
68
+ return !!el?.closest?.('.monaco-editor');
69
+ }
70
+ /**
71
+ * Whether where the key was pressed rules a shortcut out. Inside the Monaco
72
+ * editor only `allowInEditor` decides: Monaco takes keys through its own hidden
73
+ * `<textarea>`, which is the editor, not a text field, so `allowInInput` neither
74
+ * blocks nor allows it there. Elsewhere a text field (`<input>`, `<textarea>`,
75
+ * `<select>`, an editable element) rules it out unless `allowInInput` is set.
76
+ *
77
+ * @param shortcut - The shortcut's focus flags.
78
+ * @param e - The keyboard event.
79
+ * @returns `true` when the shortcut must not fire for this event.
80
+ */
81
+ export function isShortcutBlockedByFocus(shortcut, e) {
82
+ if (isMonacoFocused(e))
83
+ return !shortcut.allowInEditor;
84
+ return !shortcut.allowInInput && isInputFocused(e);
85
+ }
86
+ /**
87
+ * The shortcut a keydown triggers: the first whose keys match the event's combo
88
+ * and whose focus flags allow where it was pressed ({@link isShortcutBlockedByFocus}).
89
+ * A matching shortcut the focus rules out lets a later one with the same keys fire.
90
+ *
91
+ * @param shortcuts - The registered shortcuts, in priority order.
92
+ * @param e - The keyboard event.
93
+ * @param isMac - Override platform detection (for testing).
94
+ * @returns The shortcut to run, or `undefined` when the key is not one.
95
+ */
96
+ export function findKeyboardShortcut(shortcuts, e, isMac = IS_MAC) {
97
+ const combo = serializeEvent(e, isMac);
98
+ return shortcuts.find((shortcut) => normalizeKeys(shortcut.keys) === combo && !isShortcutBlockedByFocus(shortcut, e));
99
+ }
100
+ //# sourceMappingURL=keyboard-shortcut-utilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard-shortcut-utilities.js","sourceRoot":"","sources":["../src/keyboard-shortcut-utilities.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,mFAAmF;AACnF,MAAM,CAAC,MAAM,MAAM,GACjB,OAAO,SAAS,KAAK,WAAW,IAAI,uBAAuB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;AAEvF;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,CAAgB,EAAE,KAAK,GAAG,MAAM;IAC7D,MAAM,KAAK,GAAa,EAAE,CAAA;IAC1B,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO;QAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACpD,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK;QAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACjD,IAAI,CAAC,CAAC,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC/B,IAAI,CAAC,CAAC,QAAQ;QAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACnC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAA;IAC/B,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACxB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,IAAI;SACR,WAAW,EAAE;SACb,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACpB,IAAI,CAAC,GAAG,CAAC,CAAA;AACd,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,CAAgB;IAC7C,MAAM,EAAE,GAAG,CAAC,CAAC,MAA4B,CAAA;IACzC,IAAI,CAAC,EAAE;QAAE,OAAO,KAAK,CAAA;IACrB,MAAM,GAAG,GAAG,EAAE,CAAC,OAAO,CAAA;IACtB,IAAI,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,UAAU,IAAI,GAAG,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAA;IAC1E,IAAI,EAAE,CAAC,iBAAiB;QAAE,OAAO,IAAI,CAAA;IACrC,OAAO,KAAK,CAAA;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,CAAgB;IAC9C,MAAM,EAAE,GAAG,CAAC,CAAC,MAA4B,CAAA;IACzC,OAAO,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,gBAAgB,CAAC,CAAA;AAC1C,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,wBAAwB,CACtC,QAAkE,EAClE,CAAgB;IAEhB,IAAI,eAAe,CAAC,CAAC,CAAC;QAAE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAA;IACtD,OAAO,CAAC,QAAQ,CAAC,YAAY,IAAI,cAAc,CAAC,CAAC,CAAC,CAAA;AACpD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CAClC,SAAuB,EACvB,CAAgB,EAChB,KAAK,GAAG,MAAM;IAEd,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;IACtC,OAAO,SAAS,CAAC,IAAI,CACnB,CAAC,QAAQ,EAAE,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,wBAAwB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAC/F,CAAA;AACH,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Helper modules of the IDE panel views — chat slash commands, commit/cost/
3
+ * effort/model/scripts/settings/skills/stream/tip helpers, the file-explorer
4
+ * persistence, the tests bar and tool-call utilities, and the chat timeline
5
+ * ordering. Not re-exported by the framework packages: each framework's IDE
6
+ * package imports this entry for its own views.
7
+ *
8
+ * @module
9
+ */
10
+ export * from './chatTimelineOrdering.js';
11
+ export * from './components/chat-commands.js';
12
+ export * from './components/chat-commit-utilities.js';
13
+ export * from './components/chat-cost-utilities.js';
14
+ export * from './components/chat-effort-utilities.js';
15
+ export * from './components/chat-help-utilities.js';
16
+ export * from './components/chat-model-mode-utilities.js';
17
+ export * from './components/chat-models-utilities.js';
18
+ export * from './components/chat-scripts-utilities.js';
19
+ export * from './components/chat-settings-utilities.js';
20
+ export * from './components/chat-skills-utilities.js';
21
+ export * from './components/chat-stream-utilities.js';
22
+ export * from './components/chat-tips-utilities.js';
23
+ export * from './components/fileExplorerPersistence.js';
24
+ export * from './components/tests-bar-utilities.js';
25
+ export * from './components/tool-call-utilities.js';
26
+ //# sourceMappingURL=panels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panels.d.ts","sourceRoot":"","sources":["../src/panels.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,2BAA2B,CAAA;AACzC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uCAAuC,CAAA;AACrD,cAAc,qCAAqC,CAAA;AACnD,cAAc,uCAAuC,CAAA;AACrD,cAAc,qCAAqC,CAAA;AACnD,cAAc,2CAA2C,CAAA;AACzD,cAAc,uCAAuC,CAAA;AACrD,cAAc,wCAAwC,CAAA;AACtD,cAAc,yCAAyC,CAAA;AACvD,cAAc,uCAAuC,CAAA;AACrD,cAAc,uCAAuC,CAAA;AACrD,cAAc,qCAAqC,CAAA;AACnD,cAAc,yCAAyC,CAAA;AACvD,cAAc,qCAAqC,CAAA;AACnD,cAAc,qCAAqC,CAAA"}
package/dist/panels.js ADDED
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Helper modules of the IDE panel views — chat slash commands, commit/cost/
3
+ * effort/model/scripts/settings/skills/stream/tip helpers, the file-explorer
4
+ * persistence, the tests bar and tool-call utilities, and the chat timeline
5
+ * ordering. Not re-exported by the framework packages: each framework's IDE
6
+ * package imports this entry for its own views.
7
+ *
8
+ * @module
9
+ */
10
+ export * from './chatTimelineOrdering.js';
11
+ export * from './components/chat-commands.js';
12
+ export * from './components/chat-commit-utilities.js';
13
+ export * from './components/chat-cost-utilities.js';
14
+ export * from './components/chat-effort-utilities.js';
15
+ export * from './components/chat-help-utilities.js';
16
+ export * from './components/chat-model-mode-utilities.js';
17
+ export * from './components/chat-models-utilities.js';
18
+ export * from './components/chat-scripts-utilities.js';
19
+ export * from './components/chat-settings-utilities.js';
20
+ export * from './components/chat-skills-utilities.js';
21
+ export * from './components/chat-stream-utilities.js';
22
+ export * from './components/chat-tips-utilities.js';
23
+ export * from './components/fileExplorerPersistence.js';
24
+ export * from './components/tests-bar-utilities.js';
25
+ export * from './components/tool-call-utilities.js';
26
+ //# sourceMappingURL=panels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panels.js","sourceRoot":"","sources":["../src/panels.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,2BAA2B,CAAA;AACzC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uCAAuC,CAAA;AACrD,cAAc,qCAAqC,CAAA;AACnD,cAAc,uCAAuC,CAAA;AACrD,cAAc,qCAAqC,CAAA;AACnD,cAAc,2CAA2C,CAAA;AACzD,cAAc,uCAAuC,CAAA;AACrD,cAAc,wCAAwC,CAAA;AACtD,cAAc,yCAAyC,CAAA;AACvD,cAAc,uCAAuC,CAAA;AACrD,cAAc,uCAAuC,CAAA;AACrD,cAAc,qCAAqC,CAAA;AACnD,cAAc,yCAAyC,CAAA;AACvD,cAAc,qCAAqC,CAAA;AACnD,cAAc,qCAAqC,CAAA"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * React-free settings metadata — the single source of truth for every
3
+ * user-controllable agent setting the `/settings` view shows.
4
+ *
5
+ * Mirrors {@link module:./command-metadata}: this module deliberately imports
6
+ * **nothing** that pulls in React or i18n (only the `CommandId` *type* from the
7
+ * sibling command registry and the pure auto-commit default constant), so it
8
+ * can be consumed on *either* side of the api/app boundary. The IDE `/settings` card derives its rows from
9
+ * {@link SETTINGS} here (zipping in live, display-ready values via
10
+ * `buildSettingsList`), and the molecule.dev API system prompt can import the
11
+ * SAME array through the package's `./settings-metadata` subpath export to
12
+ * render its "User-Controllable Settings" section. One list, two consumers — so
13
+ * the settings the agent claims to respect can never drift from the settings
14
+ * the panel actually shows.
15
+ *
16
+ * This closes the SYN11 inconsistency: the panel previously hid settings while
17
+ * listing their commands in the very same card. The Effort setting was hidden
18
+ * while its `/effort` command was shown; the per-mode plan/execute models were
19
+ * collapsed into a single "Model" row; the Auto-commit setting had its
20
+ * `/autocommit` command shown with no matching row; and Hooks were enumerated in
21
+ * the spec but absent entirely — so a user's actual configuration was
22
+ * understated. Listing EVERY setting here (the per-mode models split out, plus
23
+ * Effort, Auto-commit, and Hooks) makes the panel a faithful, complete view;
24
+ * sourcing both the panel and the prompt from this one array makes the parity
25
+ * structural rather than hand-maintained.
26
+ *
27
+ * Add a setting here (plus its display value in the card and a branch wherever
28
+ * it is persisted) and it shows up in the `/settings` panel automatically — and
29
+ * in the system prompt once that consumer reads this array. Because the consuming
30
+ * side keys an exhaustive `Record<SettingKey, …>` off this union (the IDE card's
31
+ * display values, the API's `project.settings` storage keys), adding a key here
32
+ * fails those builds until each consumer binds the new setting — the compile-time
33
+ * guarantee the lists can never silently drift.
34
+ *
35
+ * @module
36
+ */
37
+ import type { CommandId } from './command-metadata.js';
38
+ /** Stable ids for each user-controllable setting (also the i18n key suffix). */
39
+ export type SettingKey = 'model' | 'planModel' | 'executeModel' | 'commitModel' | 'compactModel' | 'mode' | 'effort' | 'maxLoops' | 'autoFix' | 'autoCommit' | 'hooks' | 'autoApproveCommands' | 'sounds' | 'timestamps';
40
+ /** Canonical, value-free metadata for a single user-controllable setting. */
41
+ export interface SettingMeta {
42
+ /** Stable id (also the i18n key suffix, e.g. `'effort'`). */
43
+ id: SettingKey;
44
+ /** Human-readable label (English default; wrapped in `t()` at render). */
45
+ label: string;
46
+ /**
47
+ * One-line explanation of what the setting does (English default). May
48
+ * contain the `{{agentName}}` interpolation token, filled in at render from
49
+ * the host's agent identity (neutral default: "the assistant").
50
+ */
51
+ description: string;
52
+ /**
53
+ * The slash command that edits this setting client-side. Drives the inline
54
+ * "Edit" affordance and cross-links the setting to its command. Omitted only
55
+ * for read-only settings.
56
+ */
57
+ editCommand?: CommandId;
58
+ /**
59
+ * The exact slash-command input to prefill when editing, for settings whose
60
+ * bare {@link SettingMeta.editCommand} is not specific enough — e.g. the
61
+ * per-mode model rows both run the `model` command but must scope it to a
62
+ * mode (`/model --plan`, `/model --execute`). Omit when running the bare
63
+ * command suffices.
64
+ */
65
+ editInput?: string;
66
+ }
67
+ /**
68
+ * Every user-controllable setting, in display order. The authoritative list —
69
+ * the `/settings` view (via `buildSettingsList`) and the system prompt both read
70
+ * from it, so they cannot drift. The default `model` and the per-mode
71
+ * `planModel` / `executeModel` rows are kept distinct (rather than collapsed
72
+ * into one "Model" row); `effort`, `autoCommit`, and `hooks` are each listed
73
+ * alongside (or in `hooks`' case, instead of) the command the panel references —
74
+ * so a user's actual configuration is never understated and the panel never
75
+ * shows a command for a setting it hides.
76
+ */
77
+ export declare const SETTINGS: readonly SettingMeta[];
78
+ //# sourceMappingURL=settings-metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-metadata.d.ts","sourceRoot":"","sources":["../src/settings-metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGtD,gFAAgF;AAChF,MAAM,MAAM,UAAU,GAClB,OAAO,GACP,WAAW,GACX,cAAc,GACd,aAAa,GACb,cAAc,GACd,MAAM,GACN,QAAQ,GACR,UAAU,GACV,SAAS,GACT,YAAY,GACZ,OAAO,GACP,qBAAqB,GACrB,QAAQ,GACR,YAAY,CAAA;AAEhB,6EAA6E;AAC7E,MAAM,WAAW,WAAW;IAC1B,6DAA6D;IAC7D,EAAE,EAAE,UAAU,CAAA;IACd,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,WAAW,EAgGjC,CAAA"}
@@ -0,0 +1,137 @@
1
+ /**
2
+ * React-free settings metadata — the single source of truth for every
3
+ * user-controllable agent setting the `/settings` view shows.
4
+ *
5
+ * Mirrors {@link module:./command-metadata}: this module deliberately imports
6
+ * **nothing** that pulls in React or i18n (only the `CommandId` *type* from the
7
+ * sibling command registry and the pure auto-commit default constant), so it
8
+ * can be consumed on *either* side of the api/app boundary. The IDE `/settings` card derives its rows from
9
+ * {@link SETTINGS} here (zipping in live, display-ready values via
10
+ * `buildSettingsList`), and the molecule.dev API system prompt can import the
11
+ * SAME array through the package's `./settings-metadata` subpath export to
12
+ * render its "User-Controllable Settings" section. One list, two consumers — so
13
+ * the settings the agent claims to respect can never drift from the settings
14
+ * the panel actually shows.
15
+ *
16
+ * This closes the SYN11 inconsistency: the panel previously hid settings while
17
+ * listing their commands in the very same card. The Effort setting was hidden
18
+ * while its `/effort` command was shown; the per-mode plan/execute models were
19
+ * collapsed into a single "Model" row; the Auto-commit setting had its
20
+ * `/autocommit` command shown with no matching row; and Hooks were enumerated in
21
+ * the spec but absent entirely — so a user's actual configuration was
22
+ * understated. Listing EVERY setting here (the per-mode models split out, plus
23
+ * Effort, Auto-commit, and Hooks) makes the panel a faithful, complete view;
24
+ * sourcing both the panel and the prompt from this one array makes the parity
25
+ * structural rather than hand-maintained.
26
+ *
27
+ * Add a setting here (plus its display value in the card and a branch wherever
28
+ * it is persisted) and it shows up in the `/settings` panel automatically — and
29
+ * in the system prompt once that consumer reads this array. Because the consuming
30
+ * side keys an exhaustive `Record<SettingKey, …>` off this union (the IDE card's
31
+ * display values, the API's `project.settings` storage keys), adding a key here
32
+ * fails those builds until each consumer binds the new setting — the compile-time
33
+ * guarantee the lists can never silently drift.
34
+ *
35
+ * @module
36
+ */
37
+ import { DEFAULT_AUTO_COMMIT_SECONDS } from './components/chat-autocommit-utilities.js';
38
+ /**
39
+ * Every user-controllable setting, in display order. The authoritative list —
40
+ * the `/settings` view (via `buildSettingsList`) and the system prompt both read
41
+ * from it, so they cannot drift. The default `model` and the per-mode
42
+ * `planModel` / `executeModel` rows are kept distinct (rather than collapsed
43
+ * into one "Model" row); `effort`, `autoCommit`, and `hooks` are each listed
44
+ * alongside (or in `hooks`' case, instead of) the command the panel references —
45
+ * so a user's actual configuration is never understated and the panel never
46
+ * shows a command for a setting it hides.
47
+ */
48
+ export const SETTINGS = [
49
+ {
50
+ id: 'model',
51
+ label: 'Default model',
52
+ description: "The model {{agentName}} uses when a mode-specific model isn't set.",
53
+ editCommand: 'model',
54
+ },
55
+ {
56
+ id: 'planModel',
57
+ label: 'Plan-mode model',
58
+ description: 'The model used in plan mode. Falls back to the default model when unset.',
59
+ editCommand: 'model',
60
+ editInput: '/model --plan',
61
+ },
62
+ {
63
+ id: 'executeModel',
64
+ label: 'Execute-mode model',
65
+ description: 'The model used in execute mode. Falls back to the default model when unset.',
66
+ editCommand: 'model',
67
+ editInput: '/model --execute',
68
+ },
69
+ {
70
+ id: 'commitModel',
71
+ label: 'Commit-message model',
72
+ description: 'The model that writes commit messages. Falls back to a fast default when unset.',
73
+ editCommand: 'model',
74
+ editInput: '/model --commit',
75
+ },
76
+ {
77
+ id: 'compactModel',
78
+ label: 'Compaction model',
79
+ description: 'The model that summarizes older messages when the conversation nears its context limit. Falls back to a fast default when unset.',
80
+ editCommand: 'model',
81
+ editInput: '/model --compact',
82
+ },
83
+ {
84
+ id: 'mode',
85
+ label: 'Mode',
86
+ description: 'Plan mode researches and proposes without editing files; execute mode writes code.',
87
+ editCommand: 'plan',
88
+ },
89
+ {
90
+ id: 'effort',
91
+ label: 'Reasoning effort',
92
+ description: "How hard {{agentName}} thinks, set per mode using each mode's model-native levels (e.g. high/xhigh); also scales the agent loop budget.",
93
+ editCommand: 'effort',
94
+ },
95
+ {
96
+ id: 'maxLoops',
97
+ label: 'Max tool iterations',
98
+ description: 'Upper bound on the tool calls {{agentName}} runs in one turn before it pauses for you.',
99
+ editCommand: 'maxloops',
100
+ },
101
+ {
102
+ id: 'autoFix',
103
+ label: 'Auto-fix',
104
+ description: 'After AI edits, re-run type-check and lint and feed any errors back so {{agentName}} fixes them.',
105
+ editCommand: 'autofix',
106
+ },
107
+ {
108
+ id: 'autoCommit',
109
+ label: 'Auto-commit',
110
+ description: `Automatically commit your work a set number of seconds after the last file change — on by default (${DEFAULT_AUTO_COMMIT_SECONDS}s; 0 = off), and it waits until {{agentName}} finishes its turn before committing. Each change restarts the countdown, then it pauses after committing so a clean tree is never re-committed.`,
111
+ editCommand: 'autocommit',
112
+ },
113
+ {
114
+ id: 'hooks',
115
+ label: 'Hooks',
116
+ description: "Shell commands that run before tool actions and can gate them — for example previewing a change before {{agentName}} overwrites or deletes a file. Configure them in your project's agent settings file.",
117
+ },
118
+ {
119
+ id: 'autoApproveCommands',
120
+ label: 'Auto-approve commands',
121
+ description: "Skip the 'Proceed?' confirmation before {{agentName}} runs a bulk/destructive command (a hard reset, a recursive delete, an in-place edit). Network access still follows the project's allowlist unless Full access is on.",
122
+ editCommand: 'autoapprove',
123
+ },
124
+ {
125
+ id: 'sounds',
126
+ label: 'Notification sounds',
127
+ description: 'Per-event notification sounds for responses, errors, file changes, and more.',
128
+ editCommand: 'sounds',
129
+ },
130
+ {
131
+ id: 'timestamps',
132
+ label: 'Timestamps',
133
+ description: 'Show the time on every chat message and event. Off by default; your own messages and critical events always show it. This device only.',
134
+ editCommand: 'timestamps',
135
+ },
136
+ ];
137
+ //# sourceMappingURL=settings-metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-metadata.js","sourceRoot":"","sources":["../src/settings-metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAA;AA+CvF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,QAAQ,GAA2B;IAC9C;QACE,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,oEAAoE;QACjF,WAAW,EAAE,OAAO;KACrB;IACD;QACE,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,0EAA0E;QACvF,WAAW,EAAE,OAAO;QACpB,SAAS,EAAE,eAAe;KAC3B;IACD;QACE,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EAAE,6EAA6E;QAC1F,WAAW,EAAE,OAAO;QACpB,SAAS,EAAE,kBAAkB;KAC9B;IACD;QACE,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EAAE,iFAAiF;QAC9F,WAAW,EAAE,OAAO;QACpB,SAAS,EAAE,iBAAiB;KAC7B;IACD;QACE,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,kBAAkB;QACzB,WAAW,EACT,kIAAkI;QACpI,WAAW,EAAE,OAAO;QACpB,SAAS,EAAE,kBAAkB;KAC9B;IACD;QACE,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,MAAM;QACb,WAAW,EACT,oFAAoF;QACtF,WAAW,EAAE,MAAM;KACpB;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,kBAAkB;QACzB,WAAW,EACT,yIAAyI;QAC3I,WAAW,EAAE,QAAQ;KACtB;IACD;QACE,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EACT,wFAAwF;QAC1F,WAAW,EAAE,UAAU;KACxB;IACD;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,UAAU;QACjB,WAAW,EACT,kGAAkG;QACpG,WAAW,EAAE,SAAS;KACvB;IACD;QACE,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,sGAAsG,2BAA2B,+LAA+L;QAC7U,WAAW,EAAE,YAAY;KAC1B;IACD;QACE,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,OAAO;QACd,WAAW,EACT,0MAA0M;KAC7M;IACD;QACE,EAAE,EAAE,qBAAqB;QACzB,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EACT,4NAA4N;QAC9N,WAAW,EAAE,aAAa;KAC3B;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,8EAA8E;QAC3F,WAAW,EAAE,QAAQ;KACtB;IACD;QACE,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,YAAY;QACnB,WAAW,EACT,wIAAwI;QAC1I,WAAW,EAAE,YAAY;KAC1B;CACO,CAAA"}