add OpenAI-compatible backend, markdown rendering, and sendMessageDraft fix

- Configurable backend: claude (CLI) or openai (API), selected in config.yaml
- OpenAI streaming via SSE with conversation history in memory
- Session isolation: config name included in session UUID
- Markdown to Telegram HTML conversion (pulldown-cmark) for final messages
- Fix sendMessageDraft: skip cursor to preserve monotonic text growth,
  skip empty content chunks from SSE stream
- Simplify Makefile: single deploy target
This commit is contained in:
Fam Zheng
2026-04-09 10:23:50 +01:00
parent eba7d89006
commit 84ba209b3f
4 changed files with 357 additions and 31 deletions

View File

@@ -13,7 +13,7 @@ noc.service: noc.service.in
deploy: build noc.service
mkdir -p ~/bin ~/.config/systemd/user
systemctl --user stop noc 2>/dev/null || true
cp target/release/noc ~/bin/
install target/release/noc ~/bin/noc
cp noc.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now noc