From 2712a1c26264c68ecd6288f90200c7bb318b06f0 Mon Sep 17 00:00:00 2001 From: Gerard Slee Date: Sun, 10 May 2026 14:08:13 -0400 Subject: [PATCH 1/4] Add temperature setting & propagate to agent/chat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce a configurable LLM sampling temperature and wire it through the app and IPC layers. Added `temperature` to AIConfig/defaults and to request interfaces, passed it from renderer → main process → agent/chat loops, and applied it when calling the LLM (plan mode forces 0.1 for determinism). Increase maxSteps handling: use per-request `maxSteps` in the agent loop (removed hard-coded constant), raise UI max to 1000 and add an “∞” quick button. UI changes: add temperature input and presets in AI settings, expose toggles to show/hide Agent and AI Chat views in AI settings, and update the Views settings copy to note those controls. Misc: update CAIRN tool list/comments to clarify excluded destructive tools and adjust project select rendering (remove icon). Type/signature updates were made across files to accept `temperature` and `maxSteps`. --- changelogs/v1.2.3.md | 44 +++++++++ electron/ipc/chat.ts | 5 +- electron/ipc/pi-agent.ts | 20 ++-- electron/lib/pi-agent-loop.ts | 36 +++++-- electron/lib/tools.ts | 2 +- src/components/agent/PiAgentPane.tsx | 16 ++-- src/components/chat/chat-panel.tsx | 9 +- src/components/notes/notes-view/PrdModal.tsx | 9 +- src/components/settings/AISettings.tsx | 94 ++++++++++++++++--- src/components/settings/MCPSettings.tsx | 2 +- .../settings/ViewVisibilitySettings.tsx | 6 +- src/hooks/useChatStream.ts | 1 + src/lib/constants.ts | 1 + src/store/slices/ui.ts | 2 + 14 files changed, 196 insertions(+), 51 deletions(-) create mode 100644 changelogs/v1.2.3.md diff --git a/changelogs/v1.2.3.md b/changelogs/v1.2.3.md new file mode 100644 index 0000000..29da4ed --- /dev/null +++ b/changelogs/v1.2.3.md @@ -0,0 +1,44 @@ +# v1.2.3 + +## What's new + +### Features + +- **Configurable temperature** — LLM sampling temperature is now a first-class setting in AI & Chat (0–1, step 0.05, presets 0.1 / 0.3 / 0.5 / 0.7). Previously hardcoded to 0.3 everywhere. Plan mode always overrides to 0.1 for deterministic codebase analysis regardless of this setting. + +- **Temperature wired end-to-end** — the setting is now forwarded through all three AI call paths: Pi agent (`pi-agent:prompt` and `pi-agent:approve-plan`), chat panel, and PRD modal. Previously only the Pi agent partially respected it. + +- **Max steps uncapped** — the max steps input now accepts values up to 1000, with an ∞ preset (maps to 1000) for complex multi-file tasks. Presets updated to 10 / 20 / 30 / 50 / ∞. The Pi agent loop now reads this value from settings rather than using the hardcoded constant of 30. + +- **Smarter coding agent tool set** — the Pi agent (`CAIRN_TOOL_NAMES`) gains access to seven previously missing tools: `get_neighbors` (N-hop graph traversal), `bulk_update_task_status`, `link_note_to_task`, `create_tag`, `get_idea_flow_rules`, `update_idea_flow_node`, and `layout_idea_flow`. The agent could previously create idea flow nodes and tasks but couldn't link, tag, or arrange them. + +- **AI & Chat settings reorganised** — "Enable AI features" is now "Enable inline AI" under a new "Visibility" group that also contains Agent view and AI Chat view toggles. All AI-related visibility is now in one place instead of being split between AI & Chat and General → Views. + +### Fixes + +- **MCP project selector showing icon name instead of icon** — the project dropdown in the MCP Settings "Project context" panel was rendering `p.icon` as a string inside an HTML `