Commit Graph

8 Commits

  • WIP: Rewrite export-html with tree sidebar, client-side rendering
    - Add tree sidebar with search and filter (Default/All/Labels)
    - Client-side markdown/syntax highlighting via vendored marked.js + highlight.js
    - Base64 encode session data to avoid escaping issues
    - Reuse theme.ts color tokens via getResolvedThemeColors()
    - Sticky sidebar, responsive mobile layout with overlay
    - Click tree node to scroll to message
    - Keyboard shortcuts: Esc to reset, Ctrl/Cmd+F to search
  • Add examples path to system prompt
    Agent can now find examples at the documented path for
    hooks, custom tools, and SDK usage.
  • Refactor OAuth/API key handling: AuthStorage and ModelRegistry
    - Add AuthStorage class for credential storage (auth.json)
    - Add ModelRegistry class for model management with API key resolution
    - Add discoverAuthStorage() and discoverModels() discovery functions
    - Add migration from legacy oauth.json and settings.json apiKeys to auth.json
    - Remove configureOAuthStorage, defaultGetApiKey, findModel, discoverAvailableModels
    - Remove apiKeys from Settings type and SettingsManager methods
    - Rename getOAuthPath to getAuthPath
    - Update SDK, examples, docs, tests, and mom package
    
    Fixes #296
  • Add hooks system with pi.send() for external message injection
    - Hook discovery from ~/.pi/agent/hooks/, .pi/hooks/, --hook flag
    - Events: session_start, session_switch, agent_start/end, turn_start/end, tool_call, tool_result, branch
    - tool_call can block execution, tool_result can modify results
    - pi.send(text, attachments?) to inject messages from external sources
    - UI primitives: ctx.ui.select/confirm/input/notify
    - Context: ctx.exec(), ctx.cwd, ctx.sessionFile, ctx.hasUI
    - Docs shipped with npm package and binary builds
    - System prompt references docs folder
  • Fix Windows binary detection for Bun compiled executables
    - Updated isBunBinary detection to check for %7EBUN (URL-encoded ~BUN)
    - Simplified build:binary script to remove Unix-specific shell syntax
    - Binary now correctly locates supporting files next to executable on Windows
  • feat(coding-agent): configurable app name and config dir for forks (#95)
    - Add piConfig to package.json for app name and config directory
    - Consolidate paths.ts into config.ts with clearer naming
    - Fix Bun binary detection (changed from %7EBUN to $bunfs)
    - Update all hardcoded paths to use config.ts exports
    - getThemesDir() for built-in themes, getCustomThemesDir() for user themes