fix: chat evaluation bugs — task pipeline, prompt grounding, markdown rendering
Addresses 14 bugs from 3 rounds of deep chat evaluation:
- Add chat-to-task pipeline in agents.py with regex-based intent detection,
agent extraction, priority extraction, and title cleaning
- Filter meta-questions ("how do I create a task?") from task creation
- Inject real-time date/time context into every chat message
- Inject live queue state when user asks about tasks
- Ground system prompts with agent roster, honesty guardrails, self-knowledge,
math delegation template, anti-filler rules, values-conflict guidance
- Add CSS for markdown code blocks, inline code, lists, blockquotes in chat
- Add highlight.js CDN for syntax highlighting in chat responses
- Reduce small-model memory context budget (4000→2000) for expanded prompt
- Add 27 comprehensive tests covering the full chat-to-task pipeline
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -429,6 +429,44 @@ a:hover { color: var(--orange); }
|
||||
.chat-message.agent .msg-body { border-left: 3px solid var(--purple); }
|
||||
.chat-message.error-msg .msg-body { border-left: 3px solid var(--red); color: var(--red); }
|
||||
|
||||
/* ── Markdown rendering in Timmy chat ─────────────────── */
|
||||
.timmy-md { white-space: normal; }
|
||||
.timmy-md p { margin: 0 0 0.5em; }
|
||||
.timmy-md p:last-child { margin-bottom: 0; }
|
||||
.timmy-md pre {
|
||||
background: #0d0620;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 10px 12px;
|
||||
overflow-x: auto;
|
||||
margin: 0.5em 0;
|
||||
white-space: pre;
|
||||
}
|
||||
.timmy-md code {
|
||||
font-family: var(--font);
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.timmy-md :not(pre) > code {
|
||||
background: rgba(168, 85, 247, 0.15);
|
||||
padding: 2px 5px;
|
||||
border-radius: 3px;
|
||||
color: var(--text-bright);
|
||||
}
|
||||
.timmy-md ul, .timmy-md ol { padding-left: 1.5em; margin: 0.4em 0; }
|
||||
.timmy-md blockquote {
|
||||
border-left: 3px solid var(--purple);
|
||||
padding-left: 10px;
|
||||
color: var(--text-dim);
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
.timmy-md h1, .timmy-md h2, .timmy-md h3 {
|
||||
color: var(--text-bright);
|
||||
margin: 0.6em 0 0.3em;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
}
|
||||
.timmy-md a { color: var(--purple); }
|
||||
|
||||
/* Mobile chat classes (used by mobile.html) */
|
||||
.chat-container {
|
||||
overflow-y: auto;
|
||||
|
||||
Reference in New Issue
Block a user