Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(workflow-progress): Gedankenstriche in Kommentaren und Testnamen entfernt

purple7ca0e5b94a2d
diff --git a/src/hooks/__tests__/workflow-progress-block.test.ts b/src/hooks/__tests__/workflow-progress-block.test.ts
index 14e63c4d..f457ba55 100644
--- a/src/hooks/__tests__/workflow-progress-block.test.ts
+++ b/src/hooks/__tests__/workflow-progress-block.test.ts
@@ -3,14 +3,14 @@
*
* bau/wfprogress.md: the "run workflow <name>" chat trigger used to add ONE
* static assistant message ("Running workflow: **X**...") that never changed
- * for the whole run — the only feedback a multi-minute workflow gave was
+ * for the whole run: the only feedback a multi-minute workflow gave was
* three static dots, unlike every real tool call, which shows a running/
* working ToolCallBlock. This drives the REAL `useAgentChat` hook (the same
* one ChatView uses) over real workflows and asserts on the progress
* message's `agentBlocks`: a single AgentToolCall-shaped block that starts at
* "waiting" for every step, updates to "running"/"done"/"failed" per step,
- * and ends up clickable/expandable with the full step list — reusing
- * ToolCallBlock, not a new component.
+ * and ends up clickable/expandable with the full step list, reusing
+ * ToolCallBlock instead of a new component.
*
* Run: npx vitest run src/hooks/__tests__/workflow-progress-block.test.ts
*/
diff --git a/src/hooks/useAgentChat.ts b/src/hooks/useAgentChat.ts
index a308609e..d5a00212 100644
--- a/src/hooks/useAgentChat.ts
+++ b/src/hooks/useAgentChat.ts
@@ -403,7 +403,7 @@ export function useAgentChat() {
id: uuid(), role: 'user', content: userContent, timestamp: Date.now(),
})
// klein 2 (bau/wfprogress.md): this message used to end on a bare
- // "..." that never changed for the whole run — the ONLY feedback a
+ // "...", never changing for the whole run: the ONLY feedback a
// multi-minute workflow gave was three static dots, unlike every
// other tool call, which shows a running/working status block. The
// trailing "..." is dropped here; `progressMessageId` below carries
@@ -458,20 +458,20 @@ export function useAgentChat() {
//
// Declared here (before `callbacks`) because onStepStart/onStepComplete
// below write into `workflowRunState.blocks` the same way the normal
- // tool-call loop writes into its own run state — see addBlock/
- // updateBlockById above.
+ // tool-call loop writes into its own run state (see addBlock/
+ // updateBlockById above).
const workflowAbort = new AbortController()
const workflowRunState: AgentRunState = { convId, content: '', thinking: '', blocks: [], abort: workflowAbort }
// klein 2 (bau/wfprogress.md) + Zusatz vom Eigner, 20.09.2026: ONE
// AgentToolCall-shaped block for the whole run, added once and
- // updated in place — the exact addBlock/updateBlockById pattern the
+ // updated in place, the exact addBlock/updateBlockById pattern the
// normal agent tool loop already uses (see the `run_workflow`-less
// path below), so this is the SAME clickable, downward-expanding
// ToolCallBlock a real tool call gets: same header/spinner while
// running, same "click to expand" body. The body (`result`, rendered
// in the block's existing details pane) is the full step list from
- // `workflow-progress-view.ts` — every step's status (waiting/running/
+ // `workflow-progress-view.ts`: every step's status (waiting/running/
// done/failed), each finished step's truncated args+result (tool
// steps) or the start of the model's answer (prompt steps), and the
// currently running step's LIVE text as it streams in
@@ -599,9 +599,9 @@ export function useAgentChat() {
onWaitingForInput: () => {},
onComplete: (allResults) => {
// Any step neither completed nor failed never ran (a condition
- // branched past it, or the chain stopped before reaching it) —
- // named "skipped" (the SAME StepStatus a real skip already uses)
- // instead of staying "waiting" forever after the run is over.
+ // branched past it, or the chain stopped before reaching it), so
+ // it is named "skipped" (the SAME StepStatus a real skip already
+ // uses) instead of staying "waiting" forever after the run is over.
for (const result of allResults) {
const idx = workflow.steps.findIndex((s) => s.id === result.stepId)
const view = idx >= 0 ? stepViews[idx] : undefined
diff --git a/src/lib/__tests__/workflow-progress-view.test.ts b/src/lib/__tests__/workflow-progress-view.test.ts
index 7cd497ae..f410282f 100644
--- a/src/lib/__tests__/workflow-progress-view.test.ts
+++ b/src/lib/__tests__/workflow-progress-view.test.ts
@@ -89,7 +89,7 @@ describe('truncateForProgress: Kuerzung fuer die Chat-Anzeige', () => {
it('NEGATIVKONTROLLE: ohne Kuerzung stuende der volle Text in der Stufenliste', () => {
// Same assembly renderWorkflowStepList does, but skipping truncateForProgress
- // entirely — the shape a regression would take if someone inlined the
+ // entirely: the shape a regression would take if someone inlined the
// field instead of calling the helper.
const long = 'y'.repeat(5000)
const untouched = ` result: ${long}`
diff --git a/src/lib/__tests__/workflow-prompt-step-output-policy.test.ts b/src/lib/__tests__/workflow-prompt-step-output-policy.test.ts
index 169e7ef1..cff479b0 100644
--- a/src/lib/__tests__/workflow-prompt-step-output-policy.test.ts
+++ b/src/lib/__tests__/workflow-prompt-step-output-policy.test.ts
@@ -3,25 +3,25 @@
* ran "Research Topic", `llama-server`'s /slots endpoint showed one request at
* n_decoded 30090 / n_predict 31619 on a 32768-token context, and the run
* ended with "Workflow stopped at step 3 of 6: The model returned no content
- * for this prompt step." — the model spent its ENTIRE output budget inside
+ * for this prompt step.": the model spent its ENTIRE output budget inside
* <think> and never reached an answer. The cause: `executePromptStep`
* (workflow-engine.ts) built its `provider.chatStream` / `chatWithTools` /
- * `streamProviderTurn` options from `temperature` and `contextWindow` ONLY —
- * no `maxTokens` (so the OpenAI-compatible provider's own fallback,
+ * `streamProviderTurn` options from `temperature` and `contextWindow` ONLY,
+ * with no `maxTokens` (so the OpenAI-compatible provider's own fallback,
* `body.max_tokens = Math.min(headroom, 32768)`, asked for the entire
* remaining context) and no `thinking` policy at all, so an "always thinks"
- * model (GLM-5.3, Flash, Qwen3.5 — memory index) reasoned at its own default
+ * model (GLM-5.3, Flash, Qwen3.5, see memory index) reasoned at its own default
* depth with the whole context to spend it in.
*
* The fix reuses the house's own answer to this exact failure:
* `compact-run.ts`'s auto-compaction summarizer measured the SAME thing on
* the SAME model family and asks for `thinking: false` outright, because its
- * call — like a workflow's prompt step — is a mechanical execution of an
+ * call, like a workflow's prompt step, is a mechanical execution of an
* instruction, not a conversation that benefits from visible deliberation. An
* earlier version of this fix instead requested `thinking: true` for an
* "always thinks" model (reasoning: "that is what the catalogue says"), which
* a counter-check found makes the failure MORE likely under a bounded
- * `maxTokens`, not less — explicit full-depth reasoning burns the cap before
+ * `maxTokens`, not less: explicit full-depth reasoning burns the cap before
* ever answering. `thinking: false` is what actually ships.
*
* This drives the REAL `WorkflowEngine` over a one-step prompt workflow with
@@ -129,7 +129,7 @@ describe('a prompt step asks for the SAME output-limit policy a normal chat/agen
await engine.run()
// NEGATIVKONTROLLE (bau/wfprogress.md): before the fix `executePromptStep`
- // sent only `{ temperature, contextWindow, signal }` — every one of these
+ // sent only `{ temperature, contextWindow, signal }`, and every one of these
// was `undefined`/absent, and the model reasoned at its own unbounded
// default. See bau/wfprogress.md for the counted red count on the
// pre-fix copy.
@@ -146,7 +146,7 @@ describe('a prompt step asks for the SAME output-limit policy a normal chat/agen
expect(seenOptions!.effortLevels).toEqual(['low', 'medium', 'high'])
expect(seenOptions!.effortDefault).toBe('medium')
// reasoningEffort itself may be undefined (the user never touched the
- // composer's slider) — what matters is the LADDER travels, which is what
+ // composer's slider); what matters is the LADDER travels, which is what
// lets the provider clamp onto a real rung instead of sending nothing.
expect('reasoningEffort' in seenOptions!).toBe(true)
// klein 1/2 (review-wfprogress.md, "der eigentliche Boxbefund"):
@@ -296,7 +296,7 @@ describe('Stop reaches a running prompt step (AbortSignal bis zum fetch)', () =>
expect(seenSignal).toBeDefined()
expect(seenSignal!.aborted).toBe(true)
- // The stream stopped at the FIRST chunk once cancel() fired mid-loop —
+ // The stream stopped at the FIRST chunk once cancel() fired mid-loop:
// the second chunk's text never reached the step's output.
expect(results[0]?.output ?? '').not.toContain('second chunk')
// B1 (review-wfprogress.md): the step finished normally (non-empty
@@ -338,7 +338,7 @@ describe('Denk-Inhalt reist nicht als Schrittergebnis weiter (bereits gefixt, ge
describe('klein 4: ein Modell, das die ganze Ausgabelaenge im Denken verbraucht', () => {
it('endet weiter mit der ehrlichen Fehlermeldung, nicht mit leerem "Erfolg"', async () => {
// The exact shape the box measured: everything the model produced sat
- // inside <think>...</think> — no real answer ever followed, because the
+ // inside <think>...</think>, and no real answer ever followed, because the
// model ran out of output budget while still reasoning. thinking:false
// (klein 4's own fix) lowers how OFTEN this happens; it cannot promise it
// never happens on a model that ignores the wish entirely, so the step
diff --git a/src/lib/workflow-engine.ts b/src/lib/workflow-engine.ts
index 687bd685..38443d40 100644
--- a/src/lib/workflow-engine.ts
+++ b/src/lib/workflow-engine.ts
@@ -696,12 +696,12 @@ export class WorkflowEngine {
// Harter Befund von der Box (bau/wfprogress.md, 20.09.2026): a prompt step
// sent none of `maxTokens`/`thinking`/`reasoningEffort`/`effortLevels`/
- // `effortDefault` — every field a normal chat/agent turn resolves before
+ // `effortDefault`, every field a normal chat/agent turn resolves before
// calling the SAME provider (useAgentChat.ts's `chatOptions`, useCodex.ts's
// `codexThinkMode`/`codexEffort`). Measured on the box: `llama-server`
// /slots showed n_decoded 30090 at n_predict 31619 on a 32768 ctx, and the
// run ended with "Workflow stopped at step 3 of 6: The model returned no
- // content for this prompt step." — the model spent the WHOLE budget
+ // content for this prompt step.": the model spent the WHOLE budget
// inside <think> and never reached an answer.
//
// klein 1 (Runde 2 review): `sampling.maxTokens` is 0/absent for every
@@ -802,8 +802,8 @@ export class WorkflowEngine {
signal: this.abortController.signal,
})
output = turn.content || ''
- // `chatWithTools` returns one turn, not a stream — no per-chunk
- // progress to relay, but the field the block shows still updates
+ // `chatWithTools` returns one turn, not a stream, so there is no
+ // per-chunk progress to relay, but the field the block shows still updates
// once this call resolves (onStepComplete carries the final output).
// Execute any tool calls, gated the same as a tool step (see
@@ -842,7 +842,7 @@ export class WorkflowEngine {
signal: this.abortController.signal,
},
// klein 3: `streamProviderTurn` already streams under the hood
- // (it wraps `provider.chatStream`) — relaying its cumulative
+ // (it wraps `provider.chatStream`); relaying its cumulative
// content is the same live-progress hookup the plain-prompt
// branch above gets, just through this transport's own callback
// instead of a hand-rolled for-await loop.
diff --git a/src/lib/workflow-progress-view.ts b/src/lib/workflow-progress-view.ts
index 8b787772..f90c149f 100644
--- a/src/lib/workflow-progress-view.ts
+++ b/src/lib/workflow-progress-view.ts
@@ -9,7 +9,7 @@
* live text. This module builds that text; the caller (useAgentChat.ts) only
* has to keep a `WorkflowStepView[]` current and hand it to
* `renderWorkflowStepList`, which becomes the SAME `AgentToolCall.result` a
- * real tool call already renders in its collapsible details pane — no new
+ * real tool call already renders in its collapsible details pane; no new
* component, no new expand pattern.
*
* Kept a separate leaf module (no React, no store) so the step-list text and
@@ -23,7 +23,7 @@ export interface WorkflowStepView {
status: StepStatus
/** Tool-step args (from `StepResult.toolCalls[0].args`), when known. */
args?: Record<string, unknown>
- /** Step output — the model's answer for a prompt step, or the tool
+ /** Step output: the model's answer for a prompt step, or the tool
* result for a tool step. Updated LIVE while a prompt step streams
* (`onStepProgress`), then finalised on completion. */
output?: string
@@ -33,7 +33,7 @@ export interface WorkflowStepView {
/**
* Long tool output already gets a head+tail truncation for the MODEL's own
* context (`truncateToolResult`, lib/truncate-tool-result.ts). This is a
- * separate, much smaller budget for the CHAT TRANSCRIPT's own display only —
+ * separate, much smaller budget for the CHAT TRANSCRIPT's own display only.
* "lange Ausgaben kuerzen, damit der Chat nicht explodiert, und nichts davon
* zusaetzlich in den Modellkontext schieben" (the Eigner's own wording): this
* value never reaches a prompt, so it stays independent of the model-facing