Repository navigation
feat: implement Phase 1 AI Work Panel for document modification (#274) - #277
Conversation
|
I reviewed the implementation against the PR description and the acceptance criteria for Phase 1 of the AI Work Panel. The backend /api/ai/work endpoint correctly receives the instruction and current document content, processes the request through the configured AI provider, and returns modified Markdown. The frontend Work tab sends the active document context and applies the returned Markdown directly to the editor. The implementation is also structured in a way that can be extended to support broader project-level operations in the future. During testing, I found an issue where the Work endpoint sent temperature: 0.2. Some configured models only support the default temperature value of 1, which caused requests such as “fix all typos” to fail with HTTP 400. This issue has been fixed by removing the unsupported custom temperature parameter from Work requests. The fix has been verified with backend compilation and Ruff checks. The current PR now satisfies the stated Phase 1 requirements and is ready to be merged into the main branch. |
Description
This PR implements Phase 1 of the Feasibility Study for the AI Work Panel, allowing users to communicate with AI in natural language to directly modify the currently active editor tab.
Closes #274
Tasks Completed
/workendpoint inrouters/ai.pyand a dedicatedprocess_document_workLLM prompt inai_logic.pydesigned to output strictly raw Markdown without conversational filler.useAIActions.tswith anexecuteWorkmethod that sends the current document context to the backend and applies the returned Markdown directly to the editor.AIPanel.tsxcomponent to handle natural language instructions and trigger document modifications.Acceptance Criteria Met
Demo