feat(odin): Phase 2a read-only agentic assistant + tool-trace UI
- agentic chat loop (max 6 round-trips, budget re-checked between iterations) over 10 read-only, permission-delegated tools in src/services/ai-tools.ts - persist assistant tool trace in ai_chat_messages.content_json (+ migration) - consulted-tools chips in OdinThread; header now shows month spend only (budget cap hidden from the UI, server-side 402 guard unchanged) - seed: ai.use permission; Settings exposes the ai permission module - docs: REVIEW consolidation; deployment-guide.md superseded by docs/release.md Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Box from "@mui/material/Box";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Chip from "@mui/material/Chip";
|
||||
import { motion, useReducedMotion, type Variants } from "framer-motion";
|
||||
import type { ChatTurn } from "./types";
|
||||
import OdinMark from "./OdinMark";
|
||||
@@ -197,6 +198,23 @@ export default function OdinThread({
|
||||
bgcolor: isUser ? "primary.main" : "background.paper",
|
||||
}}
|
||||
>
|
||||
{/* Tools the assistant consulted for this turn (Phase 2a). */}
|
||||
{!isUser && t.tools && t.tools.length > 0 && (
|
||||
<Box
|
||||
sx={{ display: "flex", flexWrap: "wrap", gap: 0.5, mb: 0.75 }}
|
||||
>
|
||||
{t.tools.map((tool, j) => (
|
||||
<Chip
|
||||
key={`${tool.name}-${j}`}
|
||||
size="small"
|
||||
label={`🔍 ${tool.label}`}
|
||||
color={tool.ok ? "default" : "warning"}
|
||||
variant="outlined"
|
||||
sx={{ fontSize: "0.7rem", height: 22 }}
|
||||
/>
|
||||
))}
|
||||
</Box>
|
||||
)}
|
||||
{/* Color MUST sit on the Typography: GlobalStyles pins `p` to
|
||||
text.secondary, which beats a color merely inherited from the
|
||||
Box. An sx class on the element wins over that element rule. */}
|
||||
|
||||
Reference in New Issue
Block a user