750 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
6153d8c092 release: v1.4.0 — release notes, version bump, repo hygiene
- Add assets/releases/ver1-4-0.md covering deltas since v1.4.0-beta
  (reasoning_effort normalization, tool-schema fallback, restart-safe
  turn runtime, frontend placeholder hardening, CLI chat REPL config).
- Bump deeptutor/__version__ to 1.4.0.
- Update README Releases section: v1.4.0 at top, install opt-in note
  updated for stable.
- Fix pre-existing pre-commit failures so the v1.4.0 cut runs clean:
  bandit B324 (mark _sha1 as non-security), mypy no-redef in
  document.py / line_doc.py, mypy arg-type/assignment in
  snapshot/adapters.py, mypy assignment + arg-type in
  services/memory/settings.py, mypy func-returns-value on
  set.add idiom in deeptutor_cli/init_wizard.py.
- Apply ruff format / prettier sweep across the repo.
- Remove stale workspace + i18n env example + playwright captures
  already cleaned locally; ignore .playwright-cli/ going forward.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
v1.4.0
2026-05-22 21:09:22 +08:00
Bingxi Zhao (Frank)
81d081d968 update readme 2026-05-22 20:36:55 +08:00
Bingxi Zhao (Frank)
921b1d6cff update readme 2026-05-22 20:32:02 +08:00
Bingxi Zhao (Frank)
ca7916bc57 fix: docs, docker deployment & official web 2026-05-22 20:19:32 +08:00
Bingxi Zhao (Frank)
c9a833f7c3 update readme 2026-05-22 02:12:46 +08:00
Bingxi Zhao (Frank)
206b775ad4 fix: unblock v1.4.0-beta release — Docker build + CI test alignment
web/lib/api.ts: defer NEXT_PUBLIC_API_BASE placeholder check from
module-load to first call. Docker bakes the literal placeholder for
runtime sed substitution, but Next.js evaluates this module during
static export of every prerendered page — the old throw failed the
admin/users page export and aborted the entire build.

Test alignment with shipped code (no behavior change):
- test_path_service: override _workspace_root alongside _project_root,
  since get_memory_dir() reads workspace_root, not _user_data_dir.
- test_meta_settings: assertions now match shipped defaults
  (l2_budget=20, min_chunk_chars=1000, max_chunk_chars=64000).
- test_unified_ws_turn_runtime + test_regenerate: drop emit_calls
  assertions; turn_runtime doesn't emit a memory trace after chat
  turns (feature was never wired up).
- test_turn_runtime_subscribe: 200 polls × 10ms instead of 20 × 0,
  Python 3.14's asyncio scheduler doesn't give sleep(0) enough ticks
  for the subscriber-append race.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
v1.4.0-beta
2026-05-22 00:21:41 +08:00
Bingxi Zhao (Frank)
0af2e7e0e1 update pypi 2026-05-22 00:02:44 +08:00
Bingxi Zhao (Frank)
4a1543e3c1 ci: drop docs.yml workflow
VitePress GitHub Pages deploy is not in use; remove the workflow added
alongside the pypi-release fix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 23:56:18 +08:00
Bingxi Zhao (Frank)
c4b96e74e5 ci: untrack .github from gitignore and add pypi-release/docs workflows
The .github entry in .gitignore silently excluded pypi-release.yml and
docs.yml from version control, so the PyPI publish workflow never reached
the default branch and didn't fire for release events.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 23:55:45 +08:00
Bingxi Zhao (Frank)
de08fde9e1 docs: update readme 2026-05-21 23:43:06 +08:00
Bingxi Zhao (Frank)
f8c76f4ff2 update logo 2026-05-21 21:32:13 +08:00
Bingxi Zhao (Frank)
a4bc7e0799 docs:add logo 2026-05-21 21:29:37 +08:00
Bingxi Zhao (Frank)
ff8b6a6d80 docs: figs&docker settings 2026-05-21 21:16:53 +08:00
Bingxi Zhao (Frank)
589327a49b docs(readme): drop %20 padding inside language pills, match ragflow spacing
Restores shields.io default internal padding on each pill and keeps
the single &nbsp; between pills. Height stays at 40 so the glyphs
read at the size we landed on.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 19:48:02 +08:00
Bingxi Zhao (Frank)
5059495ec4 chore(assets): compress dt-memgraph.png (2.3 MB → 446 KB)
Resize from 2940 px wide to 1600 px and palette-quantize to 256 colors,
keeping text/labels readable while bringing the file in line with the
other dt-*.png screenshots used in the README.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 19:40:38 +08:00
Bingxi Zhao (Frank)
17a72797cd docs(readme): bigger language pills, tighter gap, breathing room inside
- height 36 -> 40 so glyphs read clearly without a magnifier
- &nbsp;&nbsp; gap between pills -> single &nbsp; so the row stays
  compact
