@leanandmean/coding-agent 0.74.1-scramjet.35 → 0.74.1-scramjet.39
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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +1 -0
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +1 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +2 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +15 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +90 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/output-throughput-history.d.ts +25 -0
- package/dist/core/output-throughput-history.d.ts.map +1 -0
- package/dist/core/output-throughput-history.js +240 -0
- package/dist/core/output-throughput-history.js.map +1 -0
- package/dist/core/output-throughput.d.ts +43 -0
- package/dist/core/output-throughput.d.ts.map +1 -0
- package/dist/core/output-throughput.js +161 -0
- package/dist/core/output-throughput.js.map +1 -0
- package/dist/core/sdk.d.ts +2 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +3 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +6 -2
- package/dist/core/skills.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +6 -2
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +3 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +9 -3
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +3 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +8 -2
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +3 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +45 -7
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/models.md +2 -0
- package/docs/skills.md +2 -2
- package/docs/usage.md +3 -1
- package/package.json +8 -4
|
@@ -154,6 +154,8 @@ export class InteractiveMode {
|
|
|
154
154
|
pendingTools = new Map();
|
|
155
155
|
pendingToolFinalizations = new Set();
|
|
156
156
|
agentRunGeneration = 0;
|
|
157
|
+
selectorOpenGeneration = 0;
|
|
158
|
+
pendingSelectorOpenGeneration;
|
|
157
159
|
// Tool output expansion state
|
|
158
160
|
toolOutputExpanded = false;
|
|
159
161
|
// Thinking block visibility state
|
|
@@ -2038,6 +2040,11 @@ export class InteractiveMode {
|
|
|
2038
2040
|
// Set up handlers on defaultEditor - they use this.editor for text access
|
|
2039
2041
|
// so they work correctly regardless of which editor is active
|
|
2040
2042
|
this.defaultEditor.onEscape = () => {
|
|
2043
|
+
if (this.pendingSelectorOpenGeneration !== undefined) {
|
|
2044
|
+
this.selectorOpenGeneration++;
|
|
2045
|
+
this.pendingSelectorOpenGeneration = undefined;
|
|
2046
|
+
return;
|
|
2047
|
+
}
|
|
2041
2048
|
if (this.session.isStreaming) {
|
|
2042
2049
|
this.restoreQueuedMessagesToEditor({ abort: true });
|
|
2043
2050
|
}
|
|
@@ -3396,7 +3403,10 @@ export class InteractiveMode {
|
|
|
3396
3403
|
* @param create Factory that receives a `done` callback and returns the component and focus target
|
|
3397
3404
|
*/
|
|
3398
3405
|
showSelector(create) {
|
|
3406
|
+
this.selectorOpenGeneration++;
|
|
3407
|
+
this.pendingSelectorOpenGeneration = undefined;
|
|
3399
3408
|
const done = () => {
|
|
3409
|
+
this.selectorOpenGeneration++;
|
|
3400
3410
|
this.editorContainer.clear();
|
|
3401
3411
|
this.editorContainer.addChild(this.editor);
|
|
3402
3412
|
this.ui.setFocus(this.editor);
|
|
@@ -3618,7 +3628,22 @@ export class InteractiveMode {
|
|
|
3618
3628
|
// Ignore auth lookup failures for warning-only checks.
|
|
3619
3629
|
}
|
|
3620
3630
|
}
|
|
3621
|
-
|
|
3631
|
+
selectorPreparationIsCurrent(session, generation) {
|
|
3632
|
+
const current = this.isInitialized && this.session === session && this.selectorOpenGeneration === generation;
|
|
3633
|
+
if (!current && this.pendingSelectorOpenGeneration === generation)
|
|
3634
|
+
this.pendingSelectorOpenGeneration = undefined;
|
|
3635
|
+
return current;
|
|
3636
|
+
}
|
|
3637
|
+
// SCRAMJET-DIVERGENCE: Refresh profile-scoped output-rate history before opening model selectors (issue 476).
|
|
3638
|
+
async showModelSelector(initialSearchInput) {
|
|
3639
|
+
const session = this.session;
|
|
3640
|
+
const generation = ++this.selectorOpenGeneration;
|
|
3641
|
+
this.pendingSelectorOpenGeneration = generation;
|
|
3642
|
+
await session.refreshOutputThroughputHistory().catch(() => undefined);
|
|
3643
|
+
if (!this.selectorPreparationIsCurrent(session, generation))
|
|
3644
|
+
return;
|
|
3645
|
+
this.pendingSelectorOpenGeneration = undefined;
|
|
3646
|
+
const outputThroughputHistory = session.outputThroughputHistory;
|
|
3622
3647
|
this.showSelector((done) => {
|
|
3623
3648
|
const selector = new ModelSelectorComponent(this.ui, this.session.model, this.settingsManager, this.session.modelRegistry, this.session.scopedModels, async (model) => {
|
|
3624
3649
|
try {
|
|
@@ -3637,20 +3662,28 @@ export class InteractiveMode {
|
|
|
3637
3662
|
}, () => {
|
|
3638
3663
|
done();
|
|
3639
3664
|
this.ui.requestRender();
|
|
3640
|
-
}, initialSearchInput);
|
|
3665
|
+
}, initialSearchInput, outputThroughputHistory);
|
|
3641
3666
|
return { component: selector, focus: selector };
|
|
3642
3667
|
});
|
|
3643
3668
|
}
|
|
3644
3669
|
async showModelsSelector() {
|
|
3670
|
+
const session = this.session;
|
|
3671
|
+
const generation = ++this.selectorOpenGeneration;
|
|
3672
|
+
this.pendingSelectorOpenGeneration = generation;
|
|
3673
|
+
await session.refreshOutputThroughputHistory().catch(() => undefined);
|
|
3674
|
+
if (!this.selectorPreparationIsCurrent(session, generation))
|
|
3675
|
+
return;
|
|
3676
|
+
const outputThroughputHistory = session.outputThroughputHistory;
|
|
3645
3677
|
// Get all available models
|
|
3646
|
-
|
|
3647
|
-
const allModels =
|
|
3678
|
+
session.modelRegistry.refresh();
|
|
3679
|
+
const allModels = session.modelRegistry.getAvailable();
|
|
3648
3680
|
if (allModels.length === 0) {
|
|
3681
|
+
this.pendingSelectorOpenGeneration = undefined;
|
|
3649
3682
|
this.showStatus("No models available");
|
|
3650
3683
|
return;
|
|
3651
3684
|
}
|
|
3652
3685
|
// Check if session has scoped models (from previous session-only changes or CLI --models)
|
|
3653
|
-
const sessionScopedModels =
|
|
3686
|
+
const sessionScopedModels = session.scopedModels;
|
|
3654
3687
|
const hasSessionScope = sessionScopedModels.length > 0;
|
|
3655
3688
|
// Build enabled model IDs from session state or settings
|
|
3656
3689
|
let currentEnabledIds = null;
|
|
@@ -3662,10 +3695,13 @@ export class InteractiveMode {
|
|
|
3662
3695
|
// Fall back to settings
|
|
3663
3696
|
const patterns = this.settingsManager.getEnabledModels();
|
|
3664
3697
|
if (patterns !== undefined && patterns.length > 0) {
|
|
3665
|
-
const scopedModels = await resolveModelScope(patterns,
|
|
3698
|
+
const scopedModels = await resolveModelScope(patterns, session.modelRegistry);
|
|
3666
3699
|
currentEnabledIds = scopedModels.map((scoped) => `${scoped.model.provider}/${scoped.model.id}`);
|
|
3667
3700
|
}
|
|
3668
3701
|
}
|
|
3702
|
+
if (!this.selectorPreparationIsCurrent(session, generation))
|
|
3703
|
+
return;
|
|
3704
|
+
this.pendingSelectorOpenGeneration = undefined;
|
|
3669
3705
|
// Helper to update session's scoped models (session-only, no persist)
|
|
3670
3706
|
const updateSessionModels = async (enabledIds) => {
|
|
3671
3707
|
currentEnabledIds = enabledIds === null ? null : [...enabledIds];
|
|
@@ -3703,7 +3739,7 @@ export class InteractiveMode {
|
|
|
3703
3739
|
done();
|
|
3704
3740
|
this.ui.requestRender();
|
|
3705
3741
|
},
|
|
3706
|
-
});
|
|
3742
|
+
}, outputThroughputHistory);
|
|
3707
3743
|
return { component: selector, focus: selector };
|
|
3708
3744
|
});
|
|
3709
3745
|
}
|
|
@@ -4787,6 +4823,8 @@ export class InteractiveMode {
|
|
|
4787
4823
|
}
|
|
4788
4824
|
}
|
|
4789
4825
|
stop() {
|
|
4826
|
+
this.selectorOpenGeneration++;
|
|
4827
|
+
this.pendingSelectorOpenGeneration = undefined;
|
|
4790
4828
|
this.unregisterSignalHandlers();
|
|
4791
4829
|
if (this.settingsManager.getShowTerminalProgress()) {
|
|
4792
4830
|
this.ui.terminal.setProgress(false);
|