MCPcopy Index your code
hub / github.com/anomalyco/opencode / resolveExitTitle

Function resolveExitTitle

packages/opencode/src/cli/cmd/run/runtime.ts:158–173  ·  view source on GitHub ↗
(
  ctx: BootContext,
  input: RunRuntimeInput,
  state: RuntimeState,
)

Source from the content-addressed store, hash-verified

156const LOCAL_REPLAY_ROW_LIMIT = 100
157
158async function resolveExitTitle(
159 ctx: BootContext,
160 input: RunRuntimeInput,
161 state: RuntimeState,
162): Promise<string | undefined> {
163 if (!state.shown || !hasSession(input, state)) {
164 return undefined
165 }
166
167 return ctx.sdk.session
168 .get({
169 sessionID: state.sessionID,
170 })
171 .then((x) => x.data?.title)
172 .catch(() => undefined)
173}
174
175// Core runtime loop. Boot resolves the SDK context, then we set up the
176// lifecycle (renderer + footer), wire the stream transport for SDK events,

Callers 1

runInteractiveRuntimeFunction · 0.85

Calls 2

hasSessionFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected