summaryrefslogtreecommitdiff
path: root/makima/src/llm/mod.rs
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-05-17 21:23:20 +0100
committerGitHub <noreply@github.com>2026-05-17 21:23:20 +0100
commit0d996cf7590e3e52f424859c7d6f0e68640f119e (patch)
tree0f3898d9e2e2a3c312358dbf70c44f4ab1cf3648 /makima/src/llm/mod.rs
parentce29ae801bcc5a0ba76d5a8d1565242ab267a47d (diff)
downloadsoryu-0d996cf7590e3e52f424859c7d6f0e68640f119e.tar.gz
soryu-0d996cf7590e3e52f424859c7d6f0e68640f119e.zip
chore: remove LLM module + all dependent surfaces (#135)
Wholesale removal of the LLM integration layer. ~14,200 LOC deleted across backend and frontend. All chat-driven UIs go with it. ## Backend - Delete `src/llm/` (7,400 LOC): claude/groq clients, contract_tools, contract_evaluator, discuss_tools, mesh_tools, phase_guidance, task_output, templates, markdown round-trip, tools, transcript_analyzer. - Delete handlers wholly dependent on LLM: - `chat.rs` (file-level LLM chat at /files/{id}/chat) - `mesh_chat.rs` (mesh & task LLM chat + history) - `templates.rs` (/contract-types listing) - Strip LLM uses from `mesh_daemon.rs`: - `compute_action_directive` (used phase_guidance::check_deliverables_met to nudge supervisors with "all tasks done" messages). The auto-PR path below still fires when all tasks finish, so no behaviour lost. - `crate::llm::markdown_to_body` → inline 1-line replacement that wraps markdown content in a single BodyElement::Markdown. The editor re-parses on display, so round-trip is preserved. - Drop routes: /files/{id}/chat, /mesh/chat, /mesh/chat/history, /mesh/tasks/{id}/chat, /contract-types. - Drop the matching openapi registrations. ## Frontend - Delete components that were LLM-only: - `mesh/UnifiedMeshChatInput.tsx` - `listen/DiscussContractModal.tsx` - `listen/TranscriptAnalysisPanel.tsx` - `listen/ContractPickerModal.tsx` - `files/CliInput.tsx` - Delete the entire /listen page (its primary value-add was voice → LLM analysis → contract creation; without LLM the page is just a transcript display with no obvious user purpose). - Delete `hooks/useMeshChatHistory.ts` and `lib/listenApi.ts` (transcript-analysis API client to the already-Phase-5-removed listen handlers). - Strip api.ts of LLM exports: LlmModel, ChatMessage/Request/Response, UserQuestion/Answer, chatWithFile, MeshChat* types & functions, getMeshChatHistory, clearMeshChatHistory, chatWithMeshContext, ContractTypeTemplate, listContractTypes, chatWithContract, getContractChatHistory, clearContractChatHistory, discussContract, PhaseDefinition, DeliverableDefinition. - mesh.tsx: drop UnifiedMeshChatInput render + the chatContext memo + handleTaskUpdatedFromCli (only consumer was the input). - files.tsx: drop CliInput render + handleGenerateFromElement + handleBodyUpdate + handleClearFocus + suggestedPrompt state (all CliInput-only). - NavStrip: drop the /listen link. - main.tsx: drop the /listen route. ## Net diff: 37 files changed, 58 insertions, 14,281 deletions. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'makima/src/llm/mod.rs')
-rw-r--r--makima/src/llm/mod.rs73
1 files changed, 0 insertions, 73 deletions
diff --git a/makima/src/llm/mod.rs b/makima/src/llm/mod.rs
deleted file mode 100644
index 6c9965c..0000000
--- a/makima/src/llm/mod.rs
+++ /dev/null
@@ -1,73 +0,0 @@
-//! LLM integration module for file editing via tool calling.
-
-pub mod claude;
-pub mod contract_evaluator;
-pub mod contract_tools;
-pub mod discuss_tools;
-pub mod groq;
-pub mod markdown;
-pub mod mesh_tools;
-pub mod phase_guidance;
-pub mod task_output;
-pub mod templates;
-pub mod tools;
-pub mod transcript_analyzer;
-
-pub use claude::{ClaudeClient, ClaudeModel};
-pub use contract_tools::{
- parse_contract_tool_call, ChainedTaskDef, ContractToolExecutionResult, ContractToolRequest,
- CONTRACT_TOOLS,
-};
-pub use discuss_tools::{
- parse_discuss_tool_call, DiscussToolExecutionResult, DiscussToolRequest, DISCUSS_TOOLS,
-};
-pub use groq::GroqClient;
-pub use mesh_tools::{parse_mesh_tool_call, MeshToolExecutionResult, MeshToolRequest, MESH_TOOLS};
-pub use phase_guidance::{
- check_deliverables_met, format_checklist_markdown, generate_deliverable_prompt_guidance,
- get_next_phase_for_contract, get_phase_checklist_for_type, get_phase_deliverables,
- get_phase_deliverables_for_type, get_phase_deliverables_with_config, should_auto_progress,
- AutoProgressAction, AutoProgressDecision, Deliverable, DeliverableCheckResult, DeliverableItem,
- DeliverablePriority, DeliverableStatus, PhaseChecklist, PhaseDeliverables, TaskInfo, TaskStats,
-};
-pub use task_output::{
- analyze_task_output, format_parsed_tasks, parse_tasks_from_breakdown, ParsedTask,
- PhaseImpact, SuggestedAction, TaskOutputAnalysis, TaskParseResult,
-};
-pub use markdown::{body_to_markdown, markdown_to_body};
-pub use templates::{all_contract_types, ContractTypeTemplate};
-pub use tools::{
- execute_tool_call, Tool, ToolCall, ToolResult, UserAnswer, UserQuestion, VersionToolRequest,
- AVAILABLE_TOOLS,
-};
-pub use transcript_analyzer::{
- TranscriptAnalysisResult, ExtractedRequirement, ExtractedDecision,
- ExtractedActionItem, SpeakerStats, format_transcript_for_analysis,
- calculate_speaker_stats, build_analysis_prompt, parse_analysis_response,
-};
-pub use contract_evaluator::{
- ContractEvaluator, ContractEvaluationResult, ContractEvaluatorError,
-};
-
-/// Available LLM providers and models
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
-pub enum LlmModel {
- /// Claude Sonnet 4.5 - balanced speed and capability
- ClaudeSonnet,
- /// Claude Opus 4.5 (default) - most capable
- #[default]
- ClaudeOpus,
- /// Groq Kimi - fast alternative provider
- GroqKimi,
-}
-
-impl LlmModel {
- pub fn from_str(s: &str) -> Option<Self> {
- match s.to_lowercase().as_str() {
- "claude-sonnet" | "sonnet" | "claude" => Some(LlmModel::ClaudeSonnet),
- "claude-opus" | "opus" => Some(LlmModel::ClaudeOpus),
- "groq" | "kimi" | "groq-kimi" => Some(LlmModel::GroqKimi),
- _ => None,
- }
- }
-}