- one leading + trailing %20 space inside each badge label so the
  text doesn't kiss the pill edges

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 19:34:56 +08:00
Bingxi Zhao (Frank)
09d3743777 docs(readme): bump language-pill height to 36px for larger glyphs
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 19:29:57 +08:00
Bingxi Zhao (Frank)
d1c263fb71 docs(readme): add &nbsp; gaps between language pills
Inserts two non-breaking spaces between each language pill so the
row reads less cramped without forcing a wrap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 19:20:54 +08:00
Bingxi Zhao (Frank)
cfa6cd419b docs(readme): scale language pills to height=28 for a chunkier hit area
Bumps the language-switcher SVGs to 28px tall so the pills line up
better with the Trendshift badge above and the Python / Next.js
shields below, and gives the labels a more readable text size on
high-DPI displays.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 19:18:00 +08:00
Bingxi Zhao (Frank)
4a483e07e6 docs(readme): rewrite Explore + Key Features for v1.4.0-beta, drop Roadmap section
- Rewrite Explore DeepTutor section around v1.4.0-beta surfaces:
  Chat (5 modes + Auto + new tools), Co-Writer (split editor),
  Book (GeoGebra viewer + fingerprints), Knowledge Bases (LlamaIndex,
  versioned indexes), Space (Chat History / Notebooks / Q-Bank / Skills),
  three-layer Memory (L1/L2/L3 + Memory Graph), unified Settings.
- Update Key Features to match: 5 chat modes, composable tools (ask_user,
  web_fetch, write_note, list_notebook, github_query), Space, three-layer
  Memory, unified Settings + UsageTracker.
- Swap removed figures (dt-knowledge.png, tb.png) for new ones
  (dt-kb.png, dt-memgraph.png, dt-settings.png, dt-space.png,
  dt-tutorbot.png); refresh dt-chat / dt-cowriter / dt-memory.
- Delete the static Roadmap section; add a pointer to issue #498
  near the welcome-PR note at the top so the roadmap stays open.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 19:10:40 +08:00
Bingxi Zhao (Frank)
b2aa9bfb4a docs(readme): fix Arabic/Hindi/Thai badge rendering, darken pill colors
shields.io uses Verdana/Helvetica fallbacks that lack proper text
shaping for Arabic (RTL join), Devanagari (combining marks), and
Thai (combining tone marks), so the native names rendered as
separated, broken glyphs. Switch those three to ASCII names
(Arabic / Hindi / Thai) to mirror ragflow's same workaround; the
links still resolve to the Arabic / Hindi / Thai README files.

Also bump pill colors from DBEDFA / DFE0E5 to BCDCF7 / CDCFD4 so
they read better against the page background.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 19:10:19 +08:00
Bingxi Zhao (Frank)
2bcc8bfff2 docs(readme): adopt ragflow-style pastel language pills
Drops the flat-square shields in favor of the lighter ragflow pattern:
an HTML <p align="center"> wrapper with <a><img> pills using DBEDFA
(soft blue) for the active English link and DFE0E5 (soft grey) for
the ten translations. The header now reads cleaner alongside the
existing Trendshift / Python / Next.js / License badges.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 19:05:06 +08:00
Bingxi Zhao (Frank)
7a36e87dbf docs(readme): switch language switcher to badge pills, place under trending
Replaces the flag-based language line at the bottom of the header
with shields.io badge pills positioned right under the Trendshift
badge. English is highlighted (blue), the ten translations use a
neutral grey. Same destinations as before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 19:00:25 +08:00
Bingxi Zhao (Frank)
0ab5750eba docs(readme): note --pre install path for v1.4.0-beta
PyPI normalizes ``1.4.0-beta`` to ``1.4.0b0``, so the default
``pip install -U deeptutor`` stays on the latest stable. Add a short
callout under Option 1 covering ``pip install --pre`` and the exact
``deeptutor==1.4.0b0`` pin.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:22:15 +08:00
Bingxi Zhao (Frank)
2c1b8e56b2 release(1.4.0-beta): docs, version bump, CLI init wizard, packaging
- __version__.py bumped to 1.4.0-beta; pyproject.toml adds the
  ``deeptutor`` package-data globs so prompt YAMLs / capability
  prompts / Markdown templates ship in the PyPI wheel.
