Commit Graph

2 Commits

  • fix(hooks): add stack traces to hook errors, fix tools.ts theme bug
    - HookError now includes optional stack field
    - Hook error display shows stack trace in dim color below error message
    - tools.ts: create SettingsListTheme using the theme passed to ctx.ui.custom()
      instead of using getSettingsListTheme() which depends on global theme
  • feat(hooks): add tools.ts example hook for interactive tool enable/disable
    - /tools command opens SettingsList-based selector for all loaded tools
    - Space/Enter toggles individual tools between enabled/disabled
    - Changes apply immediately on toggle (like /settings)
    - Tool selection persisted to session via appendEntry()
    - State restored from current branch on session_start, session_tree, session_branch
    - Uses getBranch() to respect branch-specific tool configuration
    - Export getSettingsListTheme and getSelectListTheme for hooks to use