Skip to content

Commit 7246ead

Browse files
committed
Merge remote-tracking branch 'origin/farm/1fe21955/quiet-startup-status'
2 parents 644e4fe + 0525a3e commit 7246ead

5 files changed

Lines changed: 33 additions & 3 deletions

File tree

packages/coding-agent/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
- Session dump output now renders message history using the model's native dialect turn envelope instead of markdown role headings
1313

14+
### Fixed
15+
16+
- Fixed `startup.quiet` leaving MCP and LSP startup status events visible during launch ([#2639](https://github.com/can1357/oh-my-pi/issues/2639)).
17+
1418
## [15.13.3] - 2026-06-15
1519

1620
### Added

packages/coding-agent/src/modes/interactive-mode.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,7 @@ export class InteractiveMode implements InteractiveModeContext {
542542
if (eventBus) {
543543
this.#eventBusUnsubscribers.push(
544544
eventBus.on(LSP_STARTUP_EVENT_CHANNEL, data => {
545+
if (this.settings.get("startup.quiet")) return;
545546
this.#handleLspStartupEvent(data as LspStartupEvent);
546547
}),
547548
);
@@ -551,6 +552,7 @@ export class InteractiveMode implements InteractiveModeContext {
551552
logger.warn("Ignoring malformed mcp:connecting event", { data });
552553
return;
553554
}
555+
if (this.settings.get("startup.quiet")) return;
554556
this.showStatus(formatMCPConnectingMessage(data.serverNames));
555557
}),
556558
);

packages/coding-agent/src/sdk.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,8 +1608,9 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
16081608
let startDeferredMCPDiscovery:
16091609
| ((liveSession: AgentSession, activation: DeferredMCPActivation) => void)
16101610
| undefined;
1611+
const startupQuiet = settings.get("startup.quiet");
16111612
const onMCPConnecting = (serverNames: string[]) => {
1612-
if (!options.hasUI || serverNames.length === 0) return;
1613+
if (!options.hasUI || startupQuiet || serverNames.length === 0) return;
16131614
eventBus.emit(MCP_CONNECTING_EVENT_CHANNEL, { serverNames } satisfies McpConnectingEvent);
16141615
};
16151616
const mcpDiscoverOptions = {
@@ -2695,7 +2696,7 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
26952696
type: "completed",
26962697
servers: result.servers,
26972698
};
2698-
eventBus.emit(LSP_STARTUP_EVENT_CHANNEL, event);
2699+
if (!startupQuiet) eventBus.emit(LSP_STARTUP_EVENT_CHANNEL, event);
26992700
} catch (error) {
27002701
const errorMessage = error instanceof Error ? error.message : String(error);
27012702
logger.warn("LSP server warmup failed", { cwd, error: errorMessage });
@@ -2707,7 +2708,7 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
27072708
type: "failed",
27082709
error: errorMessage,
27092710
};
2710-
eventBus.emit(LSP_STARTUP_EVENT_CHANNEL, event);
2711+
if (!startupQuiet) eventBus.emit(LSP_STARTUP_EVENT_CHANNEL, event);
27112712
}
27122713
})();
27132714
}

packages/coding-agent/test/interactive-mode-lsp-startup.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,16 @@ describe("InteractiveMode LSP startup welcome banner", () => {
119119
expect(findServerLine()).toContain(theme.status.enabled);
120120
expect(findServerLine()).not.toContain(theme.status.pending);
121121
});
122+
123+
it("does not render LSP startup warnings when startup.quiet is enabled", () => {
124+
session.settings.set("startup.quiet", true);
125+
const showWarningSpy = vi.spyOn(mode, "showWarning").mockImplementation(() => {});
126+
127+
eventBus.emit(LSP_STARTUP_EVENT_CHANNEL, {
128+
type: "failed",
129+
error: "rust-analyzer timed out",
130+
} satisfies LspStartupEvent);
131+
132+
expect(showWarningSpy).not.toHaveBeenCalled();
133+
});
122134
});

packages/coding-agent/test/interactive-mode-mcp-connecting.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ describe("InteractiveMode MCP connecting banner", () => {
103103
expect(showStatusSpy).toHaveBeenCalledWith(formatMCPConnectingMessage(serverNames));
104104
});
105105

106+
it("does not render the mcp:connecting status when startup.quiet is enabled", () => {
107+
session.settings.set("startup.quiet", true);
108+
const showStatusSpy = vi.spyOn(mode, "showStatus").mockImplementation(() => {});
109+
110+
eventBus.emit(MCP_CONNECTING_EVENT_CHANNEL, {
111+
serverNames: ["sequential", "critic"],
112+
} satisfies McpConnectingEvent);
113+
114+
expect(showStatusSpy).not.toHaveBeenCalled();
115+
});
116+
106117
it("rejects a malformed mcp:connecting payload via the guard instead of letting it throw", () => {
107118
const showStatusSpy = vi.spyOn(mode, "showStatus").mockImplementation(() => {});
108119
const warnSpy = vi.spyOn(logger, "warn").mockImplementation(() => {});

0 commit comments

Comments
 (0)