mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-07-23 22:55:45 +00:00
Consolidate the three copies of context assembly into
open_notebook/utils/context_builder.py:
- POST /api/chat/context now delegates to build_notebook_context()
(same request/response shapes, same string-matching config semantics)
- The source-chat graph now calls build_source_context() instead of the
495-line generalized ContextBuilder class, which had exactly one
caller and whose notebook/notes/priority-config flexibility was dead
- POST /api/notebooks/{notebook_id}/context removed: it duplicated
/api/chat/context with a slightly different envelope and had zero
callers (frontend, docs, tests)
Behavior is pinned by new characterization tests written before the
refactor (tests/test_context_endpoint_characterization.py) plus unit
tests for build_source_context.
|
||
|---|---|---|
| .. | ||
| ai | ||
| database | ||
| domain | ||
| graphs | ||
| podcasts | ||
| utils | ||
| __init__.py | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| config.py | ||
| exceptions.py | ||