[eric] help: ground the help chat in real product knowledge instead of a hardcoded prompt

This commit is contained in:
ciregenz
2026-07-30 18:29:15 -07:00
parent 2385a348d5
commit 96451de87e
11 changed files with 998 additions and 44 deletions
+11 -4
View File
@@ -1,8 +1,8 @@
"""Diagnostic bundle for bug reports: one folder a user can drag into a GitHub issue.
"""Routes for the Help panel: the product-knowledge feed, and the diagnostic bundle for bug reports.
Everything is assembled LOCALLY and only revealed in the file manager; nothing uploads
anywhere by itself. Contents are deliberately allowlisted (identity, versions, feature
booleans, provider KINDS, counts, log tail) so no secret or API key can ever ride along.
The bundle is assembled LOCALLY and only revealed in the file manager; nothing uploads anywhere by
itself. Contents are deliberately allowlisted (identity, versions, feature booleans, provider KINDS,
counts, log tail) so no secret or API key can ever ride along.
"""
import base64
@@ -18,6 +18,7 @@ from typing import AsyncIterator, List
from pydantic import BaseModel, ConfigDict, Field
from typeguard import typechecked
from backend.apps.help.knowledge import HelpKnowledgeResponse, build_knowledge_response
from backend.config.Apps import SubApp
from backend.config.paths import DATA_ROOT, SESSIONS_DIR
@@ -138,6 +139,12 @@ def p_build_report(req: BundleRequest) -> str:
return "\n".join(lines)
@help_app.router.get("/knowledge")
@typechecked
async def get_help_knowledge() -> HelpKnowledgeResponse:
return build_knowledge_response()
@help_app.router.post("/bundle")
@typechecked
async def build_bundle(body: BundleRequest) -> dict: