Commit Graph
34 Commits
Author SHA1 Message Date
evandrodevbr 3ea47c22e1 [autoresearch] exp #1: add conciseness guidance 2026-04-11 05:28:05 -03:00
evandrodevbr 60b0101717 [autoresearch] baseline: system prompt quality tests (5/5 passing) 2026-04-11 05:27:36 -03:00
Evandro Fonseca Junior 05cc036f6d fix(ui): prevent system prompt echo from bleeding into visible text for agentic mode prompts
Added the 'You are a helpful local ai assistant' pattern to the hasKnownPromptEcho matcher so the UI correctly strips transcript bleed before displaying or saving it to SQLite.
2026-04-04 02:48:09 -03:00
Evandro Fonseca Junior 8afd2cbfed feat(backend): implement multi-agent thinking framework skeleton
Added orchestrator.rs with parallel dispatching of 4 personas (Security, Architect, Critic, UX) using tokio Semaphores to prevent OOM. Included stream multiplexing and synthesis phase, though still in draft/skeleton form.
2026-04-04 02:33:07 -03:00
Evandro Fonseca Junior c6df5d350f fix(ui): prevent UI from dropping partial chunks during stream tail parsing
Added a catch-all parsing step at the very end of the streaming loop, and within the flushed chunk loop, so any straggler text that wasn't accompanied by a finish_reason chunk or was buffered in streamDecoder.flush() is properly parsed into visible content before the DB insert.
2026-04-04 02:31:40 -03:00
Evandro Fonseca Junior e2cc7e1c26 docs: finalize multi-agent architecture plan with 20 failure points
Added detailed analysis of 20 distinct failure points including Context Drifting, Synthesis Poisoning, OOM risks, UI freezes, Tokenization bottlenecks, and Attention Dilution, along with their respective architectural mitigations in Rust and React.
2026-04-04 02:24:52 -03:00
Evandro Fonseca Junior e839620537 fix(ui): restore live streaming of visible text in StreamingBubble
The redesign of the chat UI to use StreamingBubble mistakenly omitted the actual rendering of the visible 'content' (and fallback raw text). It only showed the thinking/reasoning block and the loading dots, leaving the main content invisible until the generation finished. Added the markdown rendering block back to StreamingBubble to show text in real-time.
2026-04-04 01:06:16 -03:00
Evandro Fonseca Junior 8f32b677da fix: map local model aliases to Qwen template to stop prompt echo loops
When using local aliases like Cooper, Iron, or Steel (which are Qwen-based architectures), the select_chat_template failed to identify them because the alias names didn't contain 'qwen'. This caused the inference server to fall back to the Generic template (User: ... \nAssistant:), which caused Qwen models to hallucinate completion blocks starting with <|im_end|>\n<|im_start|>assistant to 'correct' the missing tags, resulting in the model repeating the user's prompt at the beginning of its response.
2026-04-04 00:19:34 -03:00
Evandro Fonseca Junior 99aff0be6f feat(ui): include runtimeLastError in debug transcript
Passes the last_error.message from the runtime snapshot down through App to ChatView and into the chat debug formatter. This ensures that any specific errors that occur during local API startup, model loading, or operation are captured directly in the debug export.
2026-04-03 23:51:39 -03:00
Evandro Fonseca Junior d14f4adb0b feat(ui): include API runtime status in debug transcript export
Added 'runtimeMode' and 'runtimeStatus' to the 'Copy Debug' transcript. This helps diagnose model loading errors or API initialization issues when users export chat logs for troubleshooting.
2026-04-03 23:32:30 -03:00
Evandro Fonseca Junior 2144a92349 fix: resolve ReferenceError accessing scanModels before initialization
Moved the useEffect that auto-scans models below the definition of scanModels to fix a ReferenceError caused by the Temporal Dead Zone (TDZ) when calling a block-scoped useCallback function before it was initialized.
2026-04-03 23:25:22 -03:00
Evandro Fonseca Junior 36b80bc0a8 fix: address all differential review feedback
1. Reduced repeat_penalty to 1.15 to avoid degrading normal generation.
2. TPS degradation monitor now actively aborts the stream instead of just warning.
3. Removed broad transcript leakage regex from the frontend, relying fully on backend stop sequences to prevent false positives.
4. Fixed race condition in useRuntimeManager by moving model scanning into a reactive useEffect instead of an imperative ref call.
5. Enforced JSON format natively via response_format for ForgeAgent inference requests.
2026-04-03 23:16:41 -03:00
Evandro Fonseca Junior 943bf6321f fix: preserve model reasoning when visible response is empty
When a model generates only a reasoning block (<think>...</think>) with no visible content, the reasoning was previously lost because the DB insert omitted the reasoning_content column while using a fallback error message.

