- CHANGE.md: Added entries for May 18 (token economics, chat export, UI fixes) and May 19 (Qdrant semantic search, vector embeddings, model/test fixes) - README.md: Added Qdrant to prerequisites and architecture diagram, documented token economics, semantic search, and chat export features
321 lines
15 KiB
Markdown
321 lines
15 KiB
Markdown
# CHANGELOG
|
||
|
||
This document tracks all significant changes to Gadget Code, organized by date.
|
||
|
||
---
|
||
|
||
## 2026-05-19 (Monday)
|
||
|
||
**Qdrant Semantic Search and Vector Embeddings**
|
||
|
||
Implemented Qdrant-powered semantic search over chat history with full embedding pipeline, including Qdrant and LangChain configuration, vector dimension passthrough for both Ollama and OpenAI, and a new search API endpoint with frontend search input component. Also fixed Mongoose syncIndexes errors across all models and improved drone-session test isolation.
|
||
|
||
### Changes:
|
||
- **Semantic Search**: Implemented Qdrant vector search over chat history with embedding pipeline and search API endpoint.
|
||
- **Embeddings**: Added Qdrant and embedding model configuration; added `@langchain/textsplitters` for text vector processing; fixed vector dimension passthrough for Ollama and OpenAI.
|
||
- **Frontend**: Added SearchInput and ChatSearchResults components; integrated search into ChatSessionView.
|
||
- **Models**: Removed `syncIndexes` from all Mongoose models (caused duplicate index errors); mocked DB in drone-session tests.
|
||
- **Fixes**: Fixed auto-scroll, search input errors, and backend error handling; logging and formatting cleanup.
|
||
- **Build**: Added clean script.
|
||
|
||
---
|
||
|
||
## 2026-05-18 (Sunday)
|
||
|
||
**Token Economics, Chat Export, and UI Layout Fixes**
|
||
|
||
Implemented token economics with real API token extraction from OpenAI responses, stats propagation through the session pipeline, and a context window fuel gauge. Added chat_export agent tool for markdown/JSON session export. Fixed home sidebar layout for independent scrolling sections.
|
||
|
||
### Changes:
|
||
- **Token Economics**: Implemented real API token extraction from OpenAI responses, stats propagation, and context window fuel gauge with auto-update.
|
||
- **Logging**: Added DtpLog logging of all OpenAI API responses with raw response object capture.
|
||
- **Chat Export**: Added `chat_export` agent tool for session export in markdown and JSON formats.
|
||
- **UI**: Fixed home sidebar flex column layout with independent scrolling sections; added `lucide-react` icons.
|
||
- **Config**: Added Qdrant and embedding model config types.
|
||
|
||
---
|
||
|
||
## 2026-05-17 (Sunday)
|
||
|
||
**Release Hardening, Subagent Improvements, and Workspace Intelligence**
|
||
|
||
The day focused on preparing the v1.0.1 release with a hardened release script, fixing subagent context management, adding prompt draft persistence, and implementing intelligent workspace startup that detects the workspace directory by walking up the file hierarchy.
|
||
|
||
### Changes:
|
||
- **Release**: Added hardened release script with error handling and pre-flight checks.
|
||
- **Subagent**: Improved subagent context management for more reliable agent operations.
|
||
- **Chat Session**: Implemented prompt draft save/restore so in-progress prompts survive view changes.
|
||
- **Workspace**: Added intelligent startup — drone detects workspace by walking up directory hierarchy.
|
||
- **Agent Tools**: Updated plan tool with improved prompt language and behavior.
|
||
- **Prompt Editor**: Expanded prompt editor capabilities.
|
||
- **gadget-tasks**: Course correction — converted to headless IDE client architecture (no direct DB access).
|
||
- **Documentation**: Added gadget-tasks architecture documentation; updated README and agent-toolbox docs.
|
||
- **Build**: Fixed installation and global link issues.
|
||
- **Tests**: Updated code-session tests to match current API expectations.
|
||
|
||
---
|
||
|
||
## 2026-05-16 (Saturday)
|
||
|
||
**AI Toolbox Extraction and Project Manager Upgrades**
|
||
|
||
Completed the refactor extracting the AI toolbox from `@gadget/ai` into `@gadget/ai-toolbox`, and implemented Project Manager upgrades across Phases 1–4. Cleaned up incorrect dependencies.
|
||
|
||
### Changes:
|
||
- **AI Toolbox**: Completed refactor and extraction from `@gadget/ai` into `@gadget/ai-toolbox`.
|
||
- **Project Manager**: Implemented upgrades across Phases 1–4.
|
||
- **Dependencies**: Removed incorrect `simple-git` package; fixed type references.
|
||
|
||
---
|
||
|
||
## 2026-05-15 (Thursday)
|
||
|
||
**Pull Project, Tool Call Observability, and Context Window Configuration**
|
||
|
||
Introduced the Pull Project feature for cloning remote repositories, added tool call observability to the chat session view, and added `numCtx` (Context Window) configuration to the SESSION panel. Also refactored ChatSessionView and added the Gab AI affiliate link.
|
||
|
||
### Changes:
|
||
- **Pull Project**: Initial implementation for cloning remote repositories into the workspace.
|
||
- **Observability**: Added tool call observability to the chat session view.
|
||
- **File Operations**: Added new file creation capability.
|
||
- **SESSION Panel**: Added `numCtx` (Context Window) setting; updated model config pipeline with `numPredict`, `numCtx`, and `maxCompletionTokens`.
|
||
- **ChatSessionView**: Refactored for improved structure; added scripts directory.
|
||
- **Provider**: Added Gab AI affiliate link; changed Ollama abort procedure.
|
||
|
||
---
|
||
|
||
## 2026-05-14 (Wednesday)
|
||
|
||
**SubProcess Observability Implementation**
|
||
|
||
Implemented comprehensive observability for SubProcess operations within the DroneManager and DroneInspector components, including status tracking, event emission, and UI display of subprocess execution details.
|
||
|
||
### Changes:
|
||
- **SubProcess**: Implemented Phase 1 (SubProcess service and agent tool) and Phase 2 (observability in DroneManager and DroneInspector).
|
||
- **UI**: Updated to display subprocess execution details.
|
||
- **Fixes**: Fixed mode change log message formatting.
|
||
|
||
---
|
||
|
||
## 2026-05-13 (Tuesday)
|
||
|
||
**CodeMirror Editor Fix and User Mode Documentation**
|
||
|
||
Fixed a critical CodeMirror editor height constraint in flex layouts, and added documentation for User Mode continuation prompts and MVP completion summary.
|
||
|
||
### Changes:
|
||
- **Editor**: Fixed CodeMirror editor height constraint in flex layout.
|
||
- **Documentation**: Added continuation prompt and remaining steps for User Mode; added session summary for MVP completion; formatting cleanup in AGENTS.md.
|
||
- **Infrastructure**: Prep work for landing page project.
|
||
|
||
---
|
||
|
||
## 2026-05-12 (Monday)
|
||
|
||
**FILES Panel, Editor Integration, and Abort Controller**
|
||
|
||
Major milestone: implemented the FILES panel foundation with lazy-loading file tree, replaced react-ace with @uiw/react-codemirror (React 19 compat), added an abort controller for work order processing, and fixed numerous file tree and layout issues.
|
||
|
||
### Changes:
|
||
- **FILES Panel**: Implemented foundation with lazy-loading file tree; fixed scrolling, duplication, corruption, and expand/collapse rendering issues.
|
||
- **Editor**: Replaced react-ace with @uiw/react-codemirror for React 19 compatibility; fixed ACE editor crash (Vite `?url` pattern, Error Boundary).
|
||
- **Layout**: Fixed flexbox scrolling for sidebar; added `shrink-0` to SESSION and PROJECT panels.
|
||
- **Abort Controller**: Implemented abort controller for work order processing; added Aborted status.
|
||
- **Navigation**: Added navigation to project in Project Manager using slug.
|
||
- **Socket**: Defined missing socket event types; enforced typed events in frontend build.
|
||
- **AI**: Fixed OpenAI API tool call processing correctness.
|
||
- **Agent**: Moved plan prompt language from common block; added plan for project-specific agent instructions.
|
||
|
||
---
|
||
|
||
## 2026-05-11 (Sunday)
|
||
|
||
**Subagent Processing, Authentication, and Deployment Documentation**
|
||
|
||
Focused on subagent processing improvements and authentication fixes, including subagent response handling, session data management, persona field in sign-in responses, and JWT/heartbeat fixes. Added deployment documentation with installation guides, config examples, and systemd service files.
|
||
|
||
### Changes:
|
||
- **Subagent**: Fixed subagent response handling and session data; crushed whitespace in subagent markdown output.
|
||
- **Auth**: Added persona field to sign-in response; fixed JWT expiration bugs and drone heartbeat timeouts.
|
||
- **ChatSession**: Added reconnect logic; fixed crash.
|
||
- **Deployment**: Added installation guides, config examples, and systemd service files.
|
||
- **Model Config**: Added `numPredict`, `numCtx`, `maxCompletionTokens` to model configuration pipeline.
|
||
- **Style**: CSS and style fixes for subagent display; updated build prompt.
|
||
- **Architecture**: Integrated docs/archive for reference; subagents system (written by an agent, for an agent).
|
||
|
||
---
|
||
|
||
## 2026-05-10 (Saturday)
|
||
|
||
**Workspace and Project Philosophy Refinement**
|
||
|
||
Refined the conceptual model separating Workspaces from Projects, improved the chat interface, and fixed credential provider and API key distribution issues.
|
||
|
||
### Changes:
|
||
- **Architecture**: Applied philosophy shifts for Workspaces and Projects; updated conceptual model.
|
||
- **Agent Toolbox**: Refactored and updated agent toolbox.
|
||
- **Fixes**: Fixed credential provider; ensured apiKey is presented to required consumers.
|
||
- **Chat**: Chat interface fixes and cleanup.
|
||
|
||
---
|
||
|
||
## 2026-05-09 (Friday)
|
||
|
||
**Agentic Workflow Loop Rebuild**
|
||
|
||
Rebuilt the Agentic Workflow Loop from the ground up for improved reliability and performance, with enhanced streaming response handling, chat session auto-naming, and drone-to-IDE log transport.
|
||
|
||
### Changes:
|
||
- **AWL**: Re-built Agentic Workflow Loop with improved reliability and checkpointing.
|
||
- **Streaming**: Enhanced streaming response handling and correctness.
|
||
- **Chat Session**: Implemented auto-naming with IDE update.
|
||
- **Logging**: Added GadgetLogTransportSocket for drone-to-IDE log streaming.
|
||
|
||
---
|
||
|
||
## 2026-05-08 (Thursday)
|
||
|
||
**Chat Session Heartbeat, User Settings, and Logging Unification**
|
||
|
||
Implemented chat session heartbeat and session unlock, user settings management, configurable reasoning effort, and unified logging into `@gadget/api` as GadgetLog. Redesigned sign-in form and provider/model selection.
|
||
|
||
### Changes:
|
||
- **Session**: Implemented chat session heartbeat and session unlock.
|
||
- **User Settings**: Added user settings management; made reasoning effort configurable.
|
||
- **Auth**: Redesigned sign-in form and presentation; removed sign-up concept; integrated persona field in User.
|
||
- **UI**: Reworked provider/model selection with save/cancel pattern; added editable session name with cog icon; added navigation to return to Project Manager.
|
||
- **Logging**: Unified logging into `@gadget/api` as GadgetLog; pre-task cleanup to reduce log spam; fixed logging when file logging is disabled.
|
||
- **Streaming**: Fixed streaming response handling for Ollama.
|
||
|
||
---
|
||
|
||
## 2026-05-07 (Wednesday)
|
||
|
||
**Streaming Responses Implementation**
|
||
|
||
Implemented streaming responses for AI model interactions, including proper handling of streaming data from Ollama and other providers with real-time token delivery and response completion tracking.
|
||
|
||
### Changes:
|
||
- **Streaming**: Implemented streaming responses for Ollama with real-time token delivery and completion tracking.
|
||
- **Documentation**: Created documentation for streaming responses.
|
||
|
||
---
|
||
|
||
## 2026-05-06 (Tuesday)
|
||
|
||
**Agent Tool and Toolbox Architecture**
|
||
|
||
Significant refactoring of the agent tool and toolbox architecture, establishing the foundational pattern for tool registration and management.
|
||
|
||
### Changes:
|
||
- **Architecture**: Refactored agent tool and toolbox; established tool registration and management patterns.
|
||
- **AI Environment**: Agent, tools, toolbox, tool loop, and AI environment foundation.
|
||
|
||
---
|
||
|
||
## 2026-05-05 (Monday)
|
||
|
||
**Basic Chat System Milestone**
|
||
|
||
Achieved a working basic chat system — the first end-to-end milestone — with provider, model, and mode selection, ChatTurn processing, and agent progress tracking.
|
||
|
||
### Changes:
|
||
- **Chat**: Implemented basic working chat system (checkpoint).
|
||
- **Selection**: Added provider, model, and mode selections.
|
||
- **Processing**: Enhanced AgentService.process method; implemented ChatTurn processing and component.
|
||
- **Infrastructure**: Renamed platform.apiKey to platform.gadgetKey; reduced log output.
|
||
|
||
---
|
||
|
||
## 2026-05-03 (Saturday)
|
||
|
||
**Workspace Mode Management and Status Display**
|
||
|
||
Fixed status message display in the agent interface and implemented workspace mode management with drone status message socket events.
|
||
|
||
### Changes:
|
||
- **Status**: Fixed status message display in agent interface.
|
||
- **Workspace**: Implemented workspace mode management; added drone status message socket events.
|
||
|
||
---
|
||
|
||
## 2026-05-02 (Friday)
|
||
|
||
**Workspace Mode Switching with Validation**
|
||
|
||
Implemented workspace mode switching with validation, ensuring workspace mode changes are validated before being applied, along with session lock and workspace processing refinements.
|
||
|
||
### Changes:
|
||
- **Workspace**: Implemented workspace mode switching with validation.
|
||
- **Session**: Added session lock and workspace processing refinements.
|
||
- **Socket**: Socket message and drone workspace cleanup; drone doc updates.
|
||
|
||
---
|
||
|
||
## 2026-05-01 (Thursday)
|
||
|
||
**The Grid Home View and GadgetId Migration**
|
||
|
||
Implemented the "Welcome to The Grid" home view, fixed JWT processing, refactored session lifecycle management, and completed the transition from Types.ObjectId to GadgetId across the codebase.
|
||
|
||
### Changes:
|
||
- **Home View**: Implemented "Welcome to The Grid" home view; return to Home on sign out.
|
||
- **Auth**: Fixed JWT processing.
|
||
- **Session**: Refactored session startup, shutdown, and import; fixed import errors.
|
||
- **GadgetId**: Completed transition from Types.ObjectId to GadgetId (string alias using nanoid); correctly generate nanoid IDs in default clauses.
|
||
|
||
---
|
||
|
||
## 2026-04-30 (Wednesday)
|
||
|
||
**Socket Protocol and Drone Manager**
|
||
|
||
Implemented socket protocol completeness with typed events, created the DroneManager, and finalized Project Manager correctness.
|
||
|
||
### Changes:
|
||
- **Socket Protocol**: Implemented socket protocol completeness; defined missing event types; enforced typed events in frontend build.
|
||
- **Drone Manager**: Created DroneManager (WIP).
|
||
- **Config**: Added setting for max Socket.IO HTTP buffer size.
|
||
- **Project Manager**: Wrap-up on Project Manager correctness.
|
||
|
||
---
|
||
|
||
## 2026-04-29 (Tuesday)
|
||
|
||
**Drone-to-IDE Event Routing and Workspace Persistence**
|
||
|
||
Implemented drone-to-IDE event routing, added event emissions to the Agentic Workflow Loop, and implemented workspace persistence and crash recovery. Added workspace mode to the gadget-drone process.
|
||
|
||
### Changes:
|
||
- **Event Routing**: Implemented Drone→IDE event routing (Phase 3); added event emissions to AWL (Phase 4).
|
||
- **Workspace**: Added workspace mode to gadget-drone process; implemented workspace persistence and crash recovery (Phase 5).
|
||
- **Protocol**: Implemented prompt submission; fixed type conflicts; added socket protocol documentation.
|
||
- **Config**: Added max Socket.IO HTTP buffer size setting; standardized interfaces.
|
||
|
||
---
|
||
|
||
## 2026-04-28 (Monday)
|
||
|
||
**Dark Industrial Theme, JWT Auth, and Project Manager**
|
||
|
||
Significant visual and architectural milestone: implemented the dark industrial theme, Project Manager, and JWT authentication, replacing sign-up with streamlined sign-in.
|
||
|
||
### Changes:
|
||
- **Theme**: Implemented dark industrial theme with correct border colors and enforcement.
|
||
- **Auth**: Implemented JWT authentication.
|
||
- **Project Manager**: Added project service.
|
||
- **Models**: Refactored gadget-code model interfaces to `@gadget/api`.
|
||
- **Infrastructure**: Added workspaceDir to DroneRegistration; E2E tests for theme.
|
||
|
||
---
|
||
|
||
## 2026-04-27 (Sunday)
|
||
|
||
**Initial Commit**
|
||
|
||
The project was initialized, establishing the foundation for all subsequent development.
|
||
|
||
### Changes:
|
||
- Initial project commit.
|
||
- Established basic project structure.
|