Skip to content

gut(session): drop SessionEntry.thinkingLevel field + gateway schema (#2336 Area 3) #2464

@alexey-pelykh

Description

@alexey-pelykh

Follow-up to #2336 (umbrella) / PR #2463 (partial sweep). Covers Area 3 deferred from that PR.

Scope

Remove thinkingLevel from SessionEntry and all its reading/writing surfaces:

  • src/config/sessions/types.ts — delete thinkingLevel from SessionEntry.
  • src/gateway/protocol/schema/sessions.ts — delete the gateway protocol schema field.
  • src/config/types.agent-defaults.ts:177 (approximate) — delete the /think comment and any default field.
  • src/auto-reply/reply/session.ts — remove persistedThinking local and its read/write of entry.thinkingLevel (lines ~236, ~368, ~384, ~434).
  • src/gateway/server-methods/chat.ts:778-784 — remove thinkingLevel from chat.history response payload.
  • src/gateway/server-methods/sessions.ts — audit for any thinkingLevel in sessions.* response payloads / patch handling.
  • src/tui/tui-command-handlers.ts, src/tui/tui.ts, src/tui/tui-session-actions.ts, src/tui/gateway-chat.ts, src/tui/tui-types.ts — remove thinkingLevel from session info / patch surface.
  • src/commands/status.summary.ts — remove thinkingLevel from status summaries.
  • src/acp/translator.ts — remove thinkingLevel from ACP session rows.
  • src/telegram/bot-message-dispatch.ts — remove any thinkingLevel display.
  • Tests: update src/config/sessions.test.ts, src/gateway/session-utils.fs.test.ts, src/gateway/server.sessions.gateway-server-sessions-a.test.ts, src/acp/translator.session-rate-limit.test.ts, src/auto-reply/reply/reply-utils.test.ts, etc.

Backward compat

Existing sessions on disk have thinkingLevel values. Since the field is optional and unread post-removal, sessions load fine (extra fields ignored) and save without it. No migration needed.

AC

  • git grep "thinkingLevel" in src/ returns zero hits (allowing comments or migration-only refs if truly required).
  • pnpm check + pnpm test pass.
  • LIVE smoke: session patch round-trip still functional without thinkingLevel.

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions