cawdex 1.35.73 → 1.35.75

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.
@@ -303,8 +303,8 @@ function footerLines(cols) {
303
303
  function renderActivity() {
304
304
  if (state.activityStartedAtMs) {
305
305
  const elapsed = formatDuration(Date.now() - state.activityStartedAtMs);
306
- const turn = state.turn > 0 ? ` turn ${state.turn}` : '';
307
- return `${state.activity} (${elapsed} Esc/F5 to interrupt${turn})`;
306
+ const turn = state.turn > 0 ? ` - turn ${state.turn}` : '';
307
+ return `${state.activity} (${elapsed} - Esc/F5 to interrupt${turn})`;
308
308
  }
309
309
  return state.activity || 'Ready';
310
310
  }
package/dist/index.js CHANGED
@@ -88,8 +88,9 @@ import { COMMAND_CATALOG, allSlashCommandNames, completeSlashCommandNames, resol
88
88
  import { inlineSuggest, resolveInlineSuggestQuestionInput } from './inline-suggest.js';
89
89
  import { normalizeTypeaheadDraftForPrompt } from './prompt-buffer.js';
90
90
  import { maybeInstantAnswer } from './instant-answer.js';
91
+ import { maybeCreateInstantArtifact } from './instant-artifact.js';
91
92
  import { getCurrentVersion, startStartupUpdateCheck } from './updater.js';
92
- import { activateFooter, askWithFooterPrompt, buildFooterSnapshot, deactivateFooter, isFooterActive, shouldUseFixedFooter, updateFooter, } from './fixed-footer.js';
93
+ import { activateFooter, askWithFooterPrompt, buildFooterSnapshot, deactivateFooter, isFooterActive, shouldUseFixedFooter, updateFooter, writeScrollableLine, } from './fixed-footer.js';
93
94
  /**
94
95
  * Unified prompt resolver — prefers the bundled ECC prompt for a given
95
96
  * intent and falls back to the built-in builder when ECC isn't installed.
@@ -103,6 +104,15 @@ function buildUnifiedPrompt(eccName, args, builtin) {
103
104
  return builtin();
104
105
  return args.trim() ? `${ecc}\n\n## User Input\n\n${args}` : ecc;
105
106
  }
107
+ function printLocalResponse(message) {
108
+ if (!isFooterActive()) {
109
+ console.log(theme.primary(message));
110
+ return;
111
+ }
112
+ for (const line of message.split(/\r?\n/)) {
113
+ writeScrollableLine(line ? theme.primary(line) : '');
114
+ }
115
+ }
106
116
  function openRouterContextHintForModel(model, catalogModel) {
107
117
  const id = model.trim().toLowerCase();
108
118
  if (id === 'openrouter/free')
@@ -4449,6 +4459,22 @@ async function main() {
4449
4459
  catch { /* noop */ }
4450
4460
  process.exit(0);
4451
4461
  }
4462
+ const instantArtifact = maybeCreateInstantArtifact(resolvedPrompt.prompt, process.cwd());
4463
+ if (instantArtifact) {
4464
+ printLocalResponse(instantArtifact.message);
4465
+ messages.push({ role: 'user', content: resolvedPrompt.prompt });
4466
+ messages.push({ role: 'assistant', content: instantArtifact.assistantMessage });
4467
+ await saveWithSnapshot();
4468
+ try {
4469
+ await runHooks({ event: 'SessionStop', sessionId: session.id, cwd: process.cwd(), permissionMode: config.permissionMode });
4470
+ }
4471
+ catch { /* never fail a local artifact on hook errors */ }
4472
+ try {
4473
+ rl.close();
4474
+ }
4475
+ catch { /* noop */ }
4476
+ process.exit(0);
4477
+ }
4452
4478
  // ── F9: Empty-engagement guard (non-interactive nudge) ──
4453
4479
  //
4454
4480
  // Some failures in the 2026-05-25 baseline run came from the
@@ -4797,12 +4823,20 @@ async function main() {
4797
4823
  }
4798
4824
  const instantAnswer = maybeInstantAnswer(trimmed);
4799
4825
  if (instantAnswer) {
4800
- console.log(theme.primary(instantAnswer));
4826
+ printLocalResponse(instantAnswer);
4801
4827
  messages.push({ role: 'user', content: trimmed });
4802
4828
  messages.push({ role: 'assistant', content: instantAnswer });
4803
4829
  await saveWithSnapshot();
4804
4830
  continue;
4805
4831
  }
4832
+ const instantArtifact = maybeCreateInstantArtifact(trimmed, process.cwd());
4833
+ if (instantArtifact) {
4834
+ printLocalResponse(instantArtifact.message);
4835
+ messages.push({ role: 'user', content: trimmed });
4836
+ messages.push({ role: 'assistant', content: instantArtifact.assistantMessage });
4837
+ await saveWithSnapshot();
4838
+ continue;
4839
+ }
4806
4840
  // Auto-route model if enabled
4807
4841
  if (autoRoute) {
4808
4842
  const complexity = classifyComplexity(trimmed);