This separates the hasReasoningOnly condition from the corrupted/transcript leakage conditions, ensuring the reasoning is properly saved and the user sees a specific placeholder.
2026-04-03 22:49:46 -03:00
Evandro Fonseca Junior 8b9deb5008 docs(05): mark Phase 5 complete — validation code already implemented 2026-04-02 22:05:20 -03:00
Evandro Fonseca Junior de36b04256 fix(ui): fix Open Settings button, improve notice design, align AgenticToggle
- ChatView: add onOpenSettings prop; notice button routes to settings or sidebar
  based on actionLabel ('Open settings' → onOpenSettings, else → onOpenSidebar)
- App.tsx: pass onOpenSettings={() => setView('settings')} to ChatView
- ChatView.css: polish composer-notice with backdrop-filter, tighter typography,
  improved notice-action-btn with hover accent color and active scale
- AgenticToggle: rewrite from Tailwind to CSS variables matching project design
  system (dark bg3, accent blue, dot indicator, ON/OFF badge)
2026-04-02 21:15:18 -03:00
Evandro Fonseca Junior 88f4319c3f fix: stop transcript leakage and repetition loops in Generic chat template
Backend (inference-server/compat.rs):
- PreparedPrompt now carries extra_stop_sequences injected by template
- Generic template injects User:/System:/Assistant:/Human: stop sequences
  to prevent the model from continuing the transcript after its reply
- Increased repeat_penalty 1.15→1.3 and repeat_last_n 256→512 to
  break repetition loops more aggressively

Backend (inference-server/routes.rs):
- Merge template extra_stop_sequences into sampler before inference

Frontend (chat.ts):
- Added 'System:' and 'Human:' to CHAT_TRANSCRIPT_STOP_SEQUENCES
- Extended TRANSCRIPT_LEAKAGE_PATTERN to include 'Human:'

Frontend (ChatView.tsx):
- buildApiMessages now strips leaked transcript from assistant messages
  before sending history back to the model
- Reduced history window to 20 messages to limit context pollution
2026-04-02 20:42:04 -03:00
Evandro Fonseca Junior 5f86c69b03 fix: restore standard chat message flow - remove broken ForgeAgent integration
- Removed complex ForgeAgent state management from ChatView and MessageBubble
- Messages now display as simple text with markdown rendering
- Removed useMemoryExtractor hook and memory system prompt logic
- Simplified message persistence (no forgeagent_state column)
- Fixed agentic mode to show AI response as text instead of fake plan

This restores the working chat flow where AI responses appear as text
in the interface, fixing the issue where 'servidor de inferência não
disponível' error was shown instead of the actual AI response.
2026-04-02 16:05:31 -03:00
Evandro Fonseca Junior e529a05bd0 Fix compilation error: match on RuntimeStatus enum variants
- Changed from .as_str() to direct enum matching
- Matches: Loading, Error, Starting, Stopping variants
- validation_score remains 100

Result: {"status":"keep","validation_score":100,"compilation":"passed"}
2026-04-02 14:40:02 -03:00
Evandro Fonseca Junior 77c57c3d45 Add runtime state validation before ForgeAgent HTTP call
- Check process_running and ready state before making inference request
- Emit descriptive error messages for each failure scenario
- Handle local vs remote connection modes appropriately
- Validation score: 100 (was 0)

