@floless/app 0.153.0 → 0.155.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/dist/floless-server.cjs +51767 -38222
- package/dist/schemas/revit.model.v1.schema.json +5 -0
- package/dist/schemas/steel.model.v2.schema.json +19 -5
- package/dist/skills/floless-app-new-workflow/SKILL.md +8 -2
- package/dist/skills/floless-app-onboarding/SKILL.md +31 -19
- package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +20 -11
- package/dist/skills/floless-app-queue/SKILL.md +23 -4
- package/dist/skills/floless-app-steel-model/SKILL.md +23 -2
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +158 -65
- package/dist/skills/floless-app-workflows/SKILL.md +23 -5
- package/dist/skills/floless-app-workflows/references/blender-exec.md +183 -0
- package/dist/skills/floless-app-workflows/references/dev-server-and-run-trace.md +27 -12
- package/dist/templates/blender-construction-sequence.flo +96 -0
- package/dist/web/agents.js +33 -13
- package/dist/web/app.css +331 -34
- package/dist/web/app.js +12 -1
- package/dist/web/aware.js +1167 -137
- package/dist/web/chat-question-card.js +477 -0
- package/dist/web/chat.css +237 -25
- package/dist/web/chat.js +2156 -889
- package/dist/web/commands-shell.js +578 -21
- package/dist/web/commands-steel.js +105 -4
- package/dist/web/guide.js +217 -16
- package/dist/web/index.html +104 -10
- package/dist/web/instructor.js +10 -9
- package/dist/web/left-pane.js +43 -6
- package/dist/web/media-player.js +234 -0
- package/dist/web/model-editor-contract.js +2 -0
- package/dist/web/model-editor-revit-adapter.js +1 -0
- package/dist/web/model-editor-steel-adapter.js +89 -1
- package/dist/web/model-panel-bridge.js +16 -2
- package/dist/web/model-view-query.js +590 -0
- package/dist/web/model-viewport-revit-adapter.js +15 -1
- package/dist/web/model-viewport-toolbar.js +5 -2
- package/dist/web/pages.js +592 -0
- package/dist/web/panels.js +2 -1
- package/dist/web/revit-editor.js +182 -16
- package/dist/web/run-progress.js +193 -0
- package/dist/web/run-strip.js +173 -0
- package/dist/web/steel-3d-core.js +70 -0
- package/dist/web/steel-editor.html +2751 -219
- package/dist/web/steel-frames-core.js +958 -0
- package/dist/web/steel-last-seen.js +315 -0
- package/dist/web/steel-marks-core.js +530 -0
- package/dist/web/steel-model-slim.js +95 -0
- package/dist/web/steel-model-v2-client-validation.js +14 -2
- package/dist/web/steel-model-v2-commands.js +258 -27
- package/dist/web/steel-model-v2-projection.js +78 -18
- package/dist/web/steel-read-confidence.js +11 -2
- package/dist/web/tekla-structural-grid-adapter.js +7 -1
- package/dist/web/tool-updates.js +141 -33
- package/dist/web/workspaces.js +446 -30
- package/package.json +3 -2
|
@@ -81,6 +81,31 @@
|
|
|
81
81
|
why: 'A point between the ends splits the dimension in two; a point beyond an end continues it as a running chain.',
|
|
82
82
|
});
|
|
83
83
|
|
|
84
|
+
/* ── callouts (#2211): the marks a drawing carries and the sheet each points to ─────────────────────── */
|
|
85
|
+
|
|
86
|
+
def('steel.callout-edit', {
|
|
87
|
+
label: 'Add a callout',
|
|
88
|
+
actsOn: 'Adds a detail, section or elevation callout to this sheet, or edits one you click',
|
|
89
|
+
group: 'On the steel canvas',
|
|
90
|
+
persistence: 'working',
|
|
91
|
+
interaction: 'mode',
|
|
92
|
+
risk: [],
|
|
93
|
+
guidance: 'active-command',
|
|
94
|
+
steps: ['Click the plan where the callout is drawn', 'Say what it reads and which sheet it points to, then Save'],
|
|
95
|
+
why: 'Click an existing mark to change or delete it.',
|
|
96
|
+
});
|
|
97
|
+
def('steel.callout-mark', { label: 'Mark as printed', actsOn: 'Holds what the callout reads on the drawing, for example 7/S-402', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The sheet and number below are filled in from it until you type in them yourself.' });
|
|
98
|
+
def('steel.callout-sheet', { label: 'Points to sheet', actsOn: 'Holds the sheet the callout points to', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Pick one of this model’s sheets or type one that isn’t in the model yet.' });
|
|
99
|
+
def('steel.callout-number', { label: 'Number or letter', actsOn: 'Holds the detail number or letter the callout points to', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
100
|
+
def('steel.callout-kind', { label: 'Callout type', actsOn: 'Sets the callout to a {instance}', anyInstance: 'detail, section or elevation', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
101
|
+
def('steel.callout-save', { label: 'Save callout', actsOn: 'Adds the callout to this sheet, or saves your changes to it', group: 'On the steel canvas', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Undo takes it back out, and it is kept when the drawing is read again.' });
|
|
102
|
+
def('steel.callout-delete', { label: 'Delete callout', actsOn: 'Removes this callout from the sheet', group: 'On the steel canvas', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Undo brings it back.' });
|
|
103
|
+
def('steel.callout-pick-view', { label: 'Open a view of the sheet', actsOn: 'Goes to {instance}, one of several views on the sheet the callout points to', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
104
|
+
def('steel.callout-ask-ai', { label: 'Ask your AI', actsOn: 'Sends your terminal AI a request about the sheet the callout points to', group: 'In the steel editor dialogs', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'It queues a request. Nothing in the model changes until your AI answers and you review it.' });
|
|
105
|
+
def('steel.callout-copy-request', { label: 'Copy request', actsOn: 'Copies the request so you can paste it into your AI session yourself', group: 'In the steel editor dialogs', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
106
|
+
def('steel.callout-see-question', { label: 'See the question', actsOn: 'Opens the question the read already raised about the missing sheet', group: 'In the steel editor dialogs', persistence: 'none', interaction: 'dialog', risk: [], guidance: 'on-demand' });
|
|
107
|
+
def('steel.details-add-callout', { label: 'Add a callout', actsOn: 'Closes the list and starts adding a callout to this sheet', group: 'In the Details dialog', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
108
|
+
|
|
84
109
|
def('steel.grid-line', {
|
|
85
110
|
label: 'Grid line',
|
|
86
111
|
actsOn: 'Adds a grid line to this sheet',
|
|
@@ -916,6 +941,27 @@
|
|
|
916
941
|
why: 'Changes only how lengths are SHOWN and what you can type — never the model. The contract stays in millimetres either way, so switching back and forth leaves the saved file byte-identical.',
|
|
917
942
|
});
|
|
918
943
|
|
|
944
|
+
def('steel.column-below-reach', {
|
|
945
|
+
label: 'Columns ending below the floor',
|
|
946
|
+
actsOn: 'Sets how far under a sheet’s floor level a column can end and still be drawn on that sheet, dashed',
|
|
947
|
+
group: 'In the ⋯ menu — Display',
|
|
948
|
+
persistence: 'working',
|
|
949
|
+
interaction: 'instant',
|
|
950
|
+
risk: [],
|
|
951
|
+
guidance: 'on-demand',
|
|
952
|
+
why: 'One value for every sheet, saved with the project, so each sheet, “See what changed” and Review & approve agree. Read in the project’s units. Undo puts the old value back.',
|
|
953
|
+
});
|
|
954
|
+
|
|
955
|
+
def('steel.column-below-reach-reset', {
|
|
956
|
+
label: 'Back to the default',
|
|
957
|
+
actsOn: 'Puts the distance for columns ending below a floor back to the default',
|
|
958
|
+
group: 'In the ⋯ menu — Display',
|
|
959
|
+
persistence: 'working',
|
|
960
|
+
interaction: 'instant',
|
|
961
|
+
risk: [],
|
|
962
|
+
guidance: 'on-demand',
|
|
963
|
+
});
|
|
964
|
+
|
|
919
965
|
def('steel.grid-label-size', {
|
|
920
966
|
label: 'Grid label size',
|
|
921
967
|
actsOn: 'Sets how big the grid bubbles are drawn',
|
|
@@ -982,7 +1028,7 @@
|
|
|
982
1028
|
interaction: 'instant',
|
|
983
1029
|
risk: ['costs-time'],
|
|
984
1030
|
guidance: 'on-demand',
|
|
985
|
-
why: 'Applies everywhere that callout appears.
|
|
1031
|
+
why: 'Applies everywhere that callout appears. Connections someone confirmed, tuned by hand, linked to a detail earlier or imported are left alone and listed, and so is anything nothing can be built on (a brace, say). Connections it built itself are updated when the detail changes.',
|
|
986
1032
|
});
|
|
987
1033
|
|
|
988
1034
|
def('steel.base-plates', {
|
|
@@ -1009,14 +1055,32 @@
|
|
|
1009
1055
|
|
|
1010
1056
|
def('steel.frames', {
|
|
1011
1057
|
label: 'Frames',
|
|
1012
|
-
actsOn: 'Opens the frames
|
|
1058
|
+
actsOn: 'Opens the moment frame schedule, where you add and edit frames and say which sheet is which level',
|
|
1013
1059
|
group: 'In the ⋯ menu — Detailing',
|
|
1014
|
-
persistence: '
|
|
1060
|
+
persistence: 'working',
|
|
1015
1061
|
interaction: 'dialog',
|
|
1016
1062
|
risk: [],
|
|
1017
1063
|
guidance: 'on-demand',
|
|
1064
|
+
why: 'Nothing here is changed until you type in it, and every change can be undone.',
|
|
1018
1065
|
});
|
|
1019
1066
|
|
|
1067
|
+
/* ── the moment frame schedule dialog (#2210) ───────────────────────────────────────────────────────── */
|
|
1068
|
+
|
|
1069
|
+
const FRAMES = 'In the Frames dialog';
|
|
1070
|
+
def('steel.frames-new', { label: 'New frame', actsOn: 'Starts a new frame at the bottom of the schedule', group: FRAMES, persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'It is saved once it has a grid line and both ends of its span.' });
|
|
1071
|
+
def('steel.frames-level-new', { label: 'New level', actsOn: 'Adds a floor level, for example 3rd floor, to every frame', group: FRAMES, persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Name the level as the drawings do. Undo takes it away again.' });
|
|
1072
|
+
def('steel.frames-empty-add', { label: 'Add a frame', actsOn: 'Starts the first frame in the schedule', group: FRAMES, persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
1073
|
+
def('steel.frames-ask-ai', { label: 'Ask the AI to read them', actsOn: 'Opens Ask AI with a request to re-read the frames from the drawings', group: FRAMES, persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'It only fills in the request. Nothing is sent until you send it, and the schedule does not change.' });
|
|
1074
|
+
def('steel.frames-field', { label: 'Frame field', actsOn: 'Sets the value for {instance}', anyInstance: 'a cell in the schedule', group: FRAMES, persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Separate several girder sizes with a comma. Each change can be undone.' });
|
|
1075
|
+
def('steel.frames-level-name', { label: 'Level name', actsOn: 'Renames {instance} for every frame', anyInstance: 'a level', group: FRAMES, persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'A name that is already used offers to merge the two levels.' });
|
|
1076
|
+
def('steel.frames-level-remove', { label: 'Remove level', actsOn: 'Removes {instance}, its girder sizes and its sheet links, from every frame', anyInstance: 'a level', group: FRAMES, persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Undo brings it back.' });
|
|
1077
|
+
def('steel.frames-row-delete', { label: 'Delete frame', actsOn: 'Deletes the frame on {instance}', anyInstance: 'a grid line', group: FRAMES, persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Undo brings it back.' });
|
|
1078
|
+
def('steel.frames-sheet-level', { label: 'Level of a sheet', actsOn: 'Sets which floor level {instance} is', anyInstance: 'a sheet', group: FRAMES, persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'A sheet can be one level at a time. The sheet’s own cut elevation is not changed.' });
|
|
1079
|
+
def('steel.frames-go-to', { label: 'Go to the frame', actsOn: 'Moves to the frame that is already in the schedule', group: FRAMES, persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
1080
|
+
def('steel.frames-draft-discard', { label: 'Discard the new frame', actsOn: 'Drops the frame you were typing; nothing was saved', group: FRAMES, persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
1081
|
+
def('steel.frames-merge-level', { label: 'Merge levels', actsOn: 'Merges {instance} into the level with the name you typed', anyInstance: 'a level', group: FRAMES, persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Girder sizes and sheet links are combined. If the two levels together hold more than a level keeps, you are asked first, and Undo puts everything back.' });
|
|
1082
|
+
def('steel.frames-keep-editing', { label: 'Keep editing the name', actsOn: 'Keeps the level name open so you can type a different one', group: FRAMES, persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
1083
|
+
|
|
1020
1084
|
/* Model checks. Each SELECTS the suspect members and leaves the fix to you —
|
|
1021
1085
|
which is why none of them is destructive: nothing is deleted or changed
|
|
1022
1086
|
until you act on the selection. Merge is the exception that does edit, and
|
|
@@ -1538,7 +1602,7 @@
|
|
|
1538
1602
|
interaction: "instant",
|
|
1539
1603
|
risk: [],
|
|
1540
1604
|
guidance: "on-demand",
|
|
1541
|
-
why: "View targets 3D. Display targets the active pane, including in split view. The 2D plan, the 3D default and each saved 3D view have their own switch and scope. Hiding preserves scope, properties, placement and pinned members."
|
|
1605
|
+
why: "View always targets 3D and 2D always targets the 2D plan, whichever side is active. Display targets the active pane, including in split view. The 2D plan, the 3D default and each saved 3D view have their own switch and scope. Hiding preserves scope, properties, placement and pinned members."
|
|
1542
1606
|
});
|
|
1543
1607
|
def('steel.property-label-all', {
|
|
1544
1608
|
label: "For all",
|
|
@@ -1676,6 +1740,21 @@
|
|
|
1676
1740
|
guidance: 'on-demand',
|
|
1677
1741
|
});
|
|
1678
1742
|
|
|
1743
|
+
// The 2D plan toolbar's Labels button (#2216). It opens the same Property labels rows as the 3D one, so it gets
|
|
1744
|
+
// its own template instead of borrowing steel.toolbar-menu, whose place is the 3D toolbar: `?` would send
|
|
1745
|
+
// the user to the wrong side of the screen.
|
|
1746
|
+
def('steel.toolbar-menu-2d', {
|
|
1747
|
+
label: 'Plan toolbar menu',
|
|
1748
|
+
actsOn: 'Opens the {instance} options for the 2D plan',
|
|
1749
|
+
anyInstance: 'plan toolbar menu’s',
|
|
1750
|
+
group: 'In the 2D view toolbar',
|
|
1751
|
+
persistence: 'none',
|
|
1752
|
+
interaction: 'instant',
|
|
1753
|
+
risk: [],
|
|
1754
|
+
guidance: 'on-demand',
|
|
1755
|
+
why: 'This is the Labels button beside Fit all and Zoom to selected. It always edits the 2D plan, even in Split view while the 3D side is the active one.',
|
|
1756
|
+
});
|
|
1757
|
+
|
|
1679
1758
|
// The Properties panel's own dropdowns: the placement faces, rotation and line style. They used to borrow
|
|
1680
1759
|
// steel.toolbar-menu, whose place is the 3D toolbar, so ? sent the user to the wrong side of the screen.
|
|
1681
1760
|
def('steel.panel-menu', {
|
|
@@ -2197,6 +2276,8 @@
|
|
|
2197
2276
|
panel, popup, table and dialog renderers. Repeated rows use one template;
|
|
2198
2277
|
the instance is display data only and is carried by the live element. */
|
|
2199
2278
|
|
|
2279
|
+
def('steel.see-what-changed', { label: 'See what changed', actsOn: 'Lists what changed in this model since you last had it, in plain words. It only looks; nothing in your model changes', group: 'In the steel editor dialogs', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Appears on the blue bar that says the model has changed, so you can see what the change was before deciding what to do.' });
|
|
2280
|
+
def('steel.change-list-retry', { label: 'Try again', actsOn: 'Asks again what changed in this model', group: 'In the steel editor dialogs', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Appears only when the list of changes could not be produced a moment ago.' });
|
|
2200
2281
|
def('steel.overwrite-save', { label: 'Overwrite and save', actsOn: 'Replaces the newer saved model with the version open here', group: 'In the steel editor dialogs', persistence: 'working', interaction: 'instant', risk: ['destructive'], guidance: 'on-demand', why: 'Only appears after a save conflict and asks for confirmation before the other saved version is replaced.' });
|
|
2201
2282
|
def('steel.dimension-end-style', { label: 'Dimension end style', actsOn: 'Draws dimension ends as {instance}', group: 'In the Properties panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
2202
2283
|
def('steel.dimension-label-position', { label: 'Dimension label position', actsOn: 'Places dimension text {instance}', anyInstance: 'above or on the line', group: 'In the Properties panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
@@ -2302,6 +2383,19 @@
|
|
|
2302
2383
|
def('steel.registration-select', { label: 'Open this sheet', actsOn: 'Switches the plan view to {instance}', group: 'In the registration list', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
2303
2384
|
def('steel.registration-detail', { label: 'Registration details', actsOn: 'Shows the exact reason this sheet’s registration was refused, naming the contract fields to change', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The plain-English warning is for you; this is the sentence your terminal AI needs.' });
|
|
2304
2385
|
def('steel.registration-copy', { label: 'Copy reason', actsOn: 'Copies the exact registration refusal to the clipboard', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'This sheet cannot be corrected in the editor — paste the reason to your terminal AI and ask it to fix the registration.' });
|
|
2386
|
+
// #2214 — columns on a plan: the floor level a sheet states decides which columns it draws.
|
|
2387
|
+
def('steel.cut-level-enter', { label: 'Enter a level…', actsOn: 'Opens a field to type this sheet’s floor level', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'A floor level draws the columns that reach it, and shows the ones that end just under it dashed.' });
|
|
2388
|
+
def('steel.cut-level-field', { label: 'Floor level', actsOn: 'Holds the floor level you are typing for this sheet', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Read in the project’s units. It shows what the number means and how many columns it would draw before you set it.' });
|
|
2389
|
+
def('steel.cut-level-set', { label: 'Set level', actsOn: 'Sets this sheet’s floor level to what you typed', group: 'On the steel canvas', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The columns that reach the level appear on the sheet. Undo takes the level away again.' });
|
|
2390
|
+
def('steel.cut-level-cancel', { label: 'Cancel', actsOn: 'Closes the floor level field without changing the sheet', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
2391
|
+
def('steel.show-all-columns', { label: 'Show all columns here', actsOn: 'Places every column of the model on this sheet by hand', group: 'On the steel canvas', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'They stay on the sheet even if you set a level later. Undo takes them off again.' });
|
|
2392
|
+
def('steel.cut-banner-hide', { label: 'Not now', actsOn: 'Folds the missing floor level notice into a small label until you reload', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The sheet still has no floor level; the label stays so you can open the notice again.' });
|
|
2393
|
+
def('steel.cut-banner-show', { label: 'Floor level notice', actsOn: 'Opens the notice about this sheet’s missing floor level again', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
2394
|
+
def('steel.floor-level-field', { label: 'Floor level', actsOn: 'Holds this sheet’s floor level, and shows what a level you type would draw', group: 'In the Properties panel', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'It is always here, so a level can be corrected after it was set. Read in the project’s units.' });
|
|
2395
|
+
def('steel.floor-level-set', { label: 'Set level', actsOn: 'Sets this sheet’s floor level to what you typed', group: 'In the Properties panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The columns that reach the level appear on the sheet. Undo puts the old level back.' });
|
|
2396
|
+
def('steel.delete-from-model', { label: 'Delete from the whole model', actsOn: 'Removes the selected columns from the model, so from every sheet', group: 'In the Properties panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The Delete key leaves a column the sheet only draws from its floor level; this is the explicit way to remove it. Undo brings it back.' });
|
|
2397
|
+
def('steel.delete-anyway', { label: 'Delete anyway', actsOn: 'Removes the selected members from the model although the drawing read recorded them, and drops the read’s link to each', group: 'In the Properties panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The read keeps its record of each one, with a note that it was deleted on purpose. Anything else attached to a member (a connection, a dimension, a placed detail) still has to go first. One Undo brings back the members and the links.' });
|
|
2398
|
+
def('steel.add-to-view', { label: 'Add to this sheet', actsOn: 'Draws the selected members that this sheet does not show', group: 'In the Properties panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'It places them on this sheet by hand. They stay there, and Undo takes them off again.' });
|
|
2305
2399
|
def('steel.review-select', { label: 'Select this connection', actsOn: 'Selects {instance} from the review list', group: 'In the review list', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'A watched connection selects the members it watches; an unwatched one opens the 3D view and selects the connection itself.' });
|
|
2306
2400
|
def('steel.chat-question-show', { label: 'Show in chat', actsOn: 'Opens AI Chat at the question “{instance}”', anyInstance: 'a question asked about this object', group: 'In the Properties panel', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'A question stays linked to the objects selected when it was asked, and to the objects the AI’s answer named.' });
|
|
2307
2401
|
def('steel.chat-questions-more', { label: 'Show more questions', actsOn: 'Shows the older questions asked in AI Chat about the selection', group: 'In the Properties panel', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
@@ -2355,6 +2449,11 @@
|
|
|
2355
2449
|
def('steel.member-profile', { label: 'Profile', actsOn: 'Changes the profile of the selected member', group: 'In the Properties panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Unlike Current profile in Add mode, this edits steel already in the model.' });
|
|
2356
2450
|
def('steel.member-material', { label: 'Material grade', actsOn: 'Changes the selected member\'s explicit material', group: 'In the Properties panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Unlike the Add preset, this edits steel already in the model.' });
|
|
2357
2451
|
def('steel.member-verified', { label: 'Mark verified', actsOn: 'Marks or unmarks the selected member as human-confirmed', group: 'In the Properties panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
2452
|
+
def('steel.member-moment-frame', { label: 'Moment frame', actsOn: 'Marks or unmarks the selected beam as a moment-frame girder', group: 'In the Properties panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'A moment-frame girder takes a moment connection, so the automatic shear plates skip its ends. If it already has automatic shear plates you are asked whether to remove them; a plate you tuned by hand always stays.' });
|
|
2453
|
+
def('steel.moment-frame-plates-remove', { label: 'Remove the automatic shear plates', actsOn: 'Removes the automatic shear plates from the beams just marked as moment frame', group: 'In the Properties panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Only the plates the Shear plates button added are removed, in one step. A plate you tuned by hand stays. Ctrl+Z brings them back.' });
|
|
2454
|
+
def('steel.moment-frame-plates-keep', { label: 'Keep the automatic shear plates', actsOn: 'Leaves the automatic shear plates on the beams just marked as moment frame', group: 'In the Properties panel', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Nothing changes. The plates stay until you clear them.' });
|
|
2455
|
+
def('steel.selection-moment-frame', { label: 'Mark beams as moment frame', actsOn: 'Marks or unmarks every selected beam as a moment-frame girder', group: 'In the Properties panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Columns and braces in the selection are left alone.' });
|
|
2456
|
+
def('steel.member-open-frames', { label: 'Open Frames from the member', actsOn: 'Opens the moment frame schedule at what this beam needs: a frame, a level for this sheet, or girder sizes', group: 'In the Properties panel', persistence: 'none', interaction: 'dialog', risk: [], guidance: 'on-demand' });
|
|
2358
2457
|
def('steel.member-profile-suggestion', { label: 'Moment-frame profile', actsOn: 'Applies the scheduled profile for {instance}', group: 'In the Properties panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The suggestion comes from the imported moment-frame schedule and records that provenance.' });
|
|
2359
2458
|
def('steel.properties-pin', { label: 'Pin Properties', actsOn: 'Keeps the Properties popup open while the selection changes', group: 'In the Properties popup', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
2360
2459
|
def('steel.properties-clear', { label: 'Clear all properties', actsOn: 'Unchecks every property label', group: 'In the Properties popup', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Visibility can remain on with no property selected; no labels are drawn in that state.' });
|
|
@@ -2369,6 +2468,8 @@
|
|
|
2369
2468
|
def('steel.member-type', { label: 'Member type', actsOn: 'Sets the member category for {instance}', group: 'In the Properties panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The type controls role-specific editing and how the member is grouped in the legend.' });
|
|
2370
2469
|
def('steel.selection-drop-type', { label: 'Narrow mixed selection', actsOn: 'Drops or isolates {instance}', group: 'In the Properties panel', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Activate to drop that type; hold Alt while activating to keep only it.' });
|
|
2371
2470
|
def('steel.detail-rename', { label: 'Rename detail', actsOn: 'Renames the detail and every reference to {instance}', group: 'In the Details dialog', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Callouts, member ends and connection-library rows are updated together.' });
|
|
2471
|
+
def('steel.detail-delete-both', { label: 'Delete picture and its copies', actsOn: 'Deletes {instance} and every placed copy made from it', group: 'In the Details dialog', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Asked only when placed copies still use the picture. Undo brings the picture and its copies back together.' });
|
|
2472
|
+
def('steel.detail-delete-keep', { label: 'Keep the picture', actsOn: 'Leaves {instance} and its placed copies as they are', group: 'In the Details dialog', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
2372
2473
|
def('steel.connection-row-field', { label: 'Connection library field', actsOn: 'Sets the value for {instance}', group: 'In the Connections dialog', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
2373
2474
|
def('steel.connection-row-delete', { label: 'Remove connection row', actsOn: 'Deletes the connection-library row for {instance}', group: 'In the Connections dialog', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Used rows require confirmation. Placed geometry remains but loses its recipe reference.' });
|
|
2374
2475
|
def('steel.rfi-profile', { label: 'Set RFI profile', actsOn: 'Sets the live profile for {instance} so FloLess can price the member and check any filed size answer', group: 'In the RFI dialog', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
package/dist/web/guide.js
CHANGED
|
@@ -402,8 +402,9 @@
|
|
|
402
402
|
'While you talk, the Guide may open more files or folders to answer you.',
|
|
403
403
|
], (line) => line));
|
|
404
404
|
const lock = el('div', 'guide-callout');
|
|
405
|
-
|
|
406
|
-
|
|
405
|
+
// #2234: the Guide starts Read only; what FloLess starts by itself stays Read only; its Access can be changed.
|
|
406
|
+
lock.append(el('strong', '', 'It starts Read only. '),
|
|
407
|
+
document.createTextNode('The looks and morning briefings FloLess starts always run Read only. In your own messages, the Guide can change things only if you change its Access in the chat, like any other conversation. Read only stops the AI’s file tools from changing files, but it is not a lock on reading: the AI program can open any folder you can.'));
|
|
407
408
|
const where = el('p', 'guide-copy');
|
|
408
409
|
where.textContent = `What the Guide sees is sent to ${providerName} under your own subscription, and kept in this conversation’s history on this computer. You can turn the Guide off or delete its history at any time; whatever ${providerName} already received stays under its own rules.`;
|
|
409
410
|
const gives = el('p', 'guide-copy', 'You get a short briefing on what you seem to be working on, then suggested next moves as buttons.');
|
|
@@ -665,7 +666,7 @@
|
|
|
665
666
|
function moveText(move) {
|
|
666
667
|
switch (move?.kind) {
|
|
667
668
|
case 'install-tool': return { title: `Install ${move.toolName}`, action: 'Review and install…' };
|
|
668
|
-
case 'create-workflow': return { title: `
|
|
669
|
+
case 'create-workflow': return { title: `Build a workflow: ${move.name}`, action: 'Build it', detail: move.purpose };
|
|
669
670
|
case 'create-agent': return { title: `Set up an agent: ${move.name}`, action: 'Review this agent…' };
|
|
670
671
|
case 'create-routine': return { title: `Run ${move.target?.name || 'it'} on a schedule`, action: 'Set up the schedule…' };
|
|
671
672
|
case 'open': return { title: `Open ${PAGE_LABEL[move.page] || 'this page'}`, action: `Open ${PAGE_LABEL[move.page] || 'it'}` };
|
|
@@ -680,9 +681,6 @@
|
|
|
680
681
|
case 'install-tool':
|
|
681
682
|
if (typeof openLibrary !== 'function') return false;
|
|
682
683
|
openLibrary(move.toolId, { tab: 'available' }); return true; // not installed yet: where its Install button is
|
|
683
|
-
case 'create-workflow':
|
|
684
|
-
if (typeof bridge?.newWorkflow !== 'function') return false;
|
|
685
|
-
await bridge.newWorkflow({ name: move.name }); return true;
|
|
686
684
|
case 'create-agent':
|
|
687
685
|
return Boolean(await window.flolessAgents?.newDraft?.({ name: move.name, instructions: move.instructions }));
|
|
688
686
|
case 'create-routine':
|
|
@@ -704,10 +702,45 @@
|
|
|
704
702
|
// #2054: Not now is remembered by the server for the signed-in account, by what the move is about (its key), so the
|
|
705
703
|
// Guide never suggests it again — in a later answer, after a reload, or in another browser — until the person brings
|
|
706
704
|
// it back (Undo on the card, or Bring back in the Guide's settings in AI Chat).
|
|
707
|
-
// A list change repaints every card on the page
|
|
708
|
-
//
|
|
705
|
+
// A list change repaints every card on the page and every card AI Chat keeps (cardsByEvent, below): one not on the
|
|
706
|
+
// page yet (AI Chat builds a card before it inserts it), or off it while another conversation is open.
|
|
709
707
|
const cardPainters = new WeakMap();
|
|
710
|
-
|
|
708
|
+
// #2185: what came of a workflow card's button, by suggestion id, from its next-move-update events (with the event's
|
|
709
|
+
// sequence, so a replay of it is recognised).
|
|
710
|
+
const moveUpdates = new Map();
|
|
711
|
+
// #2185: one card element per suggestion, by its event id (which is its suggestion id, so an update finds it here).
|
|
712
|
+
// AI Chat draws its conversation again every few seconds; it gets the same card back, so what the card is doing (a
|
|
713
|
+
// press waiting, what it said, the keyboard focus) is never lost.
|
|
714
|
+
// ponytail: both maps keep every suggestion this page has drawn (a reload clears them). Any cap thrashes once one
|
|
715
|
+
// conversation outgrows it (each redraw evicts the card it is about to ask for), and a Guide conversation the morning
|
|
716
|
+
// briefing adds to daily outgrows any small one; cap by conversation if a page ever holds thousands.
|
|
717
|
+
const cardsByEvent = new Map();
|
|
718
|
+
// #2185: which tools are installed, so an install card can tick itself off ("✓ Trimble Connect installed") instead of
|
|
719
|
+
// offering the install again. Read when a card is first drawn and again when the server says something was installed
|
|
720
|
+
// (`floless:connections-changed`); a repaint happens only for a card whose answer changed, never per replay.
|
|
721
|
+
const installedTools = { ids: null, loading: false, again: false, failedAt: 0 };
|
|
722
|
+
const installWatchers = new Set();
|
|
723
|
+
function toolIsInstalled(toolId) { return installedTools.ids ? installedTools.ids.has(toolId) : null; }
|
|
724
|
+
async function refreshInstalledTools(force) {
|
|
725
|
+
if (installedTools.loading) { if (force) installedTools.again = true; return; }
|
|
726
|
+
// After a failed read, wait half a minute: AI Chat redraws its cards every few seconds and each would ask again.
|
|
727
|
+
if (!force && (installedTools.ids || Date.now() - installedTools.failedAt < 30_000)) return;
|
|
728
|
+
installedTools.loading = true;
|
|
729
|
+
try {
|
|
730
|
+
const body = await api('/api/agents');
|
|
731
|
+
installedTools.ids = new Set((Array.isArray(body?.agents) ? body.agents : []).map((agent) => agent?.id).filter((id) => typeof id === 'string'));
|
|
732
|
+
installedTools.failedAt = 0;
|
|
733
|
+
for (const check of installWatchers) check();
|
|
734
|
+
} catch (error) {
|
|
735
|
+
// Cards stay as drawn: the button's own re-check still says "already installed".
|
|
736
|
+
installedTools.failedAt = Date.now();
|
|
737
|
+
console.warn('[guide] could not read which tools are installed:', error);
|
|
738
|
+
} finally {
|
|
739
|
+
installedTools.loading = false;
|
|
740
|
+
if (installedTools.again) { installedTools.again = false; void refreshInstalledTools(true); }
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
window.addEventListener('floless:connections-changed', () => { if (installWatchers.size) void refreshInstalledTools(true); });
|
|
711
744
|
let statusLoad = null;
|
|
712
745
|
let statusFailedAt = 0;
|
|
713
746
|
|
|
@@ -726,8 +759,7 @@
|
|
|
726
759
|
|
|
727
760
|
function setSetAside(rows) {
|
|
728
761
|
state.setAside = Array.isArray(rows) ? rows : [];
|
|
729
|
-
for (const card of document.querySelectorAll('.guide-move-card')
|
|
730
|
-
for (const card of unplacedCards) cardPainters.get(card)?.();
|
|
762
|
+
for (const card of new Set([...document.querySelectorAll('.guide-move-card'), ...cardsByEvent.values()])) cardPainters.get(card)?.();
|
|
731
763
|
paintSetAside();
|
|
732
764
|
}
|
|
733
765
|
|
|
@@ -802,6 +834,8 @@
|
|
|
802
834
|
// A card from before #2054 has no key: it is matched to the list by its move, and the server returns its key on Not now.
|
|
803
835
|
let moveKey = typeof payload.moveKey === 'string' ? payload.moveKey : '';
|
|
804
836
|
if (!text) return null;
|
|
837
|
+
const drawn = cardsByEvent.get(event.eventId);
|
|
838
|
+
if (drawn) return drawn;
|
|
805
839
|
ensureSetAsideLoaded();
|
|
806
840
|
const card = el('section', 'ai-chat-filter-card ai-chat-connection-card guide-move-card');
|
|
807
841
|
card.dataset.eventId = event.eventId;
|
|
@@ -810,6 +844,10 @@
|
|
|
810
844
|
card.setAttribute('aria-label', `Suggestion: ${text.title}`);
|
|
811
845
|
const status = el('p', 'ai-chat-filter-note guide-move-status');
|
|
812
846
|
status.setAttribute('role', 'status');
|
|
847
|
+
// A button press in progress — { commandId, label } — on this card: every drawing keeps every button waiting for it.
|
|
848
|
+
let pending = null;
|
|
849
|
+
// #2185: an install card's last painted answer (installed or not), so only a real change repaints it.
|
|
850
|
+
let paintedInstalled = null;
|
|
813
851
|
const paintCard = () => {
|
|
814
852
|
const focusBack = card.contains(document.activeElement);
|
|
815
853
|
card.replaceChildren();
|
|
@@ -822,16 +860,38 @@
|
|
|
822
860
|
undo.dataset.commandId = 'shell.guide-move-undo';
|
|
823
861
|
undo.dataset.commandInstanceLabel = text.title;
|
|
824
862
|
undo.dataset.tip = 'Shows this suggestion again. The Guide may also bring it up later.';
|
|
863
|
+
// A press in progress on this card (its workflow building, set aside meanwhile in another tab) holds Undo too.
|
|
864
|
+
undo.disabled = Boolean(pending);
|
|
825
865
|
undo.addEventListener('click', async () => {
|
|
866
|
+
pending = { commandId: 'shell.guide-move-undo', label: 'Undo' };
|
|
826
867
|
undo.disabled = true; status.textContent = '';
|
|
827
868
|
try { await moveAside(move, false, moveKey); }
|
|
828
|
-
catch (error) {
|
|
869
|
+
catch (error) { status.textContent = error.message; }
|
|
870
|
+
finally { pending = null; paintCard(); }
|
|
829
871
|
});
|
|
830
872
|
line.append(el('span', '', `Not now: ${text.title}`), undo);
|
|
831
873
|
card.append(line, status);
|
|
832
874
|
if (focusBack) undo.focus();
|
|
833
875
|
return;
|
|
834
876
|
}
|
|
877
|
+
if (move.kind === 'create-workflow') {
|
|
878
|
+
paintWorkflowCard(focusBack);
|
|
879
|
+
return;
|
|
880
|
+
}
|
|
881
|
+
paintedInstalled = move.kind === 'install-tool' ? toolIsInstalled(move.toolId) === true : null;
|
|
882
|
+
card.setAttribute('aria-label', paintedInstalled ? `Installed: ${move.toolName}` : `Suggestion: ${text.title}`);
|
|
883
|
+
if (paintedInstalled) {
|
|
884
|
+
// Done: say what was installed and stop asking. The buttons that were here are gone, so the keyboard stays on the card.
|
|
885
|
+
const head = el('div', 'ai-chat-filter-card-head');
|
|
886
|
+
head.append(el('span', 'guide-move-eyebrow', 'Done'), el('strong', ''));
|
|
887
|
+
const tick = el('span', '', '✓ '); tick.setAttribute('aria-hidden', 'true');
|
|
888
|
+
head.lastChild.append(tick, document.createTextNode(`${move.toolName} installed`));
|
|
889
|
+
card.classList.add('is-connected');
|
|
890
|
+
card.append(head, el('p', 'ai-chat-filter-note', 'Ready to use.'), status);
|
|
891
|
+
if (focusBack) { card.tabIndex = -1; card.focus({ preventScroll: true }); }
|
|
892
|
+
return;
|
|
893
|
+
}
|
|
894
|
+
card.classList.remove('is-connected');
|
|
835
895
|
const head = el('div', 'ai-chat-filter-card-head');
|
|
836
896
|
head.append(el('span', 'guide-move-eyebrow', 'Suggested'), el('strong', '', text.title));
|
|
837
897
|
card.append(head);
|
|
@@ -877,9 +937,137 @@
|
|
|
877
937
|
card.append(actions, el('p', 'ai-chat-filter-note', 'Nothing happens until you confirm in the next step.'), status);
|
|
878
938
|
if (focusBack) go.focus();
|
|
879
939
|
};
|
|
940
|
+
/**
|
|
941
|
+
* #2185: a workflow suggestion builds in the workflow's own conversation, once per card. Offer: Build it, Edit details…,
|
|
942
|
+
* Not now. Afterwards the card says what happened — a statement, never the question again — and its buttons open
|
|
943
|
+
* that same workflow, because the server answers every repeat of this card with the build it already made.
|
|
944
|
+
*/
|
|
945
|
+
function paintWorkflowCard(focusBack) {
|
|
946
|
+
const moveId = typeof payload.moveId === 'string' ? payload.moveId : event.eventId;
|
|
947
|
+
const update = moveUpdates.get(moveId);
|
|
948
|
+
const guide = { chatId: event.chatId, moveId };
|
|
949
|
+
const workflowName = update?.workflowName || move.name;
|
|
950
|
+
const head = el('div', 'ai-chat-filter-card-head');
|
|
951
|
+
const actions = el('div', 'ai-chat-filter-actions');
|
|
952
|
+
// Every button waits for the one pressed (`pending`, applied again at the end of every drawing), so Not now cannot
|
|
953
|
+
// set aside a workflow being built, nor Build it slip in while it is being set aside.
|
|
954
|
+
const applyPending = () => {
|
|
955
|
+
for (const node of actions.querySelectorAll('button')) {
|
|
956
|
+
node.disabled = Boolean(pending);
|
|
957
|
+
if (pending && node.dataset.commandId === pending.commandId) { node.setAttribute('aria-busy', 'true'); node.textContent = pending.label; }
|
|
958
|
+
}
|
|
959
|
+
};
|
|
960
|
+
const busy = (node, label) => { pending = { commandId: node.dataset.commandId, label }; status.textContent = ''; applyPending(); };
|
|
961
|
+
const done = () => {
|
|
962
|
+
pending = null;
|
|
963
|
+
paintCard();
|
|
964
|
+
// A disabled button drops focus to the page; put it back on this card (on Try again after a repaint).
|
|
965
|
+
if (!document.activeElement || document.activeElement === document.body) card.querySelector('button:not([disabled])')?.focus();
|
|
966
|
+
};
|
|
967
|
+
const built = (result) => {
|
|
968
|
+
if (!result?.workflow) return;
|
|
969
|
+
// Keeps the sequence of the update already shown, so a replay of it (or of an older one) is still recognised.
|
|
970
|
+
moveUpdates.set(moveId, { moveId, state: 'building', workflowId: result.workflow.workflowId, workflowName: result.workflow.displayName,
|
|
971
|
+
sequence: moveUpdates.get(moveId)?.sequence });
|
|
972
|
+
paintCard();
|
|
973
|
+
};
|
|
974
|
+
// The failed card already shows why; the line under the buttons says only what that card does not.
|
|
975
|
+
const say = (error) => { if (moveUpdates.get(moveId)?.reason !== error?.message) status.textContent = error?.message || ''; };
|
|
976
|
+
const missing = () => new Error('FloLess is still starting. Try again in a moment.');
|
|
977
|
+
const build = async (node, label, busyLabel = 'Starting…', reopen = false) => {
|
|
978
|
+
busy(node, busyLabel);
|
|
979
|
+
try {
|
|
980
|
+
if (typeof window.flolessBridge?.buildWorkflow !== 'function') throw missing();
|
|
981
|
+
built(await window.flolessBridge.buildWorkflow({ buildId: moveId, payload: { source: 'guide', guideChatId: guide.chatId, moveId }, reopen }));
|
|
982
|
+
} catch (error) { say(error); }
|
|
983
|
+
finally { done(); }
|
|
984
|
+
};
|
|
985
|
+
const button = (label, commandId, tip, className = '') => {
|
|
986
|
+
const node = el('button', className, label);
|
|
987
|
+
node.type = 'button';
|
|
988
|
+
node.dataset.commandId = commandId;
|
|
989
|
+
node.dataset.commandInstanceLabel = workflowName;
|
|
990
|
+
node.dataset.tip = tip;
|
|
991
|
+
return node;
|
|
992
|
+
};
|
|
993
|
+
let first = null;
|
|
994
|
+
if (update?.state === 'building') {
|
|
995
|
+
// The card stays in the Guide for days, so it says what happened, not that the AI is still working.
|
|
996
|
+
card.setAttribute('aria-label', `Draft created: ${workflowName}`);
|
|
997
|
+
head.append(el('span', 'guide-move-eyebrow', 'Draft created'), el('strong', '', workflowName));
|
|
998
|
+
card.append(head, el('p', 'ai-chat-filter-why', 'It is built in the workflow’s own chat. You can leave and come back.'));
|
|
999
|
+
const open = button('Open workflow', 'shell.guide-move-open-workflow', 'Opens this workflow’s build conversation. If the AI never got its first message, this sends it again.', 'ai-chat-filter-apply');
|
|
1000
|
+
open.addEventListener('click', () => build(open, 'Open workflow', 'Opening…', true));
|
|
1001
|
+
actions.append(open); first = open;
|
|
1002
|
+
card.append(actions, status);
|
|
1003
|
+
} else if (update?.state === 'failed') {
|
|
1004
|
+
card.setAttribute('aria-label', `Not started: ${workflowName}`);
|
|
1005
|
+
head.append(el('span', 'guide-move-eyebrow', 'Not started'), el('strong', '', `“${workflowName}” is saved as a draft, but its chat didn’t start`));
|
|
1006
|
+
card.append(head);
|
|
1007
|
+
const retry = button('Try again', 'shell.guide-move-retry', 'Starts the AI chat for this workflow again, on the draft already saved.', 'ai-chat-filter-apply');
|
|
1008
|
+
if (update.reason) {
|
|
1009
|
+
const reason = el('p', 'ai-chat-filter-why', update.reason);
|
|
1010
|
+
reason.id = `guide-move-reason-${moveId}`;
|
|
1011
|
+
retry.setAttribute('aria-describedby', reason.id);
|
|
1012
|
+
card.append(reason);
|
|
1013
|
+
}
|
|
1014
|
+
retry.addEventListener('click', () => build(retry, 'Try again'));
|
|
1015
|
+
const open = button('Open workflow', 'shell.guide-move-open-draft', 'Opens the saved draft on the Workflows page.');
|
|
1016
|
+
open.addEventListener('click', async () => {
|
|
1017
|
+
busy(open, 'Opening…');
|
|
1018
|
+
try {
|
|
1019
|
+
if (typeof window.flolessBridge?.openOwnedWorkflow !== 'function') throw missing();
|
|
1020
|
+
await window.flolessBridge.openOwnedWorkflow(update.workflowId);
|
|
1021
|
+
} catch (error) { say(error); }
|
|
1022
|
+
finally { done(); }
|
|
1023
|
+
});
|
|
1024
|
+
actions.append(retry, open); first = retry;
|
|
1025
|
+
card.append(actions, status);
|
|
1026
|
+
} else {
|
|
1027
|
+
card.setAttribute('aria-label', `Suggestion: ${text.title}`);
|
|
1028
|
+
head.append(el('span', 'guide-move-eyebrow', 'Suggested'), el('strong', '', text.title));
|
|
1029
|
+
card.append(head);
|
|
1030
|
+
if (text.detail) card.append(el('p', 'ai-chat-filter-why', text.detail));
|
|
1031
|
+
const why = typeof payload.why === 'string' ? payload.why.trim() : '';
|
|
1032
|
+
if (why) card.append(el('p', 'ai-chat-filter-why', why));
|
|
1033
|
+
const go = button('Build it', 'shell.guide-move-build', 'Creates this workflow and starts building it with the AI in its own chat. Pressing it again opens the same workflow.', 'ai-chat-filter-apply');
|
|
1034
|
+
go.addEventListener('click', () => build(go, 'Build it'));
|
|
1035
|
+
const edit = button('Edit details…', 'shell.guide-move-edit', 'Rename it and choose where it belongs before it is built.');
|
|
1036
|
+
edit.addEventListener('click', async () => {
|
|
1037
|
+
busy(edit, 'Edit details…');
|
|
1038
|
+
try {
|
|
1039
|
+
if (typeof window.flolessBridge?.newWorkflow !== 'function') throw missing();
|
|
1040
|
+
built(await window.flolessBridge.newWorkflow({ name: move.name, guide }));
|
|
1041
|
+
} catch (error) { say(error); }
|
|
1042
|
+
finally { done(); }
|
|
1043
|
+
});
|
|
1044
|
+
const later = button('Not now', 'shell.guide-move-not-now', 'Sets this suggestion aside, and the Guide won’t suggest it again. You can bring it back.');
|
|
1045
|
+
later.dataset.commandInstanceLabel = text.title;
|
|
1046
|
+
later.addEventListener('click', async () => {
|
|
1047
|
+
// Build it waits too: a workflow built while it is being set aside would be folded away with the card.
|
|
1048
|
+
busy(later, 'Not now');
|
|
1049
|
+
try {
|
|
1050
|
+
const answer = await moveAside(move, true);
|
|
1051
|
+
if (answer?.key) moveKey = answer.key;
|
|
1052
|
+
} catch (error) { status.textContent = error.message; }
|
|
1053
|
+
finally { done(); }
|
|
1054
|
+
});
|
|
1055
|
+
// Build it has no confirm step, so this note is the whole warning: Build it points a screen reader at it.
|
|
1056
|
+
const note = el('p', 'ai-chat-filter-note', 'Creates a draft workflow and opens a chat where the AI starts building it. It asks you before any run that sends data off this computer.');
|
|
1057
|
+
note.id = `guide-move-note-${moveId}`;
|
|
1058
|
+
go.setAttribute('aria-describedby', note.id);
|
|
1059
|
+
actions.append(go, edit, later); first = go;
|
|
1060
|
+
card.append(actions, note, status);
|
|
1061
|
+
}
|
|
1062
|
+
applyPending();
|
|
1063
|
+
if (focusBack && first && !pending) first.focus();
|
|
1064
|
+
}
|
|
880
1065
|
cardPainters.set(card, paintCard);
|
|
881
|
-
|
|
882
|
-
if (
|
|
1066
|
+
cardsByEvent.set(event.eventId, card);
|
|
1067
|
+
if (move.kind === 'install-tool') {
|
|
1068
|
+
installWatchers.add(() => { if (toolIsInstalled(move.toolId) === true && paintedInstalled !== true) paintCard(); });
|
|
1069
|
+
void refreshInstalledTools(false);
|
|
1070
|
+
}
|
|
883
1071
|
paintCard();
|
|
884
1072
|
return card;
|
|
885
1073
|
}
|
|
@@ -923,7 +1111,7 @@
|
|
|
923
1111
|
const more = el('details', 'guide-preview-disclosure');
|
|
924
1112
|
const summary = el('summary', '', 'What the AI can and can’t do');
|
|
925
1113
|
summary.dataset.commandId = commandId;
|
|
926
|
-
more.append(summary, el('p', 'guide-switch-help', `While writing, the AI may open more of your files to understand them, as it can in the Guide chat.
|
|
1114
|
+
more.append(summary, el('p', 'guide-switch-help', `While writing, the AI may open more of your files to understand them, as it can in the Guide chat. The briefing runs Read only, whatever Access the Guide chat has. Nobody is watching, so anything it asks permission for is declined. You can pause it, turn it off, or delete the Guide history at any time; whatever ${ai} already received stays under its own rules.`));
|
|
927
1115
|
if (open) more.open = true;
|
|
928
1116
|
wrap.append(lead, more);
|
|
929
1117
|
return { wrap, leadId: lead.id };
|
|
@@ -1304,7 +1492,20 @@
|
|
|
1304
1492
|
void refreshBriefing();
|
|
1305
1493
|
});
|
|
1306
1494
|
|
|
1307
|
-
|
|
1495
|
+
/** #2185: a next-move-update event: remember what came of that card's button and repaint the card if it is drawn. */
|
|
1496
|
+
function applyMoveUpdate(event) {
|
|
1497
|
+
const update = event?.payload;
|
|
1498
|
+
if (!update || typeof update.moveId !== 'string') return;
|
|
1499
|
+
// AI Chat replays the whole conversation each time it draws it: only an update newer than the one shown repaints the
|
|
1500
|
+
// card, because a repaint replaces its buttons and the keyboard focus on one.
|
|
1501
|
+
const sequence = Number(event.sequence);
|
|
1502
|
+
if (sequence <= moveUpdates.get(update.moveId)?.sequence) return;
|
|
1503
|
+
moveUpdates.set(update.moveId, { ...update, sequence });
|
|
1504
|
+
const card = cardsByEvent.get(update.moveId);
|
|
1505
|
+
if (card) cardPainters.get(card)?.();
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
window.flolessGuide = { open, maybeAskOnLaunch, turnOff, deleteHistory, renderNextMove, applyMoveUpdate, status: loadStatus, paintBriefing, refreshBriefing };
|
|
1308
1509
|
|
|
1309
1510
|
// Ask once, after AI Chat is ready and the app has settled.
|
|
1310
1511
|
// #2053: and, once settled, whether a morning briefing is ready or needs an answer.
|