Skip to content

Commit e608a51

Browse files
committed
feat: reword run and go status messages with jam voice
1 parent b65bd8f commit e608a51

2 files changed

Lines changed: 26 additions & 28 deletions

File tree

src/commands/go.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,9 @@ export async function runGo(options: GoCommandOptions): Promise<void> {
7373
: (config.agent?.maxWorkers ?? 3);
7474

7575
// Print welcome
76-
process.stderr.write('\njam go — interactive agent console\n');
77-
process.stderr.write(`Provider: ${profile.provider}, Model: ${profile.model ?? 'default'}\n`);
78-
process.stderr.write(`Mode: ${mode} | Workers: ${maxWorkers}\n`);
79-
process.stderr.write('Type a task, or /stop /status /exit\n\n');
76+
process.stderr.write('\njam go\n');
77+
process.stderr.write(`${profile.provider}${profile.model ? ` (${profile.model})` : ''} | ${mode} mode | ${maxWorkers} workers\n`);
78+
process.stderr.write('Type a task, or /help for commands.\n\n');
8079

8180
// Interactive readline loop
8281
const rl = readline.createInterface({
@@ -104,36 +103,35 @@ export async function runGo(options: GoCommandOptions): Promise<void> {
104103
if (input === '/stop') {
105104
if (currentAbort) {
106105
currentAbort.abort();
107-
process.stderr.write('Stopping current task...\n');
106+
process.stderr.write('Stopping...\n');
108107
} else {
109-
process.stderr.write('No task running.\n');
108+
process.stderr.write('Nothing running.\n');
110109
}
111110
rl.prompt();
112111
return;
113112
}
114113

115114
if (input === '/status') {
116-
process.stderr.write(`Mode: ${mode} | Workers: ${maxWorkers}\n`);
117-
process.stderr.write(`Provider: ${profile.provider} | Model: ${profile.model ?? 'default'}\n`);
115+
process.stderr.write(`${profile.provider} (${profile.model ?? 'default'}) | ${mode} mode | ${maxWorkers} workers\n`);
118116
process.stderr.write(`Workspace: ${workspaceRoot}\n`);
119117
rl.prompt();
120118
return;
121119
}
122120

123121
if (input === '/help') {
124122
process.stderr.write('Commands:\n');
125-
process.stderr.write(' /status — show current mode, provider, workspace\n');
126-
process.stderr.write(' /stop — abort the running task\n');
127-
process.stderr.write(' /exit — quit the agent console\n');
128-
process.stderr.write(' /help — show this help\n');
129-
process.stderr.write('\nAnything else is sent as a task to the orchestrator.\n');
123+
process.stderr.write(' /status — where things stand\n');
124+
process.stderr.write(' /stop — kill the current task\n');
125+
process.stderr.write(' /exit — done for now\n');
126+
process.stderr.write(' /help — this\n');
127+
process.stderr.write('\nEverything else is a task for the orchestrator.\n');
130128
rl.prompt();
131129
return;
132130
}
133131

134132
// Ignore unrecognized slash commands
135133
if (input.startsWith('/')) {
136-
process.stderr.write(`Unknown command: ${input}. Type /help for available commands.\n`);
134+
process.stderr.write(`Unknown: ${input}. Try /help.\n`);
137135
rl.prompt();
138136
return;
139137
}

src/commands/run.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ async function confirmToolCall(
6060
toolName: string,
6161
args: Record<string, unknown>
6262
): Promise<boolean> {
63-
process.stderr.write(`\n[Tool Request] ${toolName}\n`);
63+
process.stderr.write(`\n[Tool] ${toolName}\n`);
6464
process.stderr.write(`Arguments: ${JSON.stringify(args, null, 2)}\n`);
6565
const rl = createInterface({ input: process.stdin, output: process.stderr });
66-
const answer = await rl.question('Allow this tool call? [y/N] ');
66+
const answer = await rl.question('Allow? [y/N] ');
6767
rl.close();
6868
return answer.toLowerCase() === 'y';
6969
}
@@ -111,8 +111,8 @@ export async function runRun(instruction: string | undefined, options: RunOption
111111
// Connect to MCP servers (non-fatal if any fail)
112112
const mcpManager = await createMcpManager(config.mcpServers, stderrLog, config.mcpGroups);
113113

114-
stderrLog(`Starting task: ${instruction}\n`);
115-
stderrLog(`Provider: ${profile.provider}, Model: ${profile.model ?? 'default'}\n`);
114+
stderrLog(`On it. ${instruction}\n`);
115+
stderrLog(`Using ${profile.provider}${profile.model ? ` (${profile.model})` : ''}\n`);
116116

117117
// Merge MCP tool schemas with built-in tools
118118
const mcpSchemas = mcpManager.getToolSchemas();
@@ -174,20 +174,20 @@ export async function runRun(instruction: string | undefined, options: RunOption
174174
}
175175

176176
if (result.filesChanged.length > 0) {
177-
stderrLog(`\nFiles changed: ${result.filesChanged.join(', ')}\n`);
177+
stderrLog(`\nChanged: ${result.filesChanged.join(', ')}\n`);
178178
}
179179
}
180180

181181
await mcpManager.shutdown();
182-
stderrLog('\nTask complete.\n');
182+
stderrLog('\nDone.\n');
183183
} catch (err) {
184184
const jamErr = JamError.fromUnknown(err);
185185

186186
// If the planner failed (model can't produce structured JSON), fall back
187187
// to the legacy agentic loop which doesn't require a structured plan.
188188
if (jamErr.code === 'AGENT_PLAN_FAILED') {
189189
const stderrLog = options.quiet ? (_msg: string) => {} : (msg: string) => process.stderr.write(msg);
190-
stderrLog('Planner could not generate a structured plan — falling back to agentic loop.\n');
190+
stderrLog('Plan didn\'t work out — falling back to the agentic loop.\n');
191191
return legacyRun(instruction, options);
192192
}
193193

@@ -211,8 +211,8 @@ async function legacyRun(instruction: string, options: RunOptions): Promise<void
211211
// Connect to MCP servers (non-fatal if any fail)
212212
const mcpManager = await createMcpManager(config.mcpServers, stderrLog, config.mcpGroups);
213213

214-
stderrLog(`Starting task: ${instruction}\n`);
215-
stderrLog(`Provider: ${profile.provider}, Model: ${profile.model ?? 'default'}\n`);
214+
stderrLog(`On it. ${instruction}\n`);
215+
stderrLog(`Using ${profile.provider}${profile.model ? ` (${profile.model})` : ''}\n`);
216216

217217
// Load project context
218218
const { jamContext, workspaceCtx } = await loadProjectContext(workspaceRoot);
@@ -383,7 +383,7 @@ async function legacyRun(instruction: string, options: RunOptions): Promise<void
383383

384384
if (pendingWriteStep && iteration < MAX_ITERATIONS - 2 && writeEnforcementRetries < MAX_WRITE_ENFORCEMENT_RETRIES) {
385385
writeEnforcementRetries++;
386-
stderrLog(formatInternalStatus(`Write-enforcement: model skipped write_file — forcing retry on Step ${pendingWriteStep.id} (${writeEnforcementRetries}/${MAX_WRITE_ENFORCEMENT_RETRIES})`, noColor) + '\n');
386+
stderrLog(formatInternalStatus(`The model described code but didn't write it. Nudging... (${writeEnforcementRetries}/${MAX_WRITE_ENFORCEMENT_RETRIES})`, noColor) + '\n');
387387
messages.push({ role: 'assistant', content: finalText });
388388
messages.push({
389389
role: 'user',
@@ -412,7 +412,7 @@ async function legacyRun(instruction: string, options: RunOptions): Promise<void
412412
const looksLikeHallucinatedCode = /```(?:typescript|ts|javascript|js)\n/.test(finalText);
413413
if (looksLikeHallucinatedCode && !tracker.wasToolCalled('write_file') && iteration < MAX_ITERATIONS - 2 && writeEnforcementRetries < MAX_WRITE_ENFORCEMENT_RETRIES) {
414414
writeEnforcementRetries++;
415-
stderrLog(formatInternalStatus('Write-enforcement: Markdown-only response — forcing tool use', noColor) + '\n');
415+
stderrLog(formatInternalStatus('Model output Markdown instead of using tools. Nudging...', noColor) + '\n');
416416
messages.push({ role: 'assistant', content: finalText });
417417
const alreadyReadRef = tracker.wasToolCalled('read_file');
418418
if (!alreadyReadRef) {
@@ -508,7 +508,7 @@ async function legacyRun(instruction: string, options: RunOptions): Promise<void
508508
const writtenFiles = Array.from(fileWriteCounts.keys());
509509
const missing = detectMissingComponents(instruction, writtenFiles);
510510
if (missing.length > 0) {
511-
stderrLog(formatInternalStatus(`Completeness: missing ${missing.join(', ')} — continuing`, noColor) + '\n');
511+
stderrLog(formatInternalStatus(`Looks like we're missing ${missing.join(', ')}. Going back for it.`, noColor) + '\n');
512512
messages.push({ role: 'assistant', content: finalText });
513513
messages.push({
514514
role: 'user',
@@ -720,7 +720,7 @@ async function legacyRun(instruction: string, options: RunOptions): Promise<void
720720
fileWriteCounts.set(wPath, (fileWriteCounts.get(wPath) ?? 0) + 1);
721721
if (fileWriteCounts.get(wPath)! >= 3) {
722722
stderrLog(formatInternalStatus(
723-
`Nudge: ${wPath} written ${fileWriteCounts.get(wPath)} times — moving on`,
723+
`${wPath} rewritten ${fileWriteCounts.get(wPath)} times. Moving on.`,
724724
noColor,
725725
) + '\n');
726726
messages.push({
@@ -750,7 +750,7 @@ async function legacyRun(instruction: string, options: RunOptions): Promise<void
750750
}
751751

752752
await mcpManager.shutdown();
753-
stderrLog('\nTask complete.\n');
753+
stderrLog('\nDone.\n');
754754
} catch (err) {
755755
const jamErr = JamError.fromUnknown(err);
756756
await printError(jamErr.message, jamErr.hint);

0 commit comments

Comments
 (0)