- New assets/releases/ver1-4-0-beta.md covers Auto Mode, Memory v2,
  agentic-engine rewrite, chat + LlamaIndex RAG refactor, new chat
  tools, Visualize+Animator merge, settings split, capabilities
  unification, multi-user / Zulip fixes, env/launcher rewrite.
- README.md adds the v1.4.0-beta entry at the top of the release
  notes; v1.3.0 rolls into the collapsed past-releases block.
- deeptutor_cli gains init_wizard.py (interactive provider menu,
  env-var auto-detect, live model-list fetch with curated fallback,
  optional connectivity probe) and a shared _tool_result helper;
  chat / common / config_cmd / init_cmd / provider_cmd updated to
  match.
- Removed legacy scripts/ helpers (_cli_kit, audit_prompts,
  check_install, generate_roster, migrate_kb, migrate_user_data,
  sync_prompts_from_en, test_embedding, test_llm_api) -- replaced by
  CLI subcommands or no longer relevant.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:08:50 +08:00
Bingxi Zhao (Frank)
90a2c14c81 chore: backend + frontend follow-ons for v1.4.0-beta
Wires the new memory / capability / settings / quiz subsystems into
existing surfaces and finishes the chat-pipeline follow-on work.

Backend:
- Session services pick up the cumulative source inventory + new tool
  tags (turn_runtime, sqlite_store, pocketbase_store, protocol,
  base_session_manager).
- LlamaIndex RAG pipeline config / document_loader / retrievers
  tightened; rag/service.py routed to match.
- Sessions / unified_ws / settings / notebook routers updated for
  delete-chat-turn, multi-user, and the new tool surface.
- TutorBot manager + Zulip channel + openai_compat_provider follow-on
  fixes layered on top of the v1.3.10 SSL/Zulip sweeps.
- runtime/{banner, launcher, orchestrator}, services/setup/init,
  prompt/manager, json_parser refined for the runtime-settings
  rewrite.

Frontend:
- Co-Learn pages and session-surfaces removed (folded into chat).
- Chat composer / messages / trace / session panels, sidebars,
  common modals, markdown renderers, and i18n updated for the new
  ask_user / write_note / source-inventory flow.
- Admin, agents, co-writer, playground, book pages picked up the
  shared updates.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:08:22 +08:00
Bingxi Zhao (Frank)
4df05d02da feat(quiz/book): quiz follow-up chat composer, GeoGebra viewer, book updates
Quiz follow-up:
- New FollowupChatComposer + QuizFollowupContext let the user start a
  chat thread directly from a quiz question. The composer reuses the
  main ChatComposer (look, @space pickers, KB picker, attachments,
  LLM selector) but routes sends through a dedicated follow-up
  controller.
- New quiz_judge router + quiz-judge.ts helper power judging
  follow-up answers inline.
- The older QuestionFollowupPanel.tsx is removed; QuizConfigPanel /
  QuizViewer are updated to the new follow-up surface.

GeoGebra viewer:
- New Geogebra.tsx applet renderer (loaded via the official GGB
  applet script) so geometry / algebra snippets can open inline
  alongside chat answers. GeogebraOpenCTA + GeogebraTabContext add
  the tab plumbing.

Book updates:
- book/blocks/quiz.py + book/engine.py + storage.py and the related
  book components pick up the new quiz surface.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:07:39 +08:00
Bingxi Zhao (Frank)
acd0d9329d feat(capabilities): unify infra, merge Animator into Visualize, split settings UI
Capability infrastructure:
- New capabilities/_shared.emit_capability_result helper fills the
  result envelope (label, summary, payload, render hints, UsageTracker
  totals) consistently across modes.
