Skip to content

A self-improving RLM agent for coding workflows and long-running autonomous tasks.

Rust

fix(coding-agent): restore concise splash hints (#368)

ktce7e45c2dfaa
diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md
index 96b8d99bd7..14e2fc9ae2 100644
--- a/packages/coding-agent/CHANGELOG.md
+++ b/packages/coding-agent/CHANGELOG.md
@@ -2,6 +2,8 @@
## [Unreleased]
+- Changed the new-chat splash to show only version, model, and cwd metadata and rotate among five example prompts.
+
## [0.2.8] - 2026-07-09
- Added built-in Herdr integration that reports agent lifecycle state to Herdr panes automatically, without requiring `herdr integration install pi`.
diff --git a/packages/coding-agent/src/modes/interactive/interactive-mode.ts b/packages/coding-agent/src/modes/interactive/interactive-mode.ts
index 302f6e98ae..33712fa2fb 100644
--- a/packages/coding-agent/src/modes/interactive/interactive-mode.ts
+++ b/packages/coding-agent/src/modes/interactive/interactive-mode.ts
@@ -228,6 +228,18 @@ const HEARTBEAT_LEGACY_PROMPT_MIN_TOLERANCE_MS = 15_000;
const HEARTBEAT_LEGACY_PROMPT_MAX_TOLERANCE_MS = 120_000;
const MODEL_CATALOG_REFRESH_TTL_MS = 60_000;
+export const START_HINTS = [
+ 'Try "refactor @<filepath>"',
+ 'Try "fix bugs in @<filepath>"',
+ 'Try "add tests for @<filepath>"',
+ 'Try "explain how @<filepath> works"',
+ 'Try "improve performance in @<filepath>"',
+] as const;
+
+export function getRandomStartHint(random = Math.random): (typeof START_HINTS)[number] {
+ return START_HINTS[Math.floor(random() * START_HINTS.length)] ?? START_HINTS[0];
+}
+
function isLabeledQueuedPreview(message: string): boolean {
return (
message.startsWith(`${HEARTBEAT_PROMPT_PREVIEW_LABEL}: `) || message.startsWith(`${GOAL_CONTEXT_PREVIEW_LABEL}: `)
@@ -606,6 +618,7 @@ export class InteractiveMode {
// Stored so the same manager can be injected into custom editors, selectors, and extension UI.
private keybindings: KeybindingsManager;
private version: string;
+ private readonly startHint = getRandomStartHint();
private isInitialized = false;
private onInputCallback?: (text: string | undefined) => void;
private returnToAgentsViewRequested = false;
@@ -812,7 +825,7 @@ export class InteractiveMode {
paddingX: editorPaddingX,
autocompleteMaxVisible,
isArgumentCommand: builtinSlashCommandTakesArgument,
- placeholder: 'Try "refactor @<filepath>"',
+ placeholder: this.startHint,
placeholderColor: (text) => theme.fg("dim", text),
});
this.editor = this.defaultEditor;
@@ -1064,9 +1077,8 @@ export class InteractiveMode {
() => this.getCurrentCwd(),
verboseInstructions,
{
- getExtraMetadata: () => this.getStartupMetadata(),
getHideStartHint: () => this.childAgentPanelMode !== undefined || !this.isNewChat(),
- getStartHint: () => 'Try "refactor @<filepath>"',
+ getStartHint: () => this.startHint,
},
);
this.headerContainer.addChild(this.builtInHeader);
@@ -4839,17 +4851,6 @@ export class InteractiveMode {
return [agentsHint, modelLabel, shortcutsHint].filter((label): label is string => label !== undefined).join(" ");
}
- private getStartupMetadata(): BrandSplashMetadataLine[] {
- if (this.childAgentPanelMode || !this.isNewChat()) {
- return [];
- }
- return [
- { label: "input", value: "! shell · / commands" },
- { label: "files", value: "@ file paths" },
- { label: "help", value: this.getShortcutHelpHint() },
- ];
- }
-
private getShortcutsTrayHint(): string | undefined {
if (!this.isNewChat()) {
return undefined;
@@ -4857,11 +4858,6 @@ export class InteractiveMode {
return keyText("app.shortcuts") ? keyHint("app.shortcuts", "for shortcuts") : "/hotkeys for shortcuts";
}
- private getShortcutHelpHint(): string {
- const shortcuts = keyText("app.shortcuts");
- return shortcuts ? `${shortcuts} for shortcuts` : "/hotkeys for shortcuts";
- }
-
private isNewChat(): boolean {
return !this.sessionHasMessages;
}
diff --git a/packages/coding-agent/test/interactive-mode-startup.test.ts b/packages/coding-agent/test/interactive-mode-startup.test.ts
index d64f67c29d..473ca1c38e 100644
--- a/packages/coding-agent/test/interactive-mode-startup.test.ts
+++ b/packages/coding-agent/test/interactive-mode-startup.test.ts
@@ -2,7 +2,12 @@ import { Container, setKeybindings } from "@earendil-works/pi-tui";
import stripAnsi from "strip-ansi";
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { KeybindingsManager } from "../src/core/keybindings.js";
-import { BrandSplashHeader, InteractiveMode } from "../src/modes/interactive/interactive-mode.js";
+import {
+ BrandSplashHeader,
+ getRandomStartHint,
+ InteractiveMode,
+ START_HINTS,
+} from "../src/modes/interactive/interactive-mode.js";
import { getMarkdownTheme, initTheme } from "../src/modes/interactive/theme/theme.js";
describe("InteractiveMode startup hints", () => {
@@ -29,26 +34,36 @@ describe("InteractiveMode startup hints", () => {
return mode;
}
- it("renders compact new-chat guidance and the configured shortcut hint", () => {
- const mode = createMode();
- const metadata = Reflect.get(InteractiveMode.prototype, "getStartupMetadata").call(mode);
+ it("keeps the splash metadata to version, model, and cwd", () => {
const header = new BrandSplashHeader(
"0.0.0",
() => "test-model",
() => "/tmp/project",
undefined,
{
- getExtraMetadata: () => metadata,
getStartHint: () => 'Try "refactor @<filepath>"',
},
);
const output = stripAnsi(header.render(120).join("\n"));
- expect(output).toContain("! shell · / commands");
- expect(output).toContain("@ file paths");
- expect(output).toContain("? for shortcuts");
+ expect(output).toContain("version v0.0.0");
+ expect(output).toContain("model test-model");
+ expect(output).toContain("cwd /tmp/project");
expect(output).toContain('Try "refactor @<filepath>"');
+ expect(output).not.toContain("input");
+ expect(output).not.toContain("files");
+ expect(output).not.toContain("help");
+ });
+
+ it("randomly selects from five concise filepath prompts", () => {
+ expect(START_HINTS).toHaveLength(5);
+ expect(new Set(START_HINTS).size).toBe(5);
+
+ for (const [index, hint] of START_HINTS.entries()) {
+ expect(getRandomStartHint(() => index / START_HINTS.length)).toBe(hint);
+ expect(hint).toMatch(/^Try ".*@<filepath>.*"$/);
+ }
});
it("places the fresh-chat shortcut hint after the model and effort", () => {
@@ -65,12 +80,10 @@ describe("InteractiveMode startup hints", () => {
expect(stripAnsi(label)).toBe("← agents view test-model • high ? for shortcuts");
});
- it("hides startup shortcut guidance for chats with history", () => {
+ it("hides the tray shortcut guidance for chats with history", () => {
const mode = createMode(true);
- const metadata = Reflect.get(InteractiveMode.prototype, "getStartupMetadata").call(mode);
const label = Reflect.get(InteractiveMode.prototype, "getTrayLocationLabel").call(mode);
- expect(metadata).toEqual([]);
expect(stripAnsi(label)).toBe("test-model • high");
});