Scaffold web frontend: mock-backed chat + PDF split-view, Tailwind/shadcn
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
|
||||
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
LOG_PATH = os.path.join(ROOT, "docs", "progress-log.md")
|
||||
|
||||
def latest_entry():
|
||||
try:
|
||||
with open(LOG_PATH, encoding="utf-8") as f:
|
||||
text = f.read()
|
||||
except FileNotFoundError:
|
||||
return ""
|
||||
for part in re.split(r"^---$", text, flags=re.MULTILINE):
|
||||
if re.search(r"^## ", part, re.MULTILINE):
|
||||
return part.strip()
|
||||
return ""
|
||||
|
||||
entry = latest_entry()
|
||||
if entry:
|
||||
context = (
|
||||
"Project: Duoc Thu RAG medical chatbot (D:\\VSF-DUOCTHU). "
|
||||
"Latest entry from docs/progress-log.md (read that file and "
|
||||
"CLAUDE.md for full status before assuming anything):\n\n" + entry
|
||||
)
|
||||
print(json.dumps({
|
||||
"hookSpecificOutput": {
|
||||
"hookEventName": "SessionStart",
|
||||
"additionalContext": context,
|
||||
}
|
||||
}))
|
||||
Reference in New Issue
Block a user