Commit Graph
12 Commits
Author SHA1 Message Date
MelekiandClaude Opus 4.8 a58f279eaa Add effort badge to chain summary
Snapshot the agent's effort onto the chain (like model) so it survives
reload, archive and shared chains, then show it in the chain-end meta line.

- ChainRecord.Effort + chains.effort column (TryAddColumn migration).
- CreateChain INSERT carries the value.
- ChatService snapshots agent.Effort at chain creation, but only for Claude
  models – OpenAI providers store '' so there is no misleading badge.
- Anthropic streaming + CLI done-events include effort for the live path.
- chat.js buildMetaBadges renders "Effort: <level>" after the model badge,
  only when a value is set.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 22:08:44 +02:00
MelekiandClaude Opus 4.7 3f913f14b5 Add per-agent reasoning effort
Opus 4.5+ and Sonnet 4.6+ support a new "effort" knob that controls how
much budget the model spends on thinking and tool calls. Plumb it through
end to end so each agent can pick its own level.

Storage & shape:
- New TEXT column agents.effort (default '') added via TryAddColumn.
- AgentRecord.Effort + INSERT/UPDATE in DatabaseService.Agents.cs.
- ChatContext.Effort + SubAgentContext.Effort so the value travels with the
  request alongside model and tool settings.

Agent editor:
- Effort dropdown above git-commit behavior in the agent form (low/medium/
  high/xhigh/max plus empty = "use default"). Always visible; on OpenAI
  providers the value is sent but silently ignored.
- agent-page.js load/save and AgentEndpoint create/update wired up.

Anthropic API path:
- StreamChat and RunNonStreamingToolLoop add output_config: { effort } when
  effort is set and not "high" – empty/null/"high" means "omit and let the
  API pick its default".
- Sub-agents (preparer/review/finalizer) get the parameter through
  RunAgentChat so each step uses its own agent's effort.

Anthropic CLI path:
- ClaudeCliService.ChatStreamingAsync takes an effort parameter and exports
  CLAUDE_CODE_EFFORT_LEVEL on the spawned process. Env-var beats the
  --effort flag because it also covers "max" and "ultracode".
- StreamChatViaCli, ChatNonStreamingViaCli, RunSubAgentViaCli, and the
  ChatEndpoint anthropic branches all hand the value through.

