@duckmind/dm-darwin-x64 0.35.3 → 0.35.4
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.
|
@@ -32,6 +32,7 @@ export type AnimationRuntimeState = {
|
|
|
32
32
|
workingMessageApplied: boolean;
|
|
33
33
|
workingWidgetApplied: boolean;
|
|
34
34
|
workingIndicatorHidden: boolean;
|
|
35
|
+
lastWorkingMessage: string | undefined;
|
|
35
36
|
lastWorkingLines: number;
|
|
36
37
|
lastWorkingLineWidths: number[];
|
|
37
38
|
currentAssistantMessage: any;
|
|
@@ -112,10 +113,11 @@ function createDefaultAnimationsRuntimeState(): AnimationRuntimeState {
|
|
|
112
113
|
toolOwners: new Map(),
|
|
113
114
|
ignoredAgentContexts: new WeakSet(),
|
|
114
115
|
hiddenLabelApplied: false,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
workingMessageApplied: false,
|
|
117
|
+
workingWidgetApplied: false,
|
|
118
|
+
workingIndicatorHidden: false,
|
|
119
|
+
lastWorkingMessage: undefined,
|
|
120
|
+
lastWorkingLines: 0,
|
|
119
121
|
lastWorkingLineWidths: [],
|
|
120
122
|
currentAssistantMessage: undefined,
|
|
121
123
|
freezeGeneration: 0,
|
|
@@ -142,6 +144,7 @@ function migrateAnimationsRuntimeState(existing: Partial<AnimationRuntimeState>)
|
|
|
142
144
|
if (typeof existing.workingMessageApplied !== "boolean") existing.workingMessageApplied = false;
|
|
143
145
|
if (typeof existing.workingWidgetApplied !== "boolean") existing.workingWidgetApplied = false;
|
|
144
146
|
if (typeof existing.workingIndicatorHidden !== "boolean") existing.workingIndicatorHidden = false;
|
|
147
|
+
if (typeof existing.lastWorkingMessage !== "string") existing.lastWorkingMessage = undefined;
|
|
145
148
|
if (typeof existing.lastWorkingLines !== "number") existing.lastWorkingLines = 0;
|
|
146
149
|
if (!Array.isArray(existing.lastWorkingLineWidths)) existing.lastWorkingLineWidths = [];
|
|
147
150
|
if (!("currentAssistantMessage" in existing)) existing.currentAssistantMessage = undefined;
|
|
@@ -366,9 +369,12 @@ function renderWorkingAnimationFrame(state: AnimationRuntimeState, ui: any): boo
|
|
|
366
369
|
const width = resolveAnimationWidth(state.settings.width, process.stdout.columns || 80);
|
|
367
370
|
const lines = renderAnimationFrame(resolveAnimationNameForPhase(state, phase), state.frame, width, phase);
|
|
368
371
|
if (isAnimationDebugEnabled()) state.lastWorkingLineWidths = summarizeWorkingLineWidths(lines);
|
|
369
|
-
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
+
restoreWorkingIndicator(state, ui);
|
|
373
|
+
const message = stableWorkingMessageForPhase(phase);
|
|
374
|
+
if (state.lastWorkingMessage !== message) {
|
|
375
|
+
ui.setWorkingMessage(message);
|
|
376
|
+
state.lastWorkingMessage = message;
|
|
377
|
+
}
|
|
372
378
|
state.workingMessageApplied = true;
|
|
373
379
|
writeAnimationDebugLog({ event: "working_render", state });
|
|
374
380
|
if (state.workingWidgetApplied && typeof ui?.setWidget === "function") {
|
|
@@ -414,6 +420,7 @@ function clearWorkingAnimation(state: AnimationRuntimeState): void {
|
|
|
414
420
|
state.workingMessageApplied = false;
|
|
415
421
|
state.workingWidgetApplied = false;
|
|
416
422
|
state.workingIndicatorHidden = false;
|
|
423
|
+
state.lastWorkingMessage = undefined;
|
|
417
424
|
state.lastWorkingLines = 0;
|
|
418
425
|
state.lastWorkingLineWidths = [];
|
|
419
426
|
if (!shouldClearMessage && !shouldClearWidget && !shouldRestoreIndicator) return;
|
|
@@ -448,6 +455,10 @@ function resolveCurrentPhase(state: AnimationRuntimeState): AnimationPhase {
|
|
|
448
455
|
return "working";
|
|
449
456
|
}
|
|
450
457
|
|
|
458
|
+
function stableWorkingMessageForPhase(phase: AnimationPhase): string {
|
|
459
|
+
return phase === "tool" ? "Running..." : "Working...";
|
|
460
|
+
}
|
|
461
|
+
|
|
451
462
|
function resolveAnimationNameForPhase(state: AnimationRuntimeState, phase: AnimationPhase): string {
|
|
452
463
|
if (!state.settings.randomMode) {
|
|
453
464
|
if (phase === "thinking") return state.settings.thinking;
|