forked from Rockachopa/Timmy-time-dashboard
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>
27 lines
930 B
HTML
27 lines
930 B
HTML
<div class="chat-message user">
|
|
<div class="msg-meta">YOU // {{ timestamp }}</div>
|
|
<div class="msg-body">{{ user_message | e }}</div>
|
|
</div>
|
|
{% if response %}
|
|
<div class="chat-message agent">
|
|
<div class="msg-meta">TIMMY // {{ timestamp }}</div>
|
|
<div class="msg-body timmy-md">{{ response | e }}</div>
|
|
</div>
|
|
<script>
|
|
(function() {
|
|
var el = document.currentScript.previousElementSibling.querySelector('.timmy-md');
|
|
if (el && typeof marked !== 'undefined' && typeof DOMPurify !== 'undefined') {
|
|
el.innerHTML = DOMPurify.sanitize(marked.parse(el.textContent));
|
|
if (typeof hljs !== 'undefined') {
|
|
el.querySelectorAll('pre code').forEach(function(block) { hljs.highlightElement(block); });
|
|
}
|
|
}
|
|
})();
|
|
</script>
|
|
{% elif error %}
|
|
<div class="chat-message error-msg">
|
|
<div class="msg-meta">SYSTEM // {{ timestamp }}</div>
|
|
<div class="msg-body">{{ error | e }}</div>
|
|
</div>
|
|
{% endif %}
|