ARCHITECTURE.md / ARCHITECTURE_QUICK.md updated with the new field.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-31 21:33:32 +02:00
MelekiandClaude Opus 4.7 271902f32d feat(telegram): CLI-Fallback bei fehlendem API-Key (analog Web-UI)
Wenn ein Telegram-Bot eine Nachricht empfängt und für den Agent kein
API-Key zugewiesen ist, fiel der Bot bisher hart aus ("Kein API-Key
für diesen Agent zugewiesen"). Im Web-UI wird in dem Fall bereits auf
Claude-CLI zurückgefallen – das macht der Telegram-Pfad jetzt analog.

- AnthropicService.Cli: Neue Methode ChatNonStreamingViaCli(...) für
  Non-SSE-Caller (Telegram). Macht dasselbe wie StreamChatViaCli aber
  ohne SSE: System-Prompt + Auto-Context, History-Kontext-Block, letzte
  User-Message (inkl. Image/PDF-Refs), Text + tool_use + tool_result in
  DB persistieren, finalen Text zurückgeben + FinalizeChain mit echten
  Token-Counts vom CLI-Result.
- TelegramService: Bei userApiKey == null jetzt CanUseCli, IsAdmin und
  IsCliAvailable prüfen. Bei OpenAI-Providern bleibt der Hard-Fail
  (kein CLI-Äquivalent). Spezifische Fehlermeldungen pro Szenario.
  Zusätzlich Schutz gegen leere Antwort.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-31 20:44:36 +02:00
MelekiandClaude Opus 4.6 1fe04025d3 fix(openai): Auto-Context, Tool-Result-Matching, Payload-Preview, leere Bubbles
- Auto-Context (Embedding-Suche) für OpenAI-Provider aktiviert: BuildAutoContextAsync
  auf internal static refactored und in StreamChat + ChatNonStreaming integriert
- Tool-Results mit Role="tool" (OpenAI-Konvention) werden in BuildHistoryFromDb
  jetzt korrekt erkannt (vorher nur Role="user"/Anthropic)
- Payload-Preview zeigt für OpenAI-Provider echtes API-Format (function-Wrapper,
  tool_choice:"auto", max_tokens, stream_options, extra_body)
- Tool-Input (Argumente) wird im SSE tool_end-Event mitgesendet (fehlte im OpenAI-Pfad)
- Leere Bubbles durch Whitespace-only Text nach </think>-Extraktion behoben
  (Trim in DB-Save, BuildHistoryFromDb und Frontend-Guard)
- History-Toggle-Bug: var→const in for-Loop (Block-Scoping für Closures),
  tool_result-Matching per data-tool-call-id statt blindes letztes Element
- Non-Streaming max_tokens für MiniMax auf 32768 + extra_body.reasoning_split

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 11:16:40 +02:00
MelekiandClaude Opus 4.6 53cee67bef feat: Remote-Execute für Linux/Bash – OS-basierte Tool-Descriptions und remote.sh Script
Remote-Verbindungen erkennen jetzt das OS des Clients und passen die Tool-Description
dynamisch an (PowerShell für Windows, Bash für Linux). Neues remote.sh Script für
Linux/macOS-Clients mit embedded Python WebSocket-Client.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 09:31:56 +02:00
MelekiandClaude Opus 4.6 1035066a39 feat: Python-Befehl auto-detect (python3/python/py) mit Warnung bei fehlendem Python
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 07:13:19 +02:00
MelekiandClaude Opus 4.6 2ac0078960 fix: Auto-Context SSE-Event und DB-Save auch im CLI-Codepfad
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 10:12:07 +02:00
MelekiandClaude Opus 4.6 3f2baa1639 feat: AutoContext-Suche grundlegend verbessern + Embedding-Debug-Tool
Hybrid-Suche (Vektor + FTS5-Keyword), Recency-Boost, Query-Erweiterung
(letzte 2-3 User-Messages), Chunk-Overlapping, FullText-Speicherung,
konfigurierbares Embedding-Modell/MaxSeqLen, deduplizierter AutoContext-
Code (Streaming + CLI shared), Admin-Diagnose-Seite mit Re-Embed-Funktion.
Threshold von 0.45 auf 0.35 gesenkt (Hybrid-Suche ist präziser).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 08:50:41 +02:00
MelekiandClaude Opus 4.6 500c00f948 feat: Unity MCP-Server Integration pro Session
Sessions können jetzt einen Unity MCP-Server (URL + Token) konfigurieren.
Die CLI erhält automatisch die MCP-Config mit korrektem Transport-Typ
(URL-basierte Erkennung: /sse → SSE, sonst HTTP für streamableHttp).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:34:47 +01:00
MelekiandClaude Opus 4.6 9c507e4716 fix: TodoWrite-Tool über CLI korrekt als Todo-Liste rendern
TodoWrite → todo_write Mapping in Backend und Frontend ergänzt.
Todo-Liste wird jetzt aus dem Input-Array gebaut statt aus dem
Result, da die CLI nur einen generischen Erfolgstext zurückgibt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 07:07:12 +01:00
MelekiandClaude Opus 4.6 d1c8aa62f2 fix: Redundantes CLI-Tool-Mapping entfernt + alle Tool-Anzeigenamen ergänzt
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 08:58:41 +01:00
MelekiandClaude Opus 4.6 1c622abb37 refactor: AnthropicService partial-class Aufteilung + ToolPayloadOptions + Non-Streaming Deduplizierung
- AnthropicService.cs (337 Zeilen): Felder, Konstruktor, Setters, Utilities
- AnthropicService.Streaming.cs (750 Zeilen): StreamChat, ProcessStream, SSE-Parsing
- AnthropicService.Agents.cs (680 Zeilen): RunAgentChat, ChatNonStreaming, Review/Preparer/Finalizer
- AnthropicService.Cli.cs (530 Zeilen): StreamChatViaCli, MCP-Config, CLI-Helpers
- AddToolsToPayload: 12 Bool-Parameter → ToolPayloadOptions Record
- RunAgentChat + ChatNonStreaming → gemeinsame RunNonStreamingToolLoop-Methode

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 14:54:39 +01:00