Commit Graph

1877 Commits

Author SHA1 Message Date
pewdiepie-archdaemon 402a2771b3 Persist upload OCR captions in gallery 2026-06-29 01:45:05 +00:00
pewdiepie-archdaemon 3b6d771be9 Restore chat thumbnails and gallery OCR captions 2026-06-29 01:19:50 +00:00
pewdiepie-archdaemon 4d90eb3d44 Show overlays during bulk email delete 2026-06-28 23:42:53 +00:00
pewdiepie-archdaemon 240768a7a1 Show email delete overlay before request 2026-06-28 22:41:09 +00:00
pewdiepie-archdaemon 1e78ac999d Show busy spinner while deleting email 2026-06-28 22:19:32 +00:00
pewdiepie-archdaemon 4143bfaa2a Clear stale chat stream indicators 2026-06-28 22:06:20 +00:00
pewdiepie-archdaemon c0a68acfc8 Guard document style against persona guessing 2026-06-28 21:49:09 +00:00
Alexandre Teixeira 893e490cdc test: split provider endpoint tests (#4961) 2026-06-28 19:05:38 +02:00
Alexandre Teixeira bad9ec2f9c test: localize calendar recurrence helper import (#4944)
* test: localize calendar recurrence helper import

* test: share calendar route import helper
2026-06-28 19:04:15 +02:00
michaelxer bfeea7f463 fix(docs): correct broken backup-restore link in setup.md
Fixes #4926 - the link used docs/backup-restore.md from within docs/setup.md, which resolved to docs/docs/backup-restore.md (404). Changed to same-directory relative path.
2026-06-28 21:50:42 +07:00
nikakhalatiani 927b1f7ecf fix(llm): normalize OpenAI-compatible chat URLs
Normalize OpenAI-compatible chat URL shapes so base /v1 endpoints route to /v1/chat/completions while already-full chat endpoints remain idempotent.

Preserve native local Ollama routing for bare localhost:11434 endpoints, keep localhost:11434/v1 as OpenAI-compatible, and add focused regression coverage for provider detection, chat target URLs, and model listing from /v1.

Part of #541.
2026-06-28 15:30:15 +01:00
pewdiepie-archdaemon 6b617f9cad Move email writing style into AI settings 2026-06-28 14:27:52 +00:00
pewdiepie-archdaemon 7094c8e285 Merge dev into main for testing 2026-06-28 14:07:23 +00:00
Tal.Yuan bb2148db73 refactor(routes): move research domain into routes/research/ subpackage
Move the research route domain into the canonical routes/research/ subpackage while preserving the legacy routes.research_routes import path through a sys.modules compatibility shim.

The moved canonical module is behavior-preserving, app wiring now imports the canonical route setup function, source-introspection tests point at the new canonical path, and shim regression coverage pins legacy/canonical same-object behavior plus string-targeted monkeypatch reach-through.

Refs #4082.
Refs #4071.
2026-06-28 14:34:11 +01:00
Michael e018c7cf6c fix(cookbook): accept $(find) subshells in serve command validation
Allow the generated Cookbook mmproj lookup command substitution while keeping serve-command validation constrained to explicit safe subshell patterns.

Preserves the existing safe printf substitution, allowlists the generated find/sort/head mmproj lookup shape, and adds negative regression coverage for unrelated substitutions and pipelines.

Fixes #4772.
2026-06-28 14:00:49 +01:00
pewdiepie-archdaemon 613a4c059a Close notes when opening documents 2026-06-28 12:58:01 +00:00
pewdiepie-archdaemon 2cf7f24afc Keep PDF annotation controls hoverable 2026-06-28 11:26:45 +00:00
pewdiepie-archdaemon 7fa3414308 Fix expanded email attachment chip layout 2026-06-28 11:14:06 +00:00
pewdiepie-archdaemon 55661b8925 Fix failed task activity colors 2026-06-28 11:04:26 +00:00
nopoz a7fc1343a3 fix(security): prevent ReDoS in verdict-prose and continuation matchers (#4943)
Two py/polynomial-redos sinks ran regexes with two adjacent \s-matching
quantifiers over untrusted model text, backtracking O(n^2) when the tail failed
on a whitespace flood:

  - routes/skills_routes.py: the last-resort verdict-from-prose extractor used
    `["\'\s:]*\s*` — the class already matches \s, so the trailing \s* was a
    redundant second quantifier. Dropped it (extracted to a documented module
    constant _VERDICT_PROSE_RE); the matched text is identical, the scan linear.
  - src/agent_loop.py _EXPLICIT_CONTINUATION_RE: `\s*[.!?]*\s*$` put two \s*
    around `[.!?]*`. Rewrote as `\s*(?:[.!?]+\s*)?$` — same accepted tails (no
    two \s* adjacent), linear. Portable form (no possessive quantifiers).

Both verified output-equivalent to the originals across a fuzz corpus. Adds
tests/test_redos_verdict_continuation.py pinning the unchanged match sets and
bounding the flood inputs (old patterns took seconds at 40k whitespace chars).
2026-06-28 11:42:20 +01:00
red person 827a6b2778 Reject blank ownerless claim owner (#4929) 2026-06-28 10:57:11 +01:00
Tal.Yuan 8066a8e0cd refactor(routes): move gallery domain into routes/gallery subpackage (#4903)
Move the gallery route domain into routes/gallery/ while preserving backward-compatible legacy import shims.

- app imports the canonical gallery route module
- canonical gallery route code imports canonical gallery helpers
- legacy gallery route/helper paths remain compatibility aliases
- add shim regression coverage for module identity and monkeypatch behavior
- repoint gallery source-introspection tests to the canonical paths

No intended behavior change.
2026-06-28 10:40:34 +01:00
pewdiepie-archdaemon 31dbc6bec6 Fix mobile note archive action 2026-06-28 09:11:59 +00:00
pewdiepie-archdaemon e58d9702b7 Avoid model endpoint probes on boot 2026-06-28 08:07:15 +00:00
pewdiepie-archdaemon cbed87e5cb Make added models list cache-only 2026-06-28 07:10:55 +00:00
pewdiepie-archdaemon ac7cf67ab6 Harden added models endpoint rendering 2026-06-28 05:29:25 +00:00
pewdiepie-archdaemon 3aa48e9025 Persist OCR captions in gallery 2026-06-28 04:50:20 +00:00
pewdiepie-archdaemon a6903931f7 Reset mobile serve memory offsets 2026-06-28 01:05:08 +00:00
Rudra Sarker 5b8bfdabab fix(chat): sanitize web search query to strip markdown and code blocks (#4863)
Layer a defensive cleanup on top of the generated-query web-search flow so the final selected query is sanitized before reaching comprehensive_web_search.

- remove fenced code blocks from the final search query
- preserve inline code as plain text
- collapse whitespace and cap query length
- cover generated-query success plus LLM failure/empty fallback paths

Partially addresses #4547.
2026-06-28 01:23:08 +01:00
tanmayraut45 ff0f1b3450 fix(mcp): retain builtin startup tasks and reap npx probe
Keep strong references to builtin MCP startup tasks until completion and kill/reap the npx probe subprocess when cancellation interrupts the probe. Includes focused regression coverage for both lifecycle paths.
2026-06-28 01:18:17 +01:00
Pedro Barbosa 9782e5bc94 fix(cookbook): load user-site pth hooks for runtime installs
Replay user-site .pth hooks when checking cookbook runtime dependencies so packages installed with --user are visible to dependency completion. Includes focused regression coverage.
2026-06-28 01:01:44 +01:00
pewdiepie-archdaemon a32c3f26ab Adjust vllm preset and offsets 2026-06-27 23:57:44 +00:00
pewdiepie-archdaemon 63c07c2188 Set vllm env preset width 2026-06-27 23:54:46 +00:00
pewdiepie-archdaemon 36ba856607 Fine tune vllm advanced offsets 2026-06-27 23:54:01 +00:00
pewdiepie-archdaemon 6bba539d65 Move vllm swap control left 2026-06-27 23:49:05 +00:00
tanmayraut45 c01c09559a fix(ai): offload model resolution from async paths
Wrap blocking _resolve_model calls in asyncio.to_thread across async model interaction paths so endpoint/model resolution does not stall the event loop. Preserve owner-scoped resolution and add focused regression coverage.
2026-06-28 00:48:35 +01:00
pewdiepie-archdaemon c95bbd6992 Nudge serve engine control up 2026-06-27 23:48:21 +00:00
pewdiepie-archdaemon ded57e5740 Align serve backend controls 2026-06-27 23:42:11 +00:00
pewdiepie-archdaemon 0d84441c1c Lower cookbook engine filter button 2026-06-27 23:38:37 +00:00
pewdiepie-archdaemon 496544b487 Clarify diffusers image editing support 2026-06-27 23:28:01 +00:00
pewdiepie-archdaemon de4c338423 Lower serve preset buttons slightly 2026-06-27 23:13:09 +00:00
hestiaOS 8b110c28e6 fix(tasks): keep scheduled-task prompt cache stable
Move scheduled-task current-time context out of the system prompt and into a user-role context message so the system prompt remains stable for prompt caching. Preserve time grounding on both the agent-loop path and fallback direct-call path, with focused regression coverage.
2026-06-28 00:05:02 +01:00
pewdiepie-archdaemon 36898fba0d Move serve preset row up 2026-06-27 22:55:03 +00:00
pewdiepie-archdaemon 2ef44e4bd9 Move vllm block size left 2026-06-27 22:54:00 +00:00
pewdiepie-archdaemon c114e7652a Move vllm advanced fields closer 2026-06-27 22:52:57 +00:00
Alexandre Teixeira 259662e914 test: split endpoint resolver tests (#4957) 2026-06-28 00:49:43 +02:00
pewdiepie-archdaemon 5f7de831f9 Nudge serve GPU selector left 2026-06-27 22:43:33 +00:00
nopoz fbe3a0d73b fix(security): prevent ReDoS in XML and args tool-call parsers (#4941)
* fix(security): prevent ReDoS in XML and args tool-call parsers

Four py/polynomial-redos sinks in tool_parsing.py ran lazy/greedy regexes over
untrusted model output (tool-call markup is attacker-influenced via prompt
injection). When the closing delimiter was absent, each rescanned to
end-of-string from every opener -> O(n^2):

  - args => { ... } in _parse_tool_call_block: greedy \{([\s\S]*)\} restarted
    from every `args:{` opener. Now finds the opener once and takes through the
    last `}` (rfind) — equivalent capture, O(n).
  - _XML_INVOKE_RE: lazy <invoke ...>([\s\S]*?)</invoke>. Now _iter_xml_invoke
    pairs each opener with the first reachable </invoke> and stops when none is.
  - _XML_DIRECT_TOOL_RE and the <tag>([\s\S]*?)</\1> param scan in
    _parse_tool_code_block: lazy backreference patterns. Now _iter_backref_blocks
    pairs each opener with the nearest matching closer and memoizes tag names
    with no remaining closer, so an opener flood stays O(n).

All four are output-equivalent to the originals on well-formed tool-call markup;
the lazy patterns remain defined (still re-exported via agent_tools) but no
longer drive a finditer over untrusted text. Adds tests/test_redos_xml_tool_parsers.py
pinning correctness and bounding the opener-flood inputs (old paths took 4-15s).

* fix(security): harden invoke-parameter and distinct-name tag scans

Forward-only the two residual ReDoS paths in the XML/tool parsers that the
outer-delimiter fix left quadratic:

- _parse_xml_invoke parsed <parameter> with _XML_PARAM_RE.finditer, so a
  closed <invoke> body full of unclosed <parameter> openers rescanned the
  body from every opener (O(n^2), ~11s at 8k openers). Now scans forward-only
  via _iter_named_blocks, factored out of _iter_xml_invoke.
- _iter_backref_blocks only memoized repeated missing tag names; a flood of
  distinct unclosed names searched the suffix once per name (O(n^2)). It now
  indexes every closer by name in one linear pass and binary-searches per
  opener (O(n log n)). Covers the direct and tool_code backref scans.

Output-equivalent to the prior scanners (200k randomized trials match the
memoized version for both the direct ci=True and tool_code ci=False configs).
Adds regressions for the closed-invoke parameter flood and the distinct-name
floods (45k openers now run in ~0.05s, were 5-6s).
2026-06-27 15:42:55 -07:00
pewdiepie-archdaemon d1ad95c09a Set cookbook GPU buttons to 30px 2026-06-27 22:38:02 +00:00
pewdiepie-archdaemon a5eea9c093 Toggle manual hardware edit button 2026-06-27 22:35:50 +00:00