Commit Graph

527 Commits

Author SHA1 Message Date
nesquena-hermes
2efc1fb8e8 chore: CHANGELOG + v0.50.64 badge + Today-bucket test (post-merge follow-up for #584)
Admin merge — docs-only follow-up: CHANGELOG entry, version badge v0.50.64, one new test. No code logic. Nathan authorized end-to-end merge in session.
2026-04-16 10:09:51 -07:00
Aron Prins
a9a22ee751 fix(sidebar): declutter session items — drop message count, model, and source-tag badges (v0.50.64)
Squash-merges PR #584 by @aronprins.

Drops the meta row (message count, model slug, source-tag badge) from every sidebar session item. Each session now renders as a single title line — visible session count roughly doubles at typical viewport height.

Changes merged verbatim from contributor branch, plus maintainer additions:
- CHANGELOG entry for v0.50.64
- Version badge bump to v0.50.64
- New test: test_relative_time_today_bucket (closes minor coverage gap from code review)

Co-authored-by: aronprins <aronprins@users.noreply.github.com>
2026-04-16 09:58:53 -07:00
nesquena-hermes
a512f2020e feat: MCP toolsets in WebUI + onboarding fix for non-standard providers — v0.50.63
Squash-merges PR #578 (rebased from #574 by @renheqiang + #575 by @nesquena-hermes). MCP server toolsets now included in WebUI sessions; onboarding wizard no longer fires for non-standard providers. 1331 tests pass. Nathan override applied for self-built #575.
2026-04-15 23:39:07 -07:00
nesquena-hermes
45426bdcd1 fix: make hermes-agent source optional in Docker startup — v0.50.62
Squash-merges PR #577 (rebased from #573 by @nesquena). Docker hard-exit on missing hermes-agent → graceful warning. 1319 tests pass. Fixes #570.
2026-04-15 23:22:26 -07:00
nesquena-hermes
360379136b feat(upload): support Excel and Word file attachments — v0.50.61
Squash-merges PR #571 (rebased from contributor PR #566 by @renheqiang). Adds .xls/.xlsx/.doc/.docx to the file picker and MIME map. 1319 tests pass.
2026-04-15 22:43:31 -07:00
nesquena-hermes
e4fec9e4e0 test: skip onboarding config tests when PyYAML unavailable, remove duplicate definition — v0.50.60
Merges #564. Adds PyYAML skip guards to two onboarding tests. Removes duplicate _HAS_YAML/_needs_yaml block. No production code changed. 1319 tests pass.
2026-04-15 20:45:42 -07:00
nesquena-hermes
8cf10b152b fix: false Connection lost message after settled stream disconnect — v0.50.59
* fix: 避免流结束后误插入 Connection lost 错误

* chore: bump version to v0.50.59, update CHANGELOG

---------

Co-authored-by: fiver <fiver@example.com>
Co-authored-by: Hermes Agent <agent@hermes>
2026-04-15 20:25:31 -07:00
nesquena-hermes
07c25f0766 fix(models): show named custom provider label in model dropdown — v0.50.58
fix(models): show named custom provider label in model dropdown — v0.50.58
2026-04-15 18:32:36 -07:00
Hermes Agent
4f79b3f941 chore: bump version to v0.50.58, update CHANGELOG 2026-04-16 01:32:15 +00:00
Hermes Agent
54d0ee5f6c fix(models): show named custom provider label in model dropdown instead of generic 'Custom' — PR #558
Named custom_providers entries (those with a 'name' field) now get their own
dropdown group using the configured name (e.g. 'Agent37') instead of the
generic 'Custom' label. Unnamed entries still fall back to 'Custom'.

Closes #557.
2026-04-16 01:31:04 +00:00
Hermes Agent
3e1ba1b783 fix(models): show named custom provider label in model dropdown instead of generic 'Custom'
When a custom_providers entry in config.yaml has a 'name' field (e.g. 'Agent37'),
the web UI model picker now uses that name as the group header instead of the
generic 'Custom' label.

Previously all custom_providers entries were bucketed under 'custom' which
rendered as 'Custom' in the dropdown optgroup — losing the named identity the
user set up during onboarding.

Changes:
- Track named custom providers as 'custom:<slug>' keys internally so multiple
  named providers can coexist as separate groups
- When building model groups, emit each named provider under its own display
  name (e.g. 'Agent37') rather than falling through to the generic label
- Unnamed entries (no 'name' field) still fall back to the 'Custom' group
- When all entries are named, the bare 'Custom' bucket is suppressed

Adds 7 tests covering single named provider, multiple named providers,
multiple models in same named provider, unnamed fallback, and mixed cases.

Fixes #557
2026-04-16 01:09:39 +00:00
nesquena-hermes
0a9b952d4c feat(sessions): auto-summarize session titles after first exchange (fixes #495) — v0.50.57
feat(sessions): auto-summarize session titles after first exchange (fixes #495) — v0.50.57
2026-04-15 17:07:28 -07:00
Hermes Agent
8864001941 chore: bump version to v0.50.57, update CHANGELOG 2026-04-16 00:07:08 +00:00
Hermes Agent
7e8ed4afff feat(sessions): auto-summarize session titles after first exchange (fixes #495) — PR #535
After the first user/assistant exchange, generates a concise session title
in a background daemon thread using the first user message + first visible
assistant reply as input. Title updates live in the UI via a new 'title' SSE event.
The stream now terminates with 'stream_end' instead of 'done' so the title
generation thread has time to finish before the client disconnects.

Provisional titles (first-message substrings) are replaced; manual renames
are preserved; generation only runs once per session (llm_title_generated flag).
Includes MiniMax token budget handling and a local heuristic fallback.

Additional fixes applied in agent review:
- messages.js: fix JS syntax error (mismatched quote in setComposerStatus)
- messages.js: fix broken template literal in error hint rendering
- messages.js: restore approval queue multi-slot fix (approval_id, pendingCount,
  _approvalCurrentId) that was accidentally removed
- api/streaming.py: fix MiniMax thinking delimiter regex (<|channel|>)
- tests/test_issue487b.py: fix DeprecationWarning (raw string docstring)

Co-authored-by: franksong2702 <franksong2702@users.noreply.github.com>
2026-04-16 00:05:53 +00:00
Hermes Agent
215f7eff4d fix(review): 4 issues found in agent review of PR #535
BUG-1 (CRITICAL): messages.js line 522 — mismatched quote in
setComposerStatus('Reconnecting…') caused JS syntax error on the
reconnect path.

BUG-2 (HIGH): messages.js line 491 — broken template literal
'\\n\\n*{d.hint}*' restored to '\n\n*${d.hint}*'. Error hint
text was non-functional (missing $ prefix and escaped newlines).

BUG-3 (HIGH): messages.js — showApprovalCard(pending, pendingCount),
_approvalCurrentId, and approval_id in respondApproval() were removed,
regressing the simultaneous approval queue fix from PR #546. Restored
all three, including the '1 of N pending' counter and poll passthrough.

BUG-4 (LOW): api/streaming.py — MiniMax thinking delimiter regex
missing closing pipe: <|channel> -> <|channel|> in both
_strip_thinking_markup() and _looks_invalid_generated_title().

ALSO: test_issue487b.py docstring changed to raw string to fix
DeprecationWarning for invalid escape sequence '\s'.
2026-04-16 00:00:22 +00:00
franksong2702
a4ce9ccc99 fix(messages): keep inflight tool-call regression intact 2026-04-15 23:59:36 +00:00
Frank Song
8ff3fd9442 feat(sessions): auto-summarize provisional session titles 2026-04-15 23:59:36 +00:00
nesquena-hermes
53ce8a107b fix: version badge v0.50.55, CHANGELOG entry, QA innerHTML allowlist
fix: version badge v0.50.55, CHANGELOG entry, QA innerHTML allowlist
2026-04-15 16:40:50 -07:00
Hermes Agent
ec44a437a2 fix: version badge v0.50.54→v0.50.55, add CHANGELOG entry for v0.50.55
The v0.50.55 release (Docker honcho fix) missed the index.html version
badge bump and CHANGELOG entry. Caught during post-session QA sweep.
2026-04-15 23:40:11 +00:00
nesquena-hermes
400b1721d7 fix: install hermes-agent[honcho] extra in Docker init (fixes #553)
fix: install hermes-agent[honcho] extra in Docker init (fixes #553)
2026-04-15 16:22:34 -07:00
Hermes Agent
fbce1093b9 fix: install hermes-agent[honcho] extra in Docker init (fixes #553)
docker_init.bash was installing hermes-agent without the [honcho] optional
extra, causing honcho-ai to be missing from /app/venv. All Honcho memory
tools would fail with 'Honcho session could not be initialized' on every
fresh Docker build.

Adds [honcho] to the uv pip install invocation on line 238.
2026-04-15 23:22:20 +00:00
nesquena-hermes
c0bffa15f1 chore: update OpenRouter and provider model lists — v0.50.54
chore: update OpenRouter and provider model lists — v0.50.54
2026-04-15 16:04:20 -07:00
Hermes Agent
27d3f9543e chore: bump version to v0.50.54, update CHANGELOG 2026-04-15 23:04:06 +00:00
Hermes Agent
51767f9d90 chore: update OpenRouter and provider model lists — PR #551
OpenRouter dropdown updated to 14 current models across 7 providers.
All slugs verified against live OpenRouter catalog.

Removed: o4-mini, claude-sonnet-4-5 (temporarily, re-added), gemini-2.5-pro,
         gemini-2.0-flash, llama-4-scout, llama-4-maverick.
Added:   gpt-5.4, claude-opus-4.6, claude-sonnet-4-5, gemini-3.1-pro-preview,
         gemini-3-flash-preview, deepseek-r1, qwen3-coder, qwen3.6-plus,
         grok-4.20, mistral-large-latest.
Fixed:   gemini slug -preview suffix, grok-4-20 -> grok-4.20 (dot not dash),
         stale Nous label, mistralai/qwen/x-ai added to PROVIDER_MODELS/DISPLAY.
2026-04-15 23:03:13 +00:00
Hermes Agent
9d4c075e2b fix: correct OpenRouter model slugs from live catalog verification
- google/gemini-3.1-pro -> google/gemini-3.1-pro-preview (not GA yet)
- google/gemini-3-flash -> google/gemini-3-flash-preview (not GA yet)
- x-ai/grok-4-20 -> x-ai/grok-4.20 (dot not dash in slug)
- Fix stale label: 'Gemini 2.5 Pro (via Nous)' -> 'Gemini 3.1 Pro Preview (via Nous)'
2026-04-15 23:00:29 +00:00
Hermes Agent
f5c4e110a4 chore: add Qwen3 Coder, Qwen3.6 Plus, Grok 4.20; drop Llama
- Remove llama-4-scout and llama-4-maverick
- Add qwen/qwen3-coder, qwen/qwen3.6-plus, x-ai/grok-4-20
- Add qwen and x-ai to _PROVIDER_MODELS and _PROVIDER_DISPLAY
2026-04-15 22:54:18 +00:00
Hermes Agent
4c142da3f6 chore: expand OpenRouter list per feedback — Claude 4.5 gen, Opus, R1, Maverick, Mistral
OpenRouter / _FALLBACK_MODELS (7 → 13 models):
- Add gpt-5.4 (full OpenAI alongside Mini)
- Restore claude-sonnet-4-5 (keep 4.5 generation alongside 4.6)
- Add claude-opus-4.6 (flagship)
- Add deepseek-r1 (popular reasoning model)
- Add llama-4-maverick (larger open-weight option)
- Add mistral-large-latest (Mistral via OpenRouter)

Structural:
- Add mistralai to _PROVIDER_MODELS for correct prefix-stripping routing
- Add mistralai to _PROVIDER_DISPLAY for correct group label
2026-04-15 22:27:55 +00:00
Hermes Agent
3b53b3f4f6 chore: update OpenRouter and provider model lists
OpenRouter / _FALLBACK_MODELS (8 → 7 models):
- Remove o4-mini (reasoning specialist, not a general-purpose pick)
- Remove claude-sonnet-4-5 (superseded by 4.6)
- Add gemini-3-flash as fast/cheap Google option
- Update gemini-2.5-pro → gemini-3.1-pro (current flagship)
- Better provider labels (Google, DeepSeek, Meta instead of 'Other')

Direct-API providers:
- openai: replace o4-mini with gpt-5.4 (general-purpose pairing with Mini)
- google / gemini: gemini-2.5-pro → 3.1-pro, gemini-2.0-flash → 3-flash
- Copilot, Nous, opencode-zen: same Gemini updates throughout

Test: update test_fallback_still_has_o4_mini → test_fallback_has_gpt54
2026-04-15 22:20:25 +00:00
nesquena-hermes
69effc7b22 fix: preserve slash model IDs for custom endpoints (fixes #548) — v0.50.53
fix: preserve slash model IDs for custom endpoints (fixes #548) — v0.50.53
2026-04-15 15:13:23 -07:00
Hermes Agent
7bfba201da chore: bump version to v0.50.53, update CHANGELOG 2026-04-15 22:13:14 +00:00
Hermes Agent
dc2334c5a3 fix(review): use _PROVIDER_MODELS check instead of custom-only guard
The original fix preserved full IDs only when config_provider == 'custom',
which broke existing tests expecting prefix-stripping for known namespaces
like 'openai/' and 'google/'.

The correct heuristic: strip the prefix only when it is a known provider
namespace (i.e. prefix in _PROVIDER_MODELS — 'openai', 'google', 'anthropic',
etc.). Unknown prefixes like 'zai-org' are intrinsic to the model ID and must
be preserved. This satisfies both the DeepInfra use case (#548) and the
existing #433 regression tests.
2026-04-15 22:11:15 +00:00
eba8
bd55379886 fix: preserve slash model IDs for custom endpoints 2026-04-15 20:06:34 +00:00
nesquena-hermes
392c315d4b fix: queue simultaneous approval requests per session (fixes #527) — v0.50.52
fix: queue simultaneous approval requests per session (fixes #527) — v0.50.52
2026-04-15 12:42:32 -07:00
Hermes Agent
25fae902d3 chore: bump version to v0.50.52, update CHANGELOG 2026-04-15 19:42:11 +00:00
Hermes Agent
d6b58b9ce0 fix: queue simultaneous approval requests per session (fixes #527)
Changes _pending from a single overwriting dict value to a list,
so parallel tool calls each get their own approval slot.

api/routes.py:
- Wraps submit_pending() to append to a list and assign a stable
  approval_id (uuid4) to each entry.
- _handle_approval_pending() returns the first queued entry plus
  pending_count so the UI can show '1 of N'.
- _handle_approval_respond() pops by approval_id (falls back to
  oldest entry for backward-compat with old clients).
- Backward-compat: legacy single-dict values in _pending are
  handled without crashing.

static/messages.js:
- respondApproval() sends approval_id in the POST body.
- showApprovalCard() accepts pendingCount, shows '1 of N pending'
  counter when multiple approvals are queued.
- _approvalCurrentId tracks the approval_id of the displayed card.
- Poll loop passes pending_count to showApprovalCard.

static/index.html:
- Adds approvalCounter element for the '1 of N' display.

tests/test_approval_queue.py:
- 14 tests: static-analysis checks (Python + JS + HTML),
  functional tests that inject two simultaneous approvals and
  verify both are surfaced and independently resolvable.
2026-04-15 19:16:14 +00:00
nesquena-hermes
ac839e0d01 fix: strip orphaned tool messages before API calls (fixes #534) — v0.50.51
fix: strip orphaned tool messages before API calls (fixes #534) — v0.50.51
2026-04-15 12:07:09 -07:00
Hermes Agent
ce4e01ea92 chore: bump version to v0.50.51, update CHANGELOG 2026-04-15 19:06:54 +00:00
Hermes Agent
4f7db62c58 fix: strip orphaned tool messages before API calls (fixes #534) — PR #542 2026-04-15 19:06:02 +00:00
nesquena-hermes
3033fb65e3 fix(themes): swap Prism syntax-highlighting theme on light/dark switch (#505) — v0.50.50
fix(themes): swap Prism syntax-highlighting theme on light/dark switch (#505) — PR #530
2026-04-15 12:05:12 -07:00
Hermes Agent
03df7132d0 chore: bump version to v0.50.50, update CHANGELOG 2026-04-15 19:02:43 +00:00
armorbreak001
50d7d1cf88 fix(themes): swap Prism syntax-highlighting theme on light/dark switch
The Prism CSS was hardcoded to prism-tomorrow (dark-only), so code
blocks stayed dark even when switching to Light or other non-dark themes.

- Add id='prism-theme' to the <link> element for runtime lookup
- In _applyTheme(), swap href between prism-tomorrow (dark) and
  prism (light) based on resolved theme
- Skips DOM write when the target href is already active

Fixes #505
2026-04-15 19:01:52 +00:00
nesquena-hermes
e4688425ab fix: respect IME composition in all Enter submit flows (#531) — v0.50.49
fix: respect IME composition in all Enter submit flows (#531) — PR #537
2026-04-15 11:58:31 -07:00
Hermes Agent
9220a876bc fix: strip orphaned tool messages before sending history to API (fixes #534)
Extends _sanitize_messages_for_api() with a two-pass approach:
1. Collect all tool_call_ids declared in assistant messages (handles
   both OpenAI 'id' and Anthropic 'call_id' field names).
2. Drop any tool-role messages whose tool_call_id was not declared
   by a preceding assistant message.

Strictly-conformant providers (Mercury-2/Inception, newer OpenAI
models) reject histories with orphaned tool results with a 400 error:
'Message has tool role, but there was no previous assistant message
with a tool call.' This can happen when histories are edited, when
switching between providers, or when partial messages are stored.

Adds 13 regression tests covering: valid roundtrip preservation,
multiple tool calls, partial orphan filtering, Anthropic call_id,
edge cases (None tool_calls, missing tool_call_id, non-dict entries).
2026-04-15 16:57:31 +00:00
Hermes Agent
e077d110c3 chore: bump version to v0.50.49, update CHANGELOG 2026-04-15 16:46:53 +00:00
Hermes Agent
8f7bee7b34 fix: respect IME composition in all Enter submit flows — PR #537
Adds isComposing guards to every Enter keydown handler so CJK/IME
users are never sent mid-composition (fixes issue #531):
- boot.js: chat composer + command dropdown Enter handler
- sessions.js: session rename, project create/rename Enter handlers
- ui.js: app dialog, message edit Enter-to-save, workspace rename

Ships 3 new regression tests (test_ime_composition.py).

Co-authored-by: vansour <vansour@users.noreply.github.com>
2026-04-15 16:45:52 +00:00
vansour
dc43a30af7 test: loosen IME guard regression assertions 2026-04-15 23:21:56 +08:00
vansour
74dee6b665 fix: respect IME composition in Enter submit flows 2026-04-15 23:12:47 +08:00
nesquena-hermes
96c4102aa7 fix: toast when model switched during active session (#419) — PR #529 2026-04-15 08:05:19 +00:00
Hermes Agent
d3251fdbfd chore: bump version to v0.50.48, update CHANGELOG 2026-04-15 08:04:24 +00:00
Hermes Agent
31196d42af fix: show toast when model is switched during active session (#419)
When a user switches the model via the model picker while a session has
existing messages, a toast now informs them: 'Model change takes effect
in your next conversation'. This prevents confusion when the model
dropdown updates visually but the running conversation continues with
the original model.

Implementation: 4-line addition in modelSelect.onchange in boot.js,
after the existing provider-mismatch warning. Checks S.messages.length
(the reliable in-memory array) and guards showToast with typeof.

Synthesized from PRs #516 (armorbreak001), #517 and #518 (cloudyun888).
Placement follows #518's correct boot.js approach. Reference corrected
from S.session.messages to S.messages (always initialized by loadSession).

4 new tests in test_provider_mismatch.py::TestModelSwitchToast.

Co-authored-by: armorbreak001 <armorbreak001@users.noreply.github.com>
Co-authored-by: cloudyun888 <cloudyun888@users.noreply.github.com>
2026-04-15 08:04:03 +00:00