Skip to content

firstSentence

firstSentence(description): string

Defined in: packages/agent/src/modules/slashCommands.ts:790

The first sentence of a mode’s description, for the one-line forms (the picker rows and the usage hint). Cut at the sentence boundary rather than truncated, so a row never ends mid-clause.

A sentence ends at ., ? or !. The copy this shortens is ordinary prose, and a helper that knows only the period renders a question as Really?. and hands back BOTH sentences of Ready? Then go. — the whole description in a row sized for one line.

A terminator only ends the sentence when a space follows it and no dot precedes it, so an ellipsis reads as the pause it is instead of three sentence boundaries.

A description that is already one sentence keeps its own terminator rather than gaining a second. Nothing was consumed, so it arrives already terminated and appending unconditionally would render No gate... Every surface showing one line of a mode’s copy goes through here, so this is the only place that has to know any of it.

string

string