- StatusI18n loads capability status copy from
  capabilities/prompts/{en,zh}/<name>.yaml; legacy main.yaml strings
  removed.
- New capabilities_settings router + service-config module power the
  /settings/capabilities admin page (live capability list, defaults,
  per-capability overrides).

Visualize + Animator merge:
- Visualize's AnalysisAgent now picks one of six render_types:
  svg / chartjs / mermaid / html (text pipeline) or manim_video /
  manim_image (Manim subprocess). The result envelope carries
  render_type so the frontend delegates to the right viewer.
- math_animator capability is folded behind Visualize; the standalone
  MathAnimatorConfigPanel.tsx is removed. The Animator sidebar entry
  is gone, but Manim outputs and existing records remain unaffected.

Settings UI:
- /settings page split into appearance / capabilities / embedding /
  llm / mcp / memory / search / status / tools tabs with a shared
  layout and items index.
- New /settings/tools page lists chat-mountable tools and surfaces
  availability (e.g. gh for github_query) via a new tools router.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:06:14 +08:00
Bingxi Zhao (Frank)
7bdb10b700 feat(chat): Auto mode router + new chat tools (ask_user, web_fetch, etc.)
Auto capability (agents/auto/) gains a three-stage agent loop:
ANALYZING (one LLM call, streamed as thinking) -> DELEGATING (router
emits delegate_to_<cap> tool calls or atomic tool calls, with bounded
retries and a same-cap quota) -> SYNTHESIZING (final inline answer).
Sub-capability events flow through forward_events with call_id tagging
so conversation history keeps only Auto's own synthesis.

New chat-mountable tools:
- ask_user: pauses the turn for 1-3 structured questions, frontend
  renders a card the user navigates and submits in one batch
- web_fetch: HTTP + readable-content extraction with strict
  scheme/private-IP/size guards (pre-flight + post-redirect)
- write_note: replaces save_to_notebook; append (new record) and
  edit (existing record by id) modes
- list_notebook: read-only index / drill-down listing; only mounted
  when the user has notebooks
- github_query: read-only ``gh`` CLI wrapper (pr/issue/run/repo plus
  GET-only api); no mutation verbs reachable

Updates chat agentic_pipeline.py + agentic_chat.yaml (en/zh) to the
new tool surface and source-inventory contract, refits
tools/builtin/__init__.py as the single place to register
chat-mounted tools and their argument-augmentation wrappers, and
tightens core stream + tool_protocol around tool-result metadata.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:05:15 +08:00
Bingxi Zhao (Frank)
23ca3024be refactor(agents): rebuild Deep Research / Deep Solve / Question on agentic engine
Replaces three bespoke multi-agent pipelines with orchestrators on top
of a shared agentic-engine primitive set (core/agentic/: labeled_step,
loop, tool_dispatch, usage, client). Each capability now lives in one
pipeline.py file with one pipeline.yaml prompt.

- Deep Research: Rephrase (ask_user loop) -> Decompose (OUTLINE) ->
  Research blocks (THINK/TOOL/APPEND/FINISH per topic, dynamic queue
  preserved) -> Reporting (OUTLINE/INTRO/SECTION/CONCLUSION).
  CitationManager and the dynamic topic queue are kept.
- Deep Solve: Pre-retrieve (KB-only, QUERIES/rag/SUMMARY) -> Plan ->
  per-step THINK/TOOL/FINISH/REPLAN loop with back-edge to Plan ->
  Synthesize. Step FINISH text flows into the next step's context.
- Question: coordinator + pipeline replace generator / idea_agent /
  models, with new history.py and mimic_source.py helpers.

