@molecule/app-ide-react 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +115 -0
- package/dist/chatTimelineOrdering.d.ts +50 -0
- package/dist/chatTimelineOrdering.d.ts.map +1 -0
- package/dist/chatTimelineOrdering.js +46 -0
- package/dist/chatTimelineOrdering.js.map +1 -0
- package/dist/command-metadata.d.ts +78 -0
- package/dist/command-metadata.d.ts.map +1 -0
- package/dist/command-metadata.js +214 -0
- package/dist/command-metadata.js.map +1 -0
- package/dist/components/ActivityCard.d.ts +28 -0
- package/dist/components/ActivityCard.d.ts.map +1 -0
- package/dist/components/ActivityCard.js +62 -0
- package/dist/components/ActivityCard.js.map +1 -0
- package/dist/components/AutoCommitBadge.d.ts +58 -0
- package/dist/components/AutoCommitBadge.d.ts.map +1 -0
- package/dist/components/AutoCommitBadge.js +78 -0
- package/dist/components/AutoCommitBadge.js.map +1 -0
- package/dist/components/ChatPanel.d.ts +184 -0
- package/dist/components/ChatPanel.d.ts.map +1 -0
- package/dist/components/ChatPanel.js +6691 -0
- package/dist/components/ChatPanel.js.map +1 -0
- package/dist/components/CommandPalette.d.ts +18 -0
- package/dist/components/CommandPalette.d.ts.map +1 -0
- package/dist/components/CommandPalette.js +33 -0
- package/dist/components/CommandPalette.js.map +1 -0
- package/dist/components/DeviceFrameSelector.d.ts +60 -0
- package/dist/components/DeviceFrameSelector.d.ts.map +1 -0
- package/dist/components/DeviceFrameSelector.js +230 -0
- package/dist/components/DeviceFrameSelector.js.map +1 -0
- package/dist/components/EditorPanel.d.ts +17 -0
- package/dist/components/EditorPanel.d.ts.map +1 -0
- package/dist/components/EditorPanel.js +241 -0
- package/dist/components/EditorPanel.js.map +1 -0
- package/dist/components/FileExplorer.d.ts +64 -0
- package/dist/components/FileExplorer.d.ts.map +1 -0
- package/dist/components/FileExplorer.js +1111 -0
- package/dist/components/FileExplorer.js.map +1 -0
- package/dist/components/FileExplorerContextMenu.d.ts +37 -0
- package/dist/components/FileExplorerContextMenu.d.ts.map +1 -0
- package/dist/components/FileExplorerContextMenu.js +241 -0
- package/dist/components/FileExplorerContextMenu.js.map +1 -0
- package/dist/components/HelpCard.d.ts +34 -0
- package/dist/components/HelpCard.d.ts.map +1 -0
- package/dist/components/HelpCard.js +28 -0
- package/dist/components/HelpCard.js.map +1 -0
- package/dist/components/Icon.d.ts +50 -0
- package/dist/components/Icon.d.ts.map +1 -0
- package/dist/components/Icon.js +25 -0
- package/dist/components/Icon.js.map +1 -0
- package/dist/components/KeyboardShortcutsPanel.d.ts +19 -0
- package/dist/components/KeyboardShortcutsPanel.d.ts.map +1 -0
- package/dist/components/KeyboardShortcutsPanel.js +187 -0
- package/dist/components/KeyboardShortcutsPanel.js.map +1 -0
- package/dist/components/MarkdownContent.d.ts +52 -0
- package/dist/components/MarkdownContent.d.ts.map +1 -0
- package/dist/components/MarkdownContent.js +303 -0
- package/dist/components/MarkdownContent.js.map +1 -0
- package/dist/components/ModelsTable.d.ts +38 -0
- package/dist/components/ModelsTable.d.ts.map +1 -0
- package/dist/components/ModelsTable.js +96 -0
- package/dist/components/ModelsTable.js.map +1 -0
- package/dist/components/PreviewPanel.d.ts +66 -0
- package/dist/components/PreviewPanel.d.ts.map +1 -0
- package/dist/components/PreviewPanel.js +1752 -0
- package/dist/components/PreviewPanel.js.map +1 -0
- package/dist/components/QuickOpen.d.ts +20 -0
- package/dist/components/QuickOpen.d.ts.map +1 -0
- package/dist/components/QuickOpen.js +72 -0
- package/dist/components/QuickOpen.js.map +1 -0
- package/dist/components/QuickPicker.d.ts +21 -0
- package/dist/components/QuickPicker.d.ts.map +1 -0
- package/dist/components/QuickPicker.js +174 -0
- package/dist/components/QuickPicker.js.map +1 -0
- package/dist/components/RelevantSkillSuggestion.d.ts +41 -0
- package/dist/components/RelevantSkillSuggestion.d.ts.map +1 -0
- package/dist/components/RelevantSkillSuggestion.js +85 -0
- package/dist/components/RelevantSkillSuggestion.js.map +1 -0
- package/dist/components/ReportModal.d.ts +35 -0
- package/dist/components/ReportModal.d.ts.map +1 -0
- package/dist/components/ReportModal.js +112 -0
- package/dist/components/ReportModal.js.map +1 -0
- package/dist/components/ResizeHandle.d.ts +21 -0
- package/dist/components/ResizeHandle.d.ts.map +1 -0
- package/dist/components/ResizeHandle.js +109 -0
- package/dist/components/ResizeHandle.js.map +1 -0
- package/dist/components/ScriptsCard.d.ts +37 -0
- package/dist/components/ScriptsCard.d.ts.map +1 -0
- package/dist/components/ScriptsCard.js +177 -0
- package/dist/components/ScriptsCard.js.map +1 -0
- package/dist/components/SearchPanel.d.ts +18 -0
- package/dist/components/SearchPanel.d.ts.map +1 -0
- package/dist/components/SearchPanel.js +449 -0
- package/dist/components/SearchPanel.js.map +1 -0
- package/dist/components/SettingsCard.d.ts +49 -0
- package/dist/components/SettingsCard.d.ts.map +1 -0
- package/dist/components/SettingsCard.js +59 -0
- package/dist/components/SettingsCard.js.map +1 -0
- package/dist/components/ShareModal.d.ts +32 -0
- package/dist/components/ShareModal.d.ts.map +1 -0
- package/dist/components/ShareModal.js +126 -0
- package/dist/components/ShareModal.js.map +1 -0
- package/dist/components/SidebarTabs.d.ts +18 -0
- package/dist/components/SidebarTabs.d.ts.map +1 -0
- package/dist/components/SidebarTabs.js +20 -0
- package/dist/components/SidebarTabs.js.map +1 -0
- package/dist/components/SkillsCard.d.ts +86 -0
- package/dist/components/SkillsCard.d.ts.map +1 -0
- package/dist/components/SkillsCard.js +227 -0
- package/dist/components/SkillsCard.js.map +1 -0
- package/dist/components/StreamingIndicator.d.ts +50 -0
- package/dist/components/StreamingIndicator.d.ts.map +1 -0
- package/dist/components/StreamingIndicator.js +142 -0
- package/dist/components/StreamingIndicator.js.map +1 -0
- package/dist/components/TabBar.d.ts +37 -0
- package/dist/components/TabBar.d.ts.map +1 -0
- package/dist/components/TabBar.js +187 -0
- package/dist/components/TabBar.js.map +1 -0
- package/dist/components/TipCard.d.ts +22 -0
- package/dist/components/TipCard.d.ts.map +1 -0
- package/dist/components/TipCard.js +73 -0
- package/dist/components/TipCard.js.map +1 -0
- package/dist/components/ToolCallCard.d.ts +18 -0
- package/dist/components/ToolCallCard.d.ts.map +1 -0
- package/dist/components/ToolCallCard.js +716 -0
- package/dist/components/ToolCallCard.js.map +1 -0
- package/dist/components/UserAvatar.d.ts +45 -0
- package/dist/components/UserAvatar.d.ts.map +1 -0
- package/dist/components/UserAvatar.js +80 -0
- package/dist/components/UserAvatar.js.map +1 -0
- package/dist/components/WorkspaceLayout.d.ts +19 -0
- package/dist/components/WorkspaceLayout.d.ts.map +1 -0
- package/dist/components/WorkspaceLayout.js +56 -0
- package/dist/components/WorkspaceLayout.js.map +1 -0
- package/dist/components/activity-utilities.d.ts +107 -0
- package/dist/components/activity-utilities.d.ts.map +1 -0
- package/dist/components/activity-utilities.js +154 -0
- package/dist/components/activity-utilities.js.map +1 -0
- package/dist/components/chat-autocommit-utilities.d.ts +172 -0
- package/dist/components/chat-autocommit-utilities.d.ts.map +1 -0
- package/dist/components/chat-autocommit-utilities.js +185 -0
- package/dist/components/chat-autocommit-utilities.js.map +1 -0
- package/dist/components/chat-card-style.d.ts +64 -0
- package/dist/components/chat-card-style.d.ts.map +1 -0
- package/dist/components/chat-card-style.js +74 -0
- package/dist/components/chat-card-style.js.map +1 -0
- package/dist/components/chat-commands.d.ts +17 -0
- package/dist/components/chat-commands.d.ts.map +1 -0
- package/dist/components/chat-commands.js +17 -0
- package/dist/components/chat-commands.js.map +1 -0
- package/dist/components/chat-commit-utilities.d.ts +29 -0
- package/dist/components/chat-commit-utilities.d.ts.map +1 -0
- package/dist/components/chat-commit-utilities.js +31 -0
- package/dist/components/chat-commit-utilities.js.map +1 -0
- package/dist/components/chat-cost-utilities.d.ts +62 -0
- package/dist/components/chat-cost-utilities.d.ts.map +1 -0
- package/dist/components/chat-cost-utilities.js +66 -0
- package/dist/components/chat-cost-utilities.js.map +1 -0
- package/dist/components/chat-effort-utilities.d.ts +96 -0
- package/dist/components/chat-effort-utilities.d.ts.map +1 -0
- package/dist/components/chat-effort-utilities.js +97 -0
- package/dist/components/chat-effort-utilities.js.map +1 -0
- package/dist/components/chat-help-utilities.d.ts +89 -0
- package/dist/components/chat-help-utilities.d.ts.map +1 -0
- package/dist/components/chat-help-utilities.js +131 -0
- package/dist/components/chat-help-utilities.js.map +1 -0
- package/dist/components/chat-model-mode-utilities.d.ts +143 -0
- package/dist/components/chat-model-mode-utilities.d.ts.map +1 -0
- package/dist/components/chat-model-mode-utilities.js +191 -0
- package/dist/components/chat-model-mode-utilities.js.map +1 -0
- package/dist/components/chat-models-utilities.d.ts +98 -0
- package/dist/components/chat-models-utilities.d.ts.map +1 -0
- package/dist/components/chat-models-utilities.js +136 -0
- package/dist/components/chat-models-utilities.js.map +1 -0
- package/dist/components/chat-report-utilities.d.ts +149 -0
- package/dist/components/chat-report-utilities.d.ts.map +1 -0
- package/dist/components/chat-report-utilities.js +151 -0
- package/dist/components/chat-report-utilities.js.map +1 -0
- package/dist/components/chat-scripts-utilities.d.ts +140 -0
- package/dist/components/chat-scripts-utilities.d.ts.map +1 -0
- package/dist/components/chat-scripts-utilities.js +158 -0
- package/dist/components/chat-scripts-utilities.js.map +1 -0
- package/dist/components/chat-settings-utilities.d.ts +72 -0
- package/dist/components/chat-settings-utilities.d.ts.map +1 -0
- package/dist/components/chat-settings-utilities.js +56 -0
- package/dist/components/chat-settings-utilities.js.map +1 -0
- package/dist/components/chat-share-utilities.d.ts +104 -0
- package/dist/components/chat-share-utilities.d.ts.map +1 -0
- package/dist/components/chat-share-utilities.js +90 -0
- package/dist/components/chat-share-utilities.js.map +1 -0
- package/dist/components/chat-skills-utilities.d.ts +242 -0
- package/dist/components/chat-skills-utilities.d.ts.map +1 -0
- package/dist/components/chat-skills-utilities.js +433 -0
- package/dist/components/chat-skills-utilities.js.map +1 -0
- package/dist/components/chat-stream-utilities.d.ts +74 -0
- package/dist/components/chat-stream-utilities.d.ts.map +1 -0
- package/dist/components/chat-stream-utilities.js +103 -0
- package/dist/components/chat-stream-utilities.js.map +1 -0
- package/dist/components/chat-tips-utilities.d.ts +108 -0
- package/dist/components/chat-tips-utilities.d.ts.map +1 -0
- package/dist/components/chat-tips-utilities.js +137 -0
- package/dist/components/chat-tips-utilities.js.map +1 -0
- package/dist/components/device-cycle.d.ts +84 -0
- package/dist/components/device-cycle.d.ts.map +1 -0
- package/dist/components/device-cycle.js +77 -0
- package/dist/components/device-cycle.js.map +1 -0
- package/dist/components/index.d.ts +36 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +33 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/tool-call-utilities.d.ts +69 -0
- package/dist/components/tool-call-utilities.d.ts.map +1 -0
- package/dist/components/tool-call-utilities.js +368 -0
- package/dist/components/tool-call-utilities.js.map +1 -0
- package/dist/components/user-avatar-utilities.d.ts +41 -0
- package/dist/components/user-avatar-utilities.d.ts.map +1 -0
- package/dist/components/user-avatar-utilities.js +56 -0
- package/dist/components/user-avatar-utilities.js.map +1 -0
- package/dist/components/workspace-layout-utilities.d.ts +37 -0
- package/dist/components/workspace-layout-utilities.d.ts.map +1 -0
- package/dist/components/workspace-layout-utilities.js +58 -0
- package/dist/components/workspace-layout-utilities.js.map +1 -0
- package/dist/customEventCards.d.ts +117 -0
- package/dist/customEventCards.d.ts.map +1 -0
- package/dist/customEventCards.js +36 -0
- package/dist/customEventCards.js.map +1 -0
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +8 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts +48 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts.map +1 -0
- package/dist/hooks/useKeyboardShortcuts.js +112 -0
- package/dist/hooks/useKeyboardShortcuts.js.map +1 -0
- package/dist/hooks/useViewport.d.ts +42 -0
- package/dist/hooks/useViewport.d.ts.map +1 -0
- package/dist/hooks/useViewport.js +61 -0
- package/dist/hooks/useViewport.js.map +1 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +74 -0
- package/dist/index.js.map +1 -0
- package/dist/settings-metadata.d.ts +78 -0
- package/dist/settings-metadata.d.ts.map +1 -0
- package/dist/settings-metadata.js +131 -0
- package/dist/settings-metadata.js.map +1 -0
- package/dist/types.d.ts +751 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +25 -0
- package/dist/types.js.map +1 -0
- package/package.json +90 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work.
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
+
form, that is based on (or derived from) the Work and for which the
|
|
41
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
+
represent, as a whole, an original work of authorship.
|
|
43
|
+
|
|
44
|
+
"Contribution" shall mean any work of authorship, including the
|
|
45
|
+
original version of the Work and any modifications or additions
|
|
46
|
+
to that Work, that is intentionally submitted to the Licensor for
|
|
47
|
+
inclusion in the Work by the copyright owner or by an individual or
|
|
48
|
+
Legal Entity authorized to submit on behalf of the copyright owner.
|
|
49
|
+
|
|
50
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
51
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
52
|
+
subsequently incorporated within the Work.
|
|
53
|
+
|
|
54
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
55
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
56
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
57
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
58
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
59
|
+
Work and such Derivative Works in Source or Object form.
|
|
60
|
+
|
|
61
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
62
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
63
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
64
|
+
patent license to make, have made, use, offer to sell, sell, import,
|
|
65
|
+
and otherwise transfer the Work.
|
|
66
|
+
|
|
67
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
68
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
69
|
+
modifications, and in Source or Object form, provided that You
|
|
70
|
+
meet the following conditions:
|
|
71
|
+
|
|
72
|
+
(a) You must give any other recipients of the Work or
|
|
73
|
+
Derivative Works a copy of this License; and
|
|
74
|
+
|
|
75
|
+
(b) You must cause any modified files to carry prominent notices
|
|
76
|
+
stating that You changed the files; and
|
|
77
|
+
|
|
78
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
79
|
+
that You distribute, all copyright, patent, trademark, and
|
|
80
|
+
attribution notices from the Source form of the Work,
|
|
81
|
+
excluding those notices that do not pertain to any part of
|
|
82
|
+
the Derivative Works; and
|
|
83
|
+
|
|
84
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
85
|
+
distribution, then any Derivative Works that You distribute must
|
|
86
|
+
include a readable copy of the attribution notices contained
|
|
87
|
+
within such NOTICE file.
|
|
88
|
+
|
|
89
|
+
5. Submission of Contributions.
|
|
90
|
+
|
|
91
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
92
|
+
names, trademarks, service marks, or product names of the Licensor.
|
|
93
|
+
|
|
94
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
95
|
+
agreed to in writing, Licensor provides the Work on an "AS IS" BASIS,
|
|
96
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND.
|
|
97
|
+
|
|
98
|
+
8. Limitation of Liability. In no event and under no legal theory shall
|
|
99
|
+
any Contributor be liable to You for damages.
|
|
100
|
+
|
|
101
|
+
9. Accepting Warranty or Additional Liability.
|
|
102
|
+
|
|
103
|
+
Copyright 2026 Molecule Dev, Inc.
|
|
104
|
+
|
|
105
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
106
|
+
you may not use this file except in compliance with the License.
|
|
107
|
+
You may obtain a copy of the License at
|
|
108
|
+
|
|
109
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
110
|
+
|
|
111
|
+
Unless required by applicable law or agreed to in writing, software
|
|
112
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
113
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
114
|
+
See the License for the specific language governing permissions and
|
|
115
|
+
limitations under the License.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Timeline ordering for the chat transcript.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
/** The minimal shape {@link timelineSortKey} reads from a timeline item. */
|
|
7
|
+
interface OrderableItem {
|
|
8
|
+
kind: string;
|
|
9
|
+
msg?: {
|
|
10
|
+
timestamp: number;
|
|
11
|
+
isStreaming?: boolean;
|
|
12
|
+
content?: string;
|
|
13
|
+
blocks?: unknown[];
|
|
14
|
+
queued?: boolean;
|
|
15
|
+
};
|
|
16
|
+
card?: {
|
|
17
|
+
timestamp: number;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Sort key for a chat-timeline item (message or any card). Items normally order by
|
|
22
|
+
* their `timestamp`, with TWO exceptions: a streaming assistant message that has not
|
|
23
|
+
* yet produced any content sorts after every timestamped item, and a QUEUED user
|
|
24
|
+
* message sorts dead last.
|
|
25
|
+
*
|
|
26
|
+
* Why (empty streaming): a turn's preamble cards (the model / "Building your app"
|
|
27
|
+
* notices, the "models_intro" note, the onboarding tip) are emitted a beat BEFORE the
|
|
28
|
+
* response content. The server defers each assistant message's `message_start` — and
|
|
29
|
+
* thus its timestamp — to that message's FIRST content event, so the message is
|
|
30
|
+
* timestamped when it visually appears, strictly after every preamble item, and orders
|
|
31
|
+
* below them. This rule only covers the brief window between `message_start` and the
|
|
32
|
+
* first flushed content: while still empty the message sorts last (bottom of the turn)
|
|
33
|
+
* instead of leap-frogging the cards on an earlier timestamp; once content lands it
|
|
34
|
+
* orders by its first-content timestamp, still after the preamble. No card opts in by
|
|
35
|
+
* name, and because that timestamp is the server's persisted value, live and reload
|
|
36
|
+
* order identically.
|
|
37
|
+
*
|
|
38
|
+
* Why (queued): a message queued while a response streams belongs to a FUTURE turn —
|
|
39
|
+
* it must pin to the very bottom of the transcript, below everything the current turn
|
|
40
|
+
* keeps streaming (new assistant messages, cards), instead of drifting up as later-
|
|
41
|
+
* timestamped items are appended after it. Multiple queued messages keep their queue
|
|
42
|
+
* order via sort stability. When the queue drains, useChat re-stamps the message to
|
|
43
|
+
* its actual send time, so it settles exactly where the transcript reached.
|
|
44
|
+
*
|
|
45
|
+
* @param item - A timeline item.
|
|
46
|
+
* @returns The numeric key to sort ascending by.
|
|
47
|
+
*/
|
|
48
|
+
export declare function timelineSortKey(item: OrderableItem): number;
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=chatTimelineOrdering.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatTimelineOrdering.d.ts","sourceRoot":"","sources":["../src/chatTimelineOrdering.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,4EAA4E;AAC5E,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE;QACJ,SAAS,EAAE,MAAM,CAAA;QACjB,WAAW,CAAC,EAAE,OAAO,CAAA;QACrB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,MAAM,CAAC,EAAE,OAAO,EAAE,CAAA;QAClB,MAAM,CAAC,EAAE,OAAO,CAAA;KACjB,CAAA;IACD,IAAI,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAS3D"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Timeline ordering for the chat transcript.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Sort key for a chat-timeline item (message or any card). Items normally order by
|
|
8
|
+
* their `timestamp`, with TWO exceptions: a streaming assistant message that has not
|
|
9
|
+
* yet produced any content sorts after every timestamped item, and a QUEUED user
|
|
10
|
+
* message sorts dead last.
|
|
11
|
+
*
|
|
12
|
+
* Why (empty streaming): a turn's preamble cards (the model / "Building your app"
|
|
13
|
+
* notices, the "models_intro" note, the onboarding tip) are emitted a beat BEFORE the
|
|
14
|
+
* response content. The server defers each assistant message's `message_start` — and
|
|
15
|
+
* thus its timestamp — to that message's FIRST content event, so the message is
|
|
16
|
+
* timestamped when it visually appears, strictly after every preamble item, and orders
|
|
17
|
+
* below them. This rule only covers the brief window between `message_start` and the
|
|
18
|
+
* first flushed content: while still empty the message sorts last (bottom of the turn)
|
|
19
|
+
* instead of leap-frogging the cards on an earlier timestamp; once content lands it
|
|
20
|
+
* orders by its first-content timestamp, still after the preamble. No card opts in by
|
|
21
|
+
* name, and because that timestamp is the server's persisted value, live and reload
|
|
22
|
+
* order identically.
|
|
23
|
+
*
|
|
24
|
+
* Why (queued): a message queued while a response streams belongs to a FUTURE turn —
|
|
25
|
+
* it must pin to the very bottom of the transcript, below everything the current turn
|
|
26
|
+
* keeps streaming (new assistant messages, cards), instead of drifting up as later-
|
|
27
|
+
* timestamped items are appended after it. Multiple queued messages keep their queue
|
|
28
|
+
* order via sort stability. When the queue drains, useChat re-stamps the message to
|
|
29
|
+
* its actual send time, so it settles exactly where the transcript reached.
|
|
30
|
+
*
|
|
31
|
+
* @param item - A timeline item.
|
|
32
|
+
* @returns The numeric key to sort ascending by.
|
|
33
|
+
*/
|
|
34
|
+
export function timelineSortKey(item) {
|
|
35
|
+
if (item.kind === 'message' && item.msg) {
|
|
36
|
+
const m = item.msg;
|
|
37
|
+
if (m.queued)
|
|
38
|
+
return Number.MAX_SAFE_INTEGER;
|
|
39
|
+
const empty = !m.content && (!m.blocks || m.blocks.length === 0);
|
|
40
|
+
if (m.isStreaming && empty)
|
|
41
|
+
return Number.MAX_SAFE_INTEGER - 1;
|
|
42
|
+
return m.timestamp;
|
|
43
|
+
}
|
|
44
|
+
return item.card?.timestamp ?? 0;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=chatTimelineOrdering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatTimelineOrdering.js","sourceRoot":"","sources":["../src/chatTimelineOrdering.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAeH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,eAAe,CAAC,IAAmB;IACjD,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACxC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAA;QAClB,IAAI,CAAC,CAAC,MAAM;YAAE,OAAO,MAAM,CAAC,gBAAgB,CAAA;QAC5C,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAA;QAChE,IAAI,CAAC,CAAC,WAAW,IAAI,KAAK;YAAE,OAAO,MAAM,CAAC,gBAAgB,GAAG,CAAC,CAAA;QAC9D,OAAO,CAAC,CAAC,SAAS,CAAA;IACpB,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,EAAE,SAAS,IAAI,CAAC,CAAA;AAClC,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React-free slash-command metadata — the single source of truth for every
|
|
3
|
+
* `/command` the user can run.
|
|
4
|
+
*
|
|
5
|
+
* This module deliberately imports **nothing** (no React, no app-ui, no i18n)
|
|
6
|
+
* so it can be consumed on *either* side of the api/app boundary. The IDE chat
|
|
7
|
+
* surfaces (command menu, keyboard dispatcher, `/help`, the `/settings` card)
|
|
8
|
+
* all read from {@link COMMANDS} here, AND the molecule.dev API system prompt
|
|
9
|
+
* can import the same array (via the package's `./command-metadata` subpath
|
|
10
|
+
* export) to render Synthase's "Available Commands" section. One list, two
|
|
11
|
+
* consumers — so the agent can never claim a shipped command (e.g. `/share`)
|
|
12
|
+
* does not exist, and the prompt can never drift behind the registry.
|
|
13
|
+
*
|
|
14
|
+
* Add a new command here (plus a branch in `executeCommand`) and it shows up
|
|
15
|
+
* everywhere automatically — menu, `/help`, `/settings`, and the system prompt.
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
/** Category keys used to group commands in the menu and in `/help`. */
|
|
20
|
+
export type CommandCategoryKey = 'context' | 'code' | 'collaborate' | 'model' | 'settings' | 'support';
|
|
21
|
+
/** A command category with its display label. */
|
|
22
|
+
export interface CommandCategory {
|
|
23
|
+
/** Stable category key referenced by {@link CommandDef.category}. */
|
|
24
|
+
key: CommandCategoryKey;
|
|
25
|
+
/** Human-readable category heading (English default; wrapped in `t()` at render). */
|
|
26
|
+
label: string;
|
|
27
|
+
}
|
|
28
|
+
/** Ordered list of command categories used as section headings. */
|
|
29
|
+
export declare const COMMAND_CATEGORIES: readonly CommandCategory[];
|
|
30
|
+
/** Metadata describing a single slash command. */
|
|
31
|
+
export interface CommandDef {
|
|
32
|
+
/** Command id (the part after the slash, e.g. `'help'`). */
|
|
33
|
+
id: string;
|
|
34
|
+
/** Display label including the leading slash (e.g. `'/help'`). */
|
|
35
|
+
label: string;
|
|
36
|
+
/**
|
|
37
|
+
* Short description shown in the menu and in `/help` (English default). May
|
|
38
|
+
* contain the `{{agentName}}` interpolation token, filled in by the render
|
|
39
|
+
* sites (command menu, `/help`, `/settings` card) from the host's agent
|
|
40
|
+
* identity (neutral default: "the assistant").
|
|
41
|
+
*/
|
|
42
|
+
description: string;
|
|
43
|
+
/** Category this command is grouped under. */
|
|
44
|
+
category: CommandCategoryKey;
|
|
45
|
+
/**
|
|
46
|
+
* Argument syntax for commands that take options, shown in the `/settings`
|
|
47
|
+
* command reference (English default). `[…]` = optional, `<…>` = required.
|
|
48
|
+
* Omit for commands that take no arguments.
|
|
49
|
+
*/
|
|
50
|
+
usage?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Every available slash command, grouped by category order. This is the
|
|
54
|
+
* authoritative list — the menu, key handling, `/help`, AND the system prompt's
|
|
55
|
+
* "Available Commands" section all read from it.
|
|
56
|
+
*/
|
|
57
|
+
export declare const COMMANDS: readonly CommandDef[];
|
|
58
|
+
/** Union of all command ids (loosely `string`, since {@link CommandDef.id} is a string). */
|
|
59
|
+
export type CommandId = CommandDef['id'];
|
|
60
|
+
/** A category paired with the commands that belong to it. */
|
|
61
|
+
export interface CommandGroup {
|
|
62
|
+
/** The category metadata (key + label). */
|
|
63
|
+
category: CommandCategory;
|
|
64
|
+
/** Commands in this category, in registry order. */
|
|
65
|
+
commands: CommandDef[];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Groups commands under their categories, preserving category and command
|
|
69
|
+
* order and dropping empty categories. Used by the `/settings` command
|
|
70
|
+
* reference (and any other view that lists commands by section) so the
|
|
71
|
+
* grouping stays in sync with the registry automatically.
|
|
72
|
+
*
|
|
73
|
+
* @param commands - Command registry to group (defaults to {@link COMMANDS}).
|
|
74
|
+
* @param categories - Ordered categories (defaults to {@link COMMAND_CATEGORIES}).
|
|
75
|
+
* @returns One {@link CommandGroup} per non-empty category, in category order.
|
|
76
|
+
*/
|
|
77
|
+
export declare function groupCommandsByCategory(commands?: readonly CommandDef[], categories?: readonly CommandCategory[]): CommandGroup[];
|
|
78
|
+
//# sourceMappingURL=command-metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-metadata.d.ts","sourceRoot":"","sources":["../src/command-metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,uEAAuE;AACvE,MAAM,MAAM,kBAAkB,GAC5B,SAAS,GAAG,MAAM,GAAG,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;AAEvE,iDAAiD;AACjD,MAAM,WAAW,eAAe;IAC9B,qEAAqE;IACrE,GAAG,EAAE,kBAAkB,CAAA;IACvB,qFAAqF;IACrF,KAAK,EAAE,MAAM,CAAA;CACd;AAED,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EAO/C,CAAA;AAEV,kDAAkD;AAClD,MAAM,WAAW,UAAU;IACzB,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAA;IACV,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,8CAA8C;IAC9C,QAAQ,EAAE,kBAAkB,CAAA;IAC5B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,UAAU,EAsKhC,CAAA;AAEV,4FAA4F;AAC5F,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;AAExC,6DAA6D;AAC7D,MAAM,WAAW,YAAY;IAC3B,2CAA2C;IAC3C,QAAQ,EAAE,eAAe,CAAA;IACzB,oDAAoD;IACpD,QAAQ,EAAE,UAAU,EAAE,CAAA;CACvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,GAAE,SAAS,UAAU,EAAa,EAC1C,UAAU,GAAE,SAAS,eAAe,EAAuB,GAC1D,YAAY,EAAE,CAOhB"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React-free slash-command metadata — the single source of truth for every
|
|
3
|
+
* `/command` the user can run.
|
|
4
|
+
*
|
|
5
|
+
* This module deliberately imports **nothing** (no React, no app-ui, no i18n)
|
|
6
|
+
* so it can be consumed on *either* side of the api/app boundary. The IDE chat
|
|
7
|
+
* surfaces (command menu, keyboard dispatcher, `/help`, the `/settings` card)
|
|
8
|
+
* all read from {@link COMMANDS} here, AND the molecule.dev API system prompt
|
|
9
|
+
* can import the same array (via the package's `./command-metadata` subpath
|
|
10
|
+
* export) to render Synthase's "Available Commands" section. One list, two
|
|
11
|
+
* consumers — so the agent can never claim a shipped command (e.g. `/share`)
|
|
12
|
+
* does not exist, and the prompt can never drift behind the registry.
|
|
13
|
+
*
|
|
14
|
+
* Add a new command here (plus a branch in `executeCommand`) and it shows up
|
|
15
|
+
* everywhere automatically — menu, `/help`, `/settings`, and the system prompt.
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
/** Ordered list of command categories used as section headings. */
|
|
20
|
+
export const COMMAND_CATEGORIES = [
|
|
21
|
+
{ key: 'context', label: 'Context' },
|
|
22
|
+
{ key: 'code', label: 'Code' },
|
|
23
|
+
{ key: 'collaborate', label: 'Collaborate' },
|
|
24
|
+
{ key: 'model', label: 'Model' },
|
|
25
|
+
{ key: 'settings', label: 'Settings' },
|
|
26
|
+
{ key: 'support', label: 'Support' },
|
|
27
|
+
];
|
|
28
|
+
/**
|
|
29
|
+
* Every available slash command, grouped by category order. This is the
|
|
30
|
+
* authoritative list — the menu, key handling, `/help`, AND the system prompt's
|
|
31
|
+
* "Available Commands" section all read from it.
|
|
32
|
+
*/
|
|
33
|
+
export const COMMANDS = [
|
|
34
|
+
// Context
|
|
35
|
+
{ id: 'clear', label: '/clear', description: 'Clear conversation', category: 'context' },
|
|
36
|
+
{
|
|
37
|
+
id: 'compact',
|
|
38
|
+
label: '/compact',
|
|
39
|
+
description: 'Compress context to free space',
|
|
40
|
+
category: 'context',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'cost',
|
|
44
|
+
label: '/cost',
|
|
45
|
+
description: 'Show token usage & share of your AI allowance',
|
|
46
|
+
category: 'context',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: 'skills',
|
|
50
|
+
label: '/skills',
|
|
51
|
+
description: 'Browse & load project skills',
|
|
52
|
+
category: 'context',
|
|
53
|
+
usage: '/skills [query]',
|
|
54
|
+
},
|
|
55
|
+
// Code
|
|
56
|
+
{ id: 'commit', label: '/commit', description: 'Commit current changes', category: 'code' },
|
|
57
|
+
{
|
|
58
|
+
id: 'explain',
|
|
59
|
+
label: '/explain',
|
|
60
|
+
description: 'Explain code (e.g. /explain @file)',
|
|
61
|
+
category: 'code',
|
|
62
|
+
usage: '/explain [@file | topic]',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 'lint',
|
|
66
|
+
label: '/lint',
|
|
67
|
+
description: 'Run linter and fix issues',
|
|
68
|
+
category: 'code',
|
|
69
|
+
usage: '/lint [path]',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 'test',
|
|
73
|
+
label: '/test',
|
|
74
|
+
description: 'Run project test suite',
|
|
75
|
+
category: 'code',
|
|
76
|
+
usage: '/test [args]',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 'undo',
|
|
80
|
+
label: '/undo',
|
|
81
|
+
description: "Revert last AI turn's file changes",
|
|
82
|
+
category: 'code',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 'scripts',
|
|
86
|
+
label: '/scripts',
|
|
87
|
+
description: 'Browse & run saved project scripts',
|
|
88
|
+
category: 'code',
|
|
89
|
+
usage: '/scripts [query]',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 'run',
|
|
93
|
+
label: '/run',
|
|
94
|
+
description: 'Run a saved script by name',
|
|
95
|
+
category: 'code',
|
|
96
|
+
usage: '/run <name>',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: 'autocommit',
|
|
100
|
+
label: '/autocommit',
|
|
101
|
+
description: 'Auto-commit N seconds after the last file change (0 cancels)',
|
|
102
|
+
category: 'code',
|
|
103
|
+
usage: '/autocommit <seconds>',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: 'autofix',
|
|
107
|
+
label: '/autofix',
|
|
108
|
+
description: 'Toggle auto-fix after AI file changes',
|
|
109
|
+
category: 'code',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: 'autoapprove',
|
|
113
|
+
label: '/autoapprove',
|
|
114
|
+
description: 'Toggle auto-approving destructive commands (skip the Proceed confirm)',
|
|
115
|
+
category: 'code',
|
|
116
|
+
},
|
|
117
|
+
// Collaborate
|
|
118
|
+
{
|
|
119
|
+
id: 'share',
|
|
120
|
+
label: '/share',
|
|
121
|
+
description: 'Create a public share link for this project',
|
|
122
|
+
category: 'collaborate',
|
|
123
|
+
usage: '/share [viewer | commenter | editor | owner]',
|
|
124
|
+
},
|
|
125
|
+
// Model
|
|
126
|
+
{
|
|
127
|
+
id: 'model',
|
|
128
|
+
label: '/model',
|
|
129
|
+
description: 'Switch the model for any mode (plan, execute, commit messages, compaction)',
|
|
130
|
+
category: 'model',
|
|
131
|
+
usage: '/model [name | --plan | --execute | --commit | --compact]',
|
|
132
|
+
},
|
|
133
|
+
{ id: 'plan', label: '/plan', description: 'Toggle plan/execute mode', category: 'model' },
|
|
134
|
+
{
|
|
135
|
+
id: 'maxloops',
|
|
136
|
+
label: '/maxloops',
|
|
137
|
+
description: 'Set max tool iterations',
|
|
138
|
+
category: 'model',
|
|
139
|
+
usage: '/maxloops <n>',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: 'effort',
|
|
143
|
+
label: '/effort',
|
|
144
|
+
description: "Set reasoning effort per mode, in the model's own levels; /effort ? shows them",
|
|
145
|
+
category: 'model',
|
|
146
|
+
usage: '/effort [--plan|--execute] <level>',
|
|
147
|
+
},
|
|
148
|
+
// Settings
|
|
149
|
+
{
|
|
150
|
+
id: 'settings',
|
|
151
|
+
label: '/settings',
|
|
152
|
+
description: "View & change {{agentName}}'s settings",
|
|
153
|
+
category: 'settings',
|
|
154
|
+
},
|
|
155
|
+
{ id: 'sounds', label: '/sounds', description: 'Notification sounds', category: 'settings' },
|
|
156
|
+
{
|
|
157
|
+
id: 'mic',
|
|
158
|
+
label: '/mic',
|
|
159
|
+
description: 'Choose the dictation engine (on-device / browser native)',
|
|
160
|
+
category: 'settings',
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
id: 'dictate',
|
|
164
|
+
label: '/dictate',
|
|
165
|
+
description: 'Choose the dictation engine (alias for /mic)',
|
|
166
|
+
category: 'settings',
|
|
167
|
+
},
|
|
168
|
+
// Support
|
|
169
|
+
{ id: 'help', label: '/help', description: 'Workflow guide & tips', category: 'support' },
|
|
170
|
+
{
|
|
171
|
+
id: 'report',
|
|
172
|
+
label: '/report',
|
|
173
|
+
description: 'Report a bug or send feedback',
|
|
174
|
+
category: 'support',
|
|
175
|
+
usage: '/report [title]',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: 'bug',
|
|
179
|
+
label: '/bug',
|
|
180
|
+
description: 'Report a bug (alias for /report)',
|
|
181
|
+
category: 'support',
|
|
182
|
+
usage: '/bug [title]',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
id: 'version',
|
|
186
|
+
label: '/version',
|
|
187
|
+
// Host-neutral: carries NO version number (the registry is also rendered into
|
|
188
|
+
// the molecule.dev API system prompt, which can't reach the IDE's version). The
|
|
189
|
+
// IDE menu appends the live version as an inline suffix at its render site —
|
|
190
|
+
// same mechanism as /model's `(Claude)` / /maxloops's `(50)`. See ChatPanel.
|
|
191
|
+
description: 'Show the app version',
|
|
192
|
+
category: 'support',
|
|
193
|
+
},
|
|
194
|
+
];
|
|
195
|
+
/**
|
|
196
|
+
* Groups commands under their categories, preserving category and command
|
|
197
|
+
* order and dropping empty categories. Used by the `/settings` command
|
|
198
|
+
* reference (and any other view that lists commands by section) so the
|
|
199
|
+
* grouping stays in sync with the registry automatically.
|
|
200
|
+
*
|
|
201
|
+
* @param commands - Command registry to group (defaults to {@link COMMANDS}).
|
|
202
|
+
* @param categories - Ordered categories (defaults to {@link COMMAND_CATEGORIES}).
|
|
203
|
+
* @returns One {@link CommandGroup} per non-empty category, in category order.
|
|
204
|
+
*/
|
|
205
|
+
export function groupCommandsByCategory(commands = COMMANDS, categories = COMMAND_CATEGORIES) {
|
|
206
|
+
const groups = [];
|
|
207
|
+
for (const category of categories) {
|
|
208
|
+
const inCategory = commands.filter((c) => c.category === category.key);
|
|
209
|
+
if (inCategory.length > 0)
|
|
210
|
+
groups.push({ category, commands: inCategory });
|
|
211
|
+
}
|
|
212
|
+
return groups;
|
|
213
|
+
}
|
|
214
|
+
//# sourceMappingURL=command-metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-metadata.js","sourceRoot":"","sources":["../src/command-metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAcH,mEAAmE;AACnE,MAAM,CAAC,MAAM,kBAAkB,GAA+B;IAC5D,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACpC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAC9B,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE;IAC5C,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAChC,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;IACtC,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;CAC5B,CAAA;AAyBV;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAA0B;IAC7C,UAAU;IACV,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE,QAAQ,EAAE,SAAS,EAAE;IACxF;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,gCAAgC;QAC7C,QAAQ,EAAE,SAAS;KACpB;IACD;QACE,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,+CAA+C;QAC5D,QAAQ,EAAE,SAAS;KAC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ity` SSE event fires (a captured outbound side effect
|
|
4
|
+
* in dev: email/sms/push/webhook/channel).
|
|
5
|
+
*
|
|
6
|
+
* Shows a per-type icon, a one-line `summary → recipient`, and a status pill.
|
|
7
|
+
* Clicking the card opens the Activity panel filtered to that event's type.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
import type { JSX } from 'react';
|
|
12
|
+
import type { Activity } from './activity-utilities.js';
|
|
13
|
+
/**
|
|
14
|
+
* Props for the inline {@link ActivityCard}.
|
|
15
|
+
*/
|
|
16
|
+
export interface ActivityCardProps {
|
|
17
|
+
/** The captured activity to render. */
|
|
18
|
+
activity: Activity;
|
|
19
|
+
/** Called when the card is clicked — should open the Activity panel filtered to this activity. */
|
|
20
|
+
onActivityClick?: (activity: Activity) => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Compact, clickable inline card for a single captured activity.
|
|
24
|
+
* @param props - Component props.
|
|
25
|
+
* @returns The rendered activity card element.
|
|
26
|
+
*/
|
|
27
|
+
export declare function ActivityCard({ activity, onActivityClick }: ActivityCardProps): JSX.Element;
|
|
28
|
+
//# sourceMappingURL=ActivityCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivityCard.d.ts","sourceRoot":"","sources":["../../src/components/ActivityCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAMhC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAUvD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,uCAAuC;IACvC,QAAQ,EAAE,QAAQ,CAAA;IAClB,kGAAkG;IAClG,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAA;CAC/C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAmF1F"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { t } from '@molecule/app-i18n';
|
|
3
|
+
import { getClassMap } from '@molecule/app-ui';
|
|
4
|
+
import { useCoarsePointer } from '../hooks/useViewport.js';
|
|
5
|
+
import { activityIconName, activityStatusColors, activityStatusLabel, activitySummaryLine, } from './activity-utilities.js';
|
|
6
|
+
import { CHAT_CARD_ICON_SIZE, chatCardBorder, chatCardStyle } from './chat-card-style.js';
|
|
7
|
+
import { Icon } from './Icon.js';
|
|
8
|
+
/**
|
|
9
|
+
* Compact, clickable inline card for a single captured activity.
|
|
10
|
+
* @param props - Component props.
|
|
11
|
+
* @returns The rendered activity card element.
|
|
12
|
+
*/
|
|
13
|
+
export function ActivityCard({ activity, onActivityClick }) {
|
|
14
|
+
const cm = getClassMap();
|
|
15
|
+
const isCoarse = useCoarsePointer();
|
|
16
|
+
const pill = activityStatusColors(activity.status);
|
|
17
|
+
const clickable = Boolean(onActivityClick);
|
|
18
|
+
return (_jsxs("button", { type: "button", "data-mol-id": `activity-card-${activity.id}`, "data-activity-type": activity.type, "data-activity-status": activity.status, onClick: clickable ? () => onActivityClick(activity) : undefined, "aria-label": t('ide.activity.cardAria', undefined, { defaultValue: 'View captured activity' }), className: cm.cn(cm.textSize('xs'), cm.w('full')), style: {
|
|
19
|
+
display: 'flex',
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
gap: 8,
|
|
22
|
+
// One chat-timeline rhythm: bottom margin only, never a top margin (matches
|
|
23
|
+
// ChatPanel's TIMELINE_ITEM_GAP so adjacent items never collide — P4-05).
|
|
24
|
+
marginBottom: 16,
|
|
25
|
+
// Shared card chrome: subtle primary tint + a uniform 1px border on all
|
|
26
|
+
// sides. One source of truth with the other chat info cards (chat-card-style).
|
|
27
|
+
...chatCardStyle(),
|
|
28
|
+
// Touch: the whole card is the tap target — 44px standalone-control floor.
|
|
29
|
+
...(isCoarse && clickable ? { minHeight: 44 } : {}),
|
|
30
|
+
textAlign: 'left',
|
|
31
|
+
cursor: clickable ? 'pointer' : 'default',
|
|
32
|
+
color: 'inherit',
|
|
33
|
+
transition: 'border-color 100ms',
|
|
34
|
+
}, onMouseEnter: clickable
|
|
35
|
+
? (e) => {
|
|
36
|
+
;
|
|
37
|
+
e.currentTarget.style.borderColor = chatCardBorder(undefined, 70);
|
|
38
|
+
}
|
|
39
|
+
: undefined, onMouseLeave: clickable
|
|
40
|
+
? (e) => {
|
|
41
|
+
;
|
|
42
|
+
e.currentTarget.style.borderColor = chatCardBorder();
|
|
43
|
+
}
|
|
44
|
+
: undefined, children: [_jsx(Icon, { name: activityIconName(activity.type), size: CHAT_CARD_ICON_SIZE, "aria-hidden": "true", style: { flexShrink: 0 } }), _jsx("span", { className: cm.textSize('xs'), style: {
|
|
45
|
+
flex: 1,
|
|
46
|
+
minWidth: 0,
|
|
47
|
+
overflow: 'hidden',
|
|
48
|
+
textOverflow: 'ellipsis',
|
|
49
|
+
whiteSpace: 'nowrap',
|
|
50
|
+
}, children: activitySummaryLine(activity) }), _jsx("span", { "data-mol-id": `activity-status-${activity.id}`, style: {
|
|
51
|
+
flexShrink: 0,
|
|
52
|
+
fontSize: 10,
|
|
53
|
+
fontWeight: 600,
|
|
54
|
+
textTransform: 'uppercase',
|
|
55
|
+
letterSpacing: '0.04em',
|
|
56
|
+
padding: '2px 7px',
|
|
57
|
+
borderRadius: 999,
|
|
58
|
+
color: pill.fg,
|
|
59
|
+
background: pill.bg,
|
|
60
|
+
}, children: activityStatusLabel(activity.status) })] }));
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=ActivityCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivityCard.js","sourceRoot":"","sources":["../../src/components/ActivityCard.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,CAAC,EAAE,MAA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