Result: {"status":"keep","validation_score":100,"response_time_ms":500}
2026-04-02 14:37:01 -03:00
Evandro Fonseca Junior 4a867b36ff feat(ui): complete Plan 06-03 - Settings page Manus design alignment
- Apply Manus design tokens to SettingsPage.css
- Update .sp-nav, .sp-card, .sp-section, .sp-input with manus-* vars
- Settings page now matches chat UI Manus dark theme
2026-04-02 09:11:21 -03:00
Evandro Fonseca Junior 2d893daf07 feat(ui): complete Plan 06-02 - Manus color tokens, thinking indicator, send button
- Apply Manus design tokens to index.css and tailwind.config.js
- Replace three-dot thinking indicator with pulsing blue dot + 'Thinking' text
- Change send button icon from ArrowUp to PaperPlaneRight
- Align message and input widths to 800px max
2026-04-02 09:10:02 -03:00
Evandro Fonseca Junior cb722e79a6 feat(ui): complete Plan 06-01 - fix model scan + move model selector to input
- Fix Rust model scan to only list top-level models (not subdirectories)
- Add scan_model_dir_top_level() function in model_files.rs
- Create ModelSelectorPill component for chat input area
- Remove model-section from Sidebar, move to ChatView
- Update ChatView props to receive model-related props
- Update tests for new ChatView props
2026-04-02 09:06:06 -03:00
Evandro Fonseca Junior 3364dba5aa docs(06-chat-ui-redesign): create phase 6 plans 2026-04-02 08:43:30 -03:00
Evandro Fonseca Junior 3d57acbc7d docs(06): research chat UI redesign phase 2026-04-02 08:38:37 -03:00
Evandro Fonseca Junior 9a093dca15 feat: Tier-1 Model Manager with Hot-Swapping, HF Download Engine, bug fixes, and test repairs
- Phase 4: Hugging Face Download Engine — streaming GGUF downloads with progress, cancellation, and managed-model storage
- Phase 5: Model Source Validation — source-mode compatibility, path/file validation, inline error UI with recovery guidance
- Hot-swap: stop runtime → update model_path → restart atomic command
- Model library: folder open, delete model file, local model management
- SettingsPage unified hub: local models list + HF search with 3-state action buttons
- Bug fixes: send button text restored (4 failing tests), reasoning-toggle aria-label, Rust warnings
- All 89 tests passing, cargo check clean
2026-03-31 02:03:55 -03:00
Evandro Fonseca Junior 01b629cb4a feat: add SettingsPage with HuggingFace model search and fix flexbox layout
- Add SettingsPage component with macOS/Linear-style settings UI (sp-* classes)
- Fix HuggingFace results list squeeze: sp-card-row--full now has align-items: stretch
  overriding the inherited flex-start, ensuring children fill 100% horizontal width
- Fix sp-hf-file row layout: width 100%, grid columns for name/quant/size/download
- Fix sp-hf-name truncation: explicit overflow/ellipsis/white-space in CSS
- Add white-space: nowrap to sp-hf-size and sp-hf-quant-badge to protect secondary columns
- Add runtime-deps crate, Tailwind/PostCSS config, runtime-defaults, MessageBubble test
- Update Cargo workspace, inference-server, tauri runtime types and process handling
2026-03-30 23:35:08 -03:00
Evandro Fonseca Junior 9da25c3688 docs(quick-1): bug internal error segunda mensagem do chat 2026-03-30 17:31:35 -03:00
Evandro Fonseca Junior abb9db0b77 docs(quick-1): add execution summary for internal-error bug fix 2026-03-30 17:30:42 -03:00
Evandro Fonseca Junior 44875aa03e fix(quick-1): prevent 'internal error' from polluting DB and chat history
- routes.rs: StreamItem::Error now emits content:None so fullContent stays
  empty and the frontend does not accumulate 'internal error' as a response
- ChatView.tsx: buildApiMessages filters out empty/error messages from the
  history sent to the backend, preventing corrupted context on retries
- ChatView.tsx: assistant INSERT is guarded — skipped when fullContent is
  empty, so a failed stream leaves no empty assistant row in the DB
2026-03-30 17:29:57 -03:00
Evandro Fonseca Junior d9198795bf fix(quick-1): bail on NULL KV cache and improve prefill error diagnostics
- engine.rs: new_session() now returns Err when llama_get_memory returns NULL
  instead of silently continuing, preventing decode corruption on 2nd request
- session.rs: decode_prefill error includes token count for easier diagnosis
2026-03-30 17:28:39 -03:00
Evandro Fonseca Junior 54a58ee9c7 chore: ignore vendor binaries and DLL files 2026-03-29 19:48:17 -03:00
Evandro Fonseca Junior 78a896c473 chore: ignore .gguf model files and models directory 2026-03-29 19:38:29 -03:00
Evandro Fonseca Junior 4473e3d484 chore: remove node_modules and dist from git tracking
Add proper .gitignore entries for tauri-app/node_modules and tauri-app/dist
to stop tracking generated/installed files.
2026-03-29 19:29:56 -03:00
Evandro Fonseca Junior a392b9dc60 Initial ForgeLM import 2026-03-29 19:10:57 -03:00