Removed: research/agents/, research/research_pipeline.py,
research/prompts/{en,zh}/*.yaml (legacy multi-agent prompts);
solve/agents/, solve/memory/, solve/utils/, main_solver.py,
session_manager.py, tool_runtime.py and old prompts;
question/agents/{generator,idea_agent}.py, example.py, models.py,
old prompts; api/routers/solve.py (capability owns its own routing).

Adds shared agents/_shared/tool_composition.py for cross-pipeline
tool wiring. Updates deep_research/deep_solve/deep_question
capabilities to dispatch through the new pipelines.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:03:44 +08:00
Bingxi Zhao (Frank)
2b7242081f feat(memory): three-layer memory subsystem (L1/L2/L3) with workbench
Replaces the flat single-blob memory page with a structured store:
- L1 captures raw run traces; L2 holds normalized document records;
  L3 holds curated slots per surface (chat, notebook, book, TutorBot).
- New consolidator pipeline (chunker, guards, parse, references, runs,
  modes, line-doc, meta) turns traces into versioned line-oriented
  documents with stable ids and snapshot history.
- Per-user isolation flows through PathService; the store API is
  stateless.

UI ships a dedicated /memory workbench with graph / L1 / L2 / L3 /
resolve subpages, plus a reusable MemorySection embedded where the
legacy panel lived.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:02:32 +08:00
Bingxi Zhao
cade7897f4 Merge pull request #480 from wedone/fix/zulip-upload-and-send
fix(zulip): 修复 Zulip 通道附件上传与消息发送的 BUG,支持 Bot 自动订阅频道
2026-05-15 00:12:08 +08:00
Bingxi Zhao
3a2f169063 Merge pull request #478 from mtsui-cmyk/fix/quiz-textarea-vertical-resize
fix: allow quiz answer textarea vertical resize
2026-05-15 00:11:44 +08:00
WeDone
e8f14054b5 fix(zulip): 优化已订阅频道时的日志级别避免误导性WARNING
问题:Bot已订阅所有频道时,add_subscriptions仍返回
      non-success结果,原代码记录WARNING级别日志造成误导。

修改:
- 根据already_subscribed计算实际订阅情况
- 有新增订阅时记录INFO,无新增时记录INFO提示已订阅
- 非success但全部已订阅时降级为DEBUG日志
- 真正失败时才保持WARNING级别
2026-05-14 16:25:16 +08:00
WeDone
ac06a05e22 fix(zulip): 支持所有mention flags类型修复频道@mention无响应问题
问题:在Zulip频道中@机器人没有反应,私聊正常。
根因:_is_mentioned方法只检查mentioned flag,遗漏了
      wildcard_mentioned、stream_wildcard_mentioned、
      topic_wildcard_mentioned等通配符mention标志。

修改:
- _is_mentioned支持所有四种mention flags
- 增强日志输出便于排查问题
- 补充边界测试用例(flags缺失、非字符串元素等)
2026-05-14 11:37:06 +08:00
iwedo
9f6ebe91ba feat(zulip): 支持Bot自动订阅频道以接收话题中的@mention消息
问题:在Zulip话题中@机器人没有反应,deeptutor容器无日志。
根因:Bot未订阅频道,Zulip服务器不会推送频道消息事件给未订阅的Bot。

主要修改:
- ZulipConfig新增subscribe_streams配置项,支持指定频道名或通配符'*'
- start()中新增_subscribe_to_streams()自动订阅频道
- _subscribe_to_streams()支持异常保护,订阅失败不阻断Bot启动
- 通配符'*'与显式频道名混合使用时合并处理
- _on_message()添加调试日志便于排查
- _bot_full_name属性用于后续@mention内容匹配

测试修复:
- TestDownloadAttachments添加get_media_dir mock解决yaml导入错误
- TestUploadAndSend改用call_args_list筛选上传调用修复KeyError
- 新增TestSubscribeStreams测试类(7个用例)
- 将test_stop_cancels_typing_tasks移至TestStop类
2026-05-14 10:29:44 +08:00
WeDone
33aeab41a3 test(zulip): 添加附件上传与发送修复的单元测试
修复现有 test_upload_uses_call_endpoint 测试(使用临时文件替代不存在的路径),新增测试覆盖:- _resolve_media_path: 本地路径直返、Zulip 路径缓存查找、Zulip 路径下载、完整 URL 解析、无效路径返回 None- _upload_and_send: 传递文件对象而非字符串、无法解析路径时跳过- send 元数据补全: 从 _recipient_map 补全缺失路由信息、已有元数据不被覆盖- send _tool_hint 过滤: tool_hint 消息被跳过、普通 progress 消息正常发送
2026-05-14 10:29:44 +08:00
WeDone
b46bdebe1b fix(zulip): 过滤 _tool_hint 进度消息避免重复发送
LLM 调用 message 工具时,agent loop 会先发送一条 _tool_hint 进度消息,然后 MessageTool 才发送真正的消息。配置中 send_tool_hints 默认为 False,但 _outbound_router 未检查该标志,导致 Zulip 通道将工具提示当作普通消息发送,产生重复且格式错误的文本。修复:在 send() 入口处过滤 _tool_hint 消息,直接返回不发送。
2026-05-14 10:29:44 +08:00
WeDone
4bab3a3483 fix(zulip): 用 _recipient_map 补全缺失的路由元数据,修复附件发送报错 Message must have recipients
MessageTool 创建的 OutboundMessage 只包含 message_id,缺少 msg_type/stream/topic/recipient_user_id 等 Zulip 路由字段,导致 _build_send_request 生成空收件人列表。

_recipient_map 在收到消息时已存储了完整的路由元数据,但从未被用于补全发送消息的元数据。

修复:在 send() 中,当 metadata 缺少 msg_type 时,从 _recipient_map 查找对应 chat_id 的路由信息并合并,确保发送消息时始终有正确的收件人。
2026-05-14 10:29:44 +08:00
WeDone
679ba6f36a fix(zulip): 修复附件重发时 Zulip 上传路径被当作本地文件路径
LLM 回复时可能使用消息内容中的 Zulip 上传路径(如 /user_uploads/...)
作为 media 参数,而非本地已下载的文件路径,导致 open() 报错 No such file or directory。

添加 _resolve_media_path 方法,在上传前将 Zulip 路径解析为本地文件:
- 本地路径直接存在则原样返回
- Zulip 上传路径(/user_uploads/...)或完整 URL 先查找已下载的本地副本
- 若本地不存在则从 Zulip 服务器重新下载
- 无法解析时记录错误并跳过
2026-05-14 10:29:44 +08:00
WeDone
6a4398f48e fix(zulip): 修复附件上传报错 'str' object has no attribute 'name'
Zulip Python 客户端的 call_endpoint 方法期望 files 参数接收文件对象列表(有 .name 属性),但代码错误地传入了文件路径字符串列表,导致附件上传时触发 AttributeError。

修复方案:在调用 call_endpoint 前使用 open() 打开文件,传递文件对象给 Zulip 客户端,确保 with 语句在使用完毕后正确关闭文件。

Closes #附件上传失败问题
2026-05-14 10:29:43 +08:00
Bingxi Zhao (Frank)
1596807242 refactor chat capability & RAG pipeline(llamaindex) 2026-05-13 21:36:07 +08:00
Bingxi Zhao
c7688fd268 Merge pull request #443 from wedone/feat/delete-chat-turn
feat: add delete chat turn functionality with attachment cleanup
2026-05-12 19:14:11 +08:00
Bingxi Zhao (Frank)
b5fcbfe6a8 fix(session-api): use apiFetch in deleteMessage for multi-user auth
deleteMessage was the one remaining raw fetch() call in session-api.ts.
After PR #474 wired multi-user auth through apiFetch (which attaches the
JWT bearer token from local storage / cookies), this call would fail with
401 Unauthorized in multi-user mode.

Switch to apiFetch to match the convention established for every other
authenticated session call in this file.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 18:54:35 +08:00
WeDone
ee9483b0d5 style: fix pre-commit issues (ruff-format, prettier, bandit nosec) 2026-05-12 16:51:22 +08:00
WeDone
1c8860291d fix: check was_running before deleted to return 409 instead of 404 2026-05-12 16:51:22 +08:00
WeDone
e35fbd41b7 fix: resolve code review blockers - was_running check before deletion and temp ID resolution 2026-05-12 16:51:22 +08:00
WeDone
45ef593684 feat: add deleteMessage API and DELETE_TURN reducer action 2026-05-12 16:51:22 +08:00
WeDone
a68591b7e3 feat: 扩展 MessageItem 数据结构,增加 id 字段支持删除会话问答 2026-05-12 16:50:46 +08:00
Bingxi Zhao
6168a8bc29 Merge pull request #474 from wedone/fix/mu-data
fix: 系统性修复多用户数据隔离问题
2026-05-12 16:47:18 +08:00