Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion assistant/src/daemon/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,28 @@ export class DaemonServer {
{ channelId: transport.channelId },
"Transport metadata received",
);
conversation.setTransportHints(transport.hints);

// Build enriched hints: interface ID first, then host environment (macOS
// only), then any client-provided hints.
const enrichedHints: string[] = [];

const interfaceLabel = parseInterfaceId(transport.interfaceId) ?? "vellum";
enrichedHints.push(`User is messaging from interface: ${interfaceLabel}`);
Comment on lines +381 to +382

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Derive interface hint from actual turn interface

transport.interfaceId is optional for non-macOS transports (assistant/src/daemon/message-types/conversations.ts), but this code now defaults missing values to "vellum". In sessions where clients send transport metadata without interfaceId (valid per schema), every turn gets the injected hint User is messaging from interface: vellum, which can conflict with the real interface already tracked via sourceInterface and steer model behavior incorrectly. Use the resolved turn interface (or skip this hint when unknown) instead of hardcoding a vellum fallback.

Useful? React with 👍 / 👎.


if (transport.interfaceId === "macos") {
if (transport.hostHomeDir) {
enrichedHints.push(`Host home directory: ${transport.hostHomeDir}`);
}
if (transport.hostUsername) {
enrichedHints.push(`Host username: ${transport.hostUsername}`);
}
}

if (transport.hints) {
enrichedHints.push(...transport.hints);
}

conversation.setTransportHints(enrichedHints);
}

constructor() {
Expand Down
Loading