Found while bringing the four imperative format previews under the #1560 inert-preview mechanism (#1565) - AIAssistantInfiniteCommandSettingsModal.ts is one of the four, and it turns out nothing can reach it.
Describe the bug
CommandType.InfiniteAIAssistant exists, has a full settings modal
(src/gui/MacroGUIs/AIAssistantInfiniteCommandSettingsModal.ts, 275 lines: result
joiner, chunk separator, max chunk tokens, merge chunks, sampling params), a
IInfiniteAIAssistantCommand interface, package-disclosure support
(src/services/packagePreview.ts:637), model-ref pinning
(src/ai/modelRefPinning.ts:15) and a migration
(src/migrations/refreshStaleDefaultModelSeeds.ts:95).
But:
- You cannot create one. The macro builder's add-command menu offers "Add AI
Assistant command" only - there is no InfiniteAIAssistant entry anywhere in
CommandList.svelte or MacroBuilder.ts.
- You cannot configure one.
CommandList.svelte:243 only renders a configure
affordance for CommandType.AIAssistant. Verified live: seeding a macro with
an InfiniteAIAssistant command renders the row with Delete and Reorder
buttons but no Configure button.
- It does nothing at run time.
MacroChoiceEngine.executeCommands
(src/engine/MacroChoiceEngine.ts:292-306) is a flat chain of if (isXCommand(command)) guards with no InfiniteAIAssistant branch and no
else. The command is silently skipped - no error, no notice, no log.
- The modal is only ever constructed from the devMode-only
testQuickAdd
command (src/main.ts:194), which additionally passes
type: CommandType.AIAssistant for an IInfiniteAIAssistantCommand - so even
the dev harness builds a mistyped object.
So the code is dead, but not inertly dead: a package importing a macro that
contains one will show "AI assistant" in the import disclosure
(MacroDisclosure.svelte:16) and then do nothing when the macro runs.
Expected behavior
Either wire the type up (creatable in the macro builder, configurable, executed
by the engine) or remove it and migrate any InfiniteAIAssistant commands found
in existing data - but not the current state, where the disclosure promises a
step that the engine drops on the floor.
Given nobody can have created one through the UI in the currently-supported
versions, removal + a migration that converts them to a plain AIAssistant
command (or drops them with a notice) looks like the smaller, honest fix. Worth
checking whether an older QuickAdd could create them before deciding.
Additional context
Deliberately not folded into #1565's diff, which stays at the preview/call-site
layer. #1565 still fixes this modal's preview so the two AI prompt modals do not
diverge, whichever way this issue is resolved.
Found while bringing the four imperative format previews under the #1560 inert-preview mechanism (#1565) -
AIAssistantInfiniteCommandSettingsModal.tsis one of the four, and it turns out nothing can reach it.Describe the bug
CommandType.InfiniteAIAssistantexists, has a full settings modal(
src/gui/MacroGUIs/AIAssistantInfiniteCommandSettingsModal.ts, 275 lines: resultjoiner, chunk separator, max chunk tokens, merge chunks, sampling params), a
IInfiniteAIAssistantCommandinterface, package-disclosure support(
src/services/packagePreview.ts:637), model-ref pinning(
src/ai/modelRefPinning.ts:15) and a migration(
src/migrations/refreshStaleDefaultModelSeeds.ts:95).But:
Assistant command" only - there is no
InfiniteAIAssistantentry anywhere inCommandList.svelteorMacroBuilder.ts.CommandList.svelte:243only renders a configureaffordance for
CommandType.AIAssistant. Verified live: seeding a macro withan
InfiniteAIAssistantcommand renders the row with Delete and Reorderbuttons but no Configure button.
MacroChoiceEngine.executeCommands(
src/engine/MacroChoiceEngine.ts:292-306) is a flat chain ofif (isXCommand(command))guards with noInfiniteAIAssistantbranch and noelse. The command is silently skipped - no error, no notice, no log.testQuickAddcommand (
src/main.ts:194), which additionally passestype: CommandType.AIAssistantfor anIInfiniteAIAssistantCommand- so eventhe dev harness builds a mistyped object.
So the code is dead, but not inertly dead: a package importing a macro that
contains one will show "AI assistant" in the import disclosure
(
MacroDisclosure.svelte:16) and then do nothing when the macro runs.Expected behavior
Either wire the type up (creatable in the macro builder, configurable, executed
by the engine) or remove it and migrate any
InfiniteAIAssistantcommands foundin existing data - but not the current state, where the disclosure promises a
step that the engine drops on the floor.
Given nobody can have created one through the UI in the currently-supported
versions, removal + a migration that converts them to a plain
AIAssistantcommand (or drops them with a notice) looks like the smaller, honest fix. Worth
checking whether an older QuickAdd could create them before deciding.
Additional context
Deliberately not folded into #1565's diff, which stays at the preview/call-site
layer. #1565 still fixes this modal's preview so the two AI prompt modals do not
diverge, whichever way this issue is resolved.