Repository navigation
Conversation
bb1ab98 to
61bd9ba
Compare
There was a problem hiding this comment.
btw just want to call out that our @google/genai APIs make me cry here with this type of exposed mutability as the primary way to modify history lol
There was a problem hiding this comment.
We could potentially extract this hack out of GeminiClient as well. This "continuation check" shouldn't have to happen and honestly might be a root model or API bug /cc @evansenter @jlove29
There was a problem hiding this comment.
I am scared of touching this part right now :) I'm thinking about leaving this as it is in the scope of this PR, and we can follow up after the refactoring.
There was a problem hiding this comment.
Def! No worries I can tackle it
13ca8c2 to
1d01a7a
Compare
There was a problem hiding this comment.
I'm extremely confused by the repeated nature of this kind of error handling across the codebase. We should clean this up.
There was a problem hiding this comment.
lol vibe coding at its best 😄
804b349 to
96eaecb
Compare
|
@NTaylorMullen Please take a fresh look now! |
…ation This commit introduces a complete learning framework for understanding and reimplementing Gemini CLI from scratch, following a reasoning-based approach similar to Python interpreter design guides. The framework provides: **Main Framework Document (LEARNING_FRAMEWORK.md)** - Architecture overview with execution pipeline - Historical timeline mapping actual commit history to development phases - Phase-by-phase implementation guide (Phases 0-6) - Complete code examples for each phase - ADR template for documenting architectural decisions - Learning checkpoints and exercises - Development tools (visualizer, debugger, comparison scripts) **Architecture Decision Records (docs/adrs/)** - ADR-001: TypeScript setup and strict mode configuration * Explains type erasure, module resolution, verbatimModuleSyntax * References real Gemini CLI tsconfig.json * Includes checkpoint quiz and practical exercises - ADR-006: Turn abstraction and separation from GeminiClient * Documents PR google-gemini#42 refactoring (April 18, 2025) * Explains why Turn was extracted as separate class * Shows async generator pattern for event streaming * Compares alternatives (monolithic, functional, class-based) **Comparisons (docs/comparisons/)** - Phase 1 Tools Comparison: Mini (80 lines) vs Real (296 lines) * Side-by-side code comparison * Feature coverage matrix * Explains why Real is 4x larger (binary detection, large files, security) * Evolution path from Mini to Real **Checkpoints (docs/checkpoints/)** - Checkpoint 2: Tool System & Function Calling * Conceptual questions (function calling, validation, Zod vs TypeScript) * Practical exercises (implement GrepTool, model integration) * Design questions (tool registry, error recovery) * Self-assessment and reflection **Documentation Index (docs/README.md)** - Complete learning path overview - Index of all ADRs, comparisons, and checkpoints - How to use the framework - Reference to key Gemini CLI files - Commit history highlights Key Learning Outcomes: - Understand Gemini API function calling mechanism - Master declarative tool pattern (validation, execution, policy) - Learn agentic orchestration loops - Event-driven architecture with async generators - React/Ink terminal UIs - TypeScript strict mode and type system Historical Context: The framework maps to actual Gemini CLI development: - April 15, 2025: Initial commit (7,920 lines) - April 18, 2025: Turn abstraction extracted - September 2025: Declarative agent framework introduced - November 2025: Policy engine added This provides a structured path to rebuild Gemini CLI incrementally, understanding every design decision through historical context and comparative analysis of simplified vs. production implementations. Total Documentation: - 6 new files - ~3,500 lines of documentation - 12 code examples - 15+ quiz questions with detailed answers - Complete project structure for mini-gemini-cli
Introduces a `PersistentState` utility to track local user state across sessions. Updates `AppHeader` to hide the default welcome banner after it has been shown 5 times to reduce visual noise for experienced users. - Added `packages/cli/src/utils/persistentState.ts` for managing `state.json`. - Updated `AppHeader.tsx` to increment and check `defaultBannerShownCount`. - Added unit tests for banner display logic. - Minor: Updated model name in `geminiChat.test.ts`.
Introduces a `PersistentState` utility to track local user state across sessions. Updates `AppHeader` to hide the default welcome banner after it has been shown 5 times to reduce visual noise for experienced users. - Added `packages/cli/src/utils/persistentState.ts` for managing `state.json`. - Updated `AppHeader.tsx` to increment and check `defaultBannerShownCount`. - Added unit tests for banner display logic. - Minor: Updated model name in `geminiChat.test.ts`.
No description provided.