Commit graph

18 commits

Author SHA1 Message Date
aeb567fb7f feat: optimize Salesianos bot with rich HTML, thinking strip, and updated deployment with backup
All checks were successful
BotServer CI / build (push) Successful in 51m13s
2026-04-30 09:50:03 -03:00
1a36f4aed2 fix: Embedding server auto-config and KB indexing fixes
- botserver/src/llm/local.rs:
  * Auto-configure embedding-url when empty (http://localhost:8082/v1/embeddings)
  * Auto-configure llm-url when empty (http://localhost:8081/v1/chat/completions)
  * Persist defaults to bot_configuration table via ConfigManager
  * Fix llama-server command path and add LD_LIBRARY_PATH
  * Fix working_dir for Linux (not just Windows)
  * Fix embedding server args: --embeddings --pooling mean --ctx-size 512

- botserver/src/core/bootstrap/bootstrap_manager.rs:
  * Temp disable alm-ci startup (causes 20s hang in bootstrap)
  * Remove unused alm_ci_health_check import

- Database changes:
  * bot_configuration.embedding-model: 'bge-small-en-v1.5-f32.gguf' (full filename)
  * bot_configuration.embedding-url: 'http://localhost:8082/v1/embeddings' (auto-generated)

- Testing:
  * Embedding server responds on port 8082
  * Generates 384-dimension embeddings
  * KB file exists: minio://default.gbai/default.gbkb/manual/test-kb-manual.txt
  * Next: Verify KB indexing and search functionality

Refs: #498
2026-04-28 14:27:00 -03:00
11ea023eec fix CI. 2026-04-28 13:36:07 -03:00
0911448548 feat: Add switcher toggle functionality
- Added SWITCHER_TOGGLE message type (8) for reprocessing last user message with active switchers
- Backend: Handler fetches last user question from DB, mutates message in-place, injects switcher prompts into system_prompt
- Backend: Switcher replays skip message_history save to avoid duplication
- Frontend: toggleSwitcher() sends SWITCHER_TOGGLE when input empty, sendMessage() when text present
- Frontend: Added TOOL_EXEC and SWITCHER_TOGGLE to MessageType constants
- Fixed session_id shadowing bug in DB query (used session_id_for_query)
- Preserves conversation history for LLM context when reprocessing with switchers
2026-04-26 16:36:03 -03:00
28c48eeabf feat: Split chat.html into modular JS modules for #495 switcher support
- Split partials/chat.html (1513→70 lines) into 8 JS modules:
  chat-state.js, chat-switchers.js, chat-mentions.js,
  chat-messages.js, chat-suggestions.js, chat-theme.js,
  chat-websocket.js, chat-init.js
- Centralized state in ChatState global object
- Switcher chips auto-activate on switch_context suggestion action
- active_switchers sent in every WS message payload
- Removed old chat-main.js (merged into modules)
- Split vibe.html into vibe/ module directory with CSS extraction
- Updated standalone chat/chat.html to use same modules
2026-04-25 07:03:26 -03:00
1bb96f1923 fix: Add switcher support to chat page - render switcher chips from BotResponse, auto-activate on switch_context suggestion click, include active_switchers in WS payload (#495)
All checks were successful
Botlib CI / build (push) Successful in 6s
BotServer CI / build (push) Successful in 3m11s
Bottest CI / build (push) Successful in 29s
BotUI CI / build (push) Successful in 1m30s
2026-04-24 18:17:29 -03:00
d453eef57d fix: Use event delegation for switcher clicks
All checks were successful
Botlib CI / build (push) Successful in 7s
BotServer / build (push) Successful in 3m56s
Bottest CI / build (push) Successful in 35s
BotUI CI / build (push) Successful in 45s
- Event listeners were lost when renderSwitchers() re-created DOM
- Now using event delegation on parent container
- Listener attached once, persists across re-renders
- Added logging to verify active_switchers payload

Fixes switcher toggle not persisting and LLM modifier not being sent.
2026-04-24 16:57:30 +00:00
2d715b2650 refactor: Split chat.html into modular JS files
All checks were successful
Botlib CI / build (push) Successful in 12s
Bottest CI / build (push) Successful in 32s
BotUI CI / build (push) Successful in 44s
- chat.html reduced from 1623 lines to 59 lines
- Created chat-switchers.js for switcher state management
- Created chat-messages.js for message rendering
- Created chat-main.js for initialization and coordination
- Added console logging to debug switcher toggle functionality
- Follows AGENTS.md 450-line limit rule
2026-04-24 16:22:08 +00:00
cf00a51245 feat: Separate switchers from suggestions - server-side prompt resolution
Some checks failed
Botlib CI / build (push) Successful in 22s
BotServer CI / build (push) Failing after 0s
Bottest CI / build (push) Successful in 31s
BotUI CI / build (push) Successful in 52s
- Add Switcher struct to botlib (id, label, prompt, color, icon)
- Separate Redis key switchers:{bot_id}:{session_id} from suggestions
- Server-side SWITCHER_PROMPT_MAP resolves prompts (not frontend)
- Frontend sends active_switchers array in USER WS message
- Remove SYSTEM message dispatch (type 7 deprecated)
- Remove hardcoded promptMap from chat.html
- Render switchers from BotResponse.switchers (backend-driven)
- Support custom switchers via ADD_SWITCHER keyword
- Filter switcher-type items from get_suggestions()
- Add switchers field to all BotResponse construction sites
2026-04-23 21:36:09 +00:00
7a5cbf9e8f fix(botui): dynamic switchers styling and custom prompt injection 2026-04-23 21:32:34 +00:00
42c22cfcab fix(botui): ensure heuristic switchers are correctly identified
All checks were successful
Botlib CI / build (push) Successful in 2s
BotServer CI / build (push) Successful in 2m19s
Bottest CI / build (push) Successful in 20s
BotUI CI / build (push) Successful in 20s
2026-04-22 22:56:10 -03:00
380ad10177 fix(botui): dynamic switchers styling and custom prompt injection
All checks were successful
Botlib CI / build (push) Successful in 5s
BotServer CI / build (push) Successful in 2m17s
Bottest CI / build (push) Successful in 26s
BotUI CI / build (push) Successful in 27s
2026-04-22 22:37:46 -03:00
b20544d1a0 Merge branch 'main' of github.com:generalbots/generalbots into main
Some checks failed
Botlib CI / build (push) Failing after 2s
Bottest CI / build (push) Failing after 1s
BotServer CI / build (push) Failing after 3m40s
BotUI CI / build (push) Failing after 22s
2026-04-22 21:31:52 -03:00
61c8f709c4 fix(stage): fix message type collision and switcher logic in chat ui 2026-04-22 21:30:26 -03:00
8069fbab28 fix(botui): improve HTML streaming rendering to avoid loading dots lock 2026-04-22 20:45:40 +00:00
c8a02b65be fix: HTML rendering in chat + improved PROMPT.md for ramal queries
All checks were successful
Botlib CI / build (push) Successful in 4s
BotServer CI / build (push) Successful in 23s
Bottest CI / build (push) Successful in 19s
BotUI CI / build (push) Successful in 26s
- Detect HTML content (starts with <) in streaming messages and
  bypass marked.parse() to render directly as innerHTML
- marked.parse() was corrupting the LLM's raw HTML output by
  treating it as Markdown (escaping tags, wrapping in <p>, etc.)
- Updated PROMPT.md for Salesianos to be more explicit about
  returning ramal data directly from KB context without asking
  for unnecessary clarification
- Fixed ramais.bas tool (removed invalid BEGIN/END syntax)
2026-04-22 20:15:21 +00:00
5ab886e6e3 ci: Update botserver workflow for single-repo, remove duplicate .forgejo from subdirs
Some checks failed
Botapp CI / build (push) Failing after 0s
Botbook CI / build (push) Failing after 0s
Botdevice CI / build (push) Failing after 0s
Botmodels CI / build (push) Failing after 0s
Botplugin CI / build (push) Failing after 0s
BotServer CI / build (push) Failing after 0s
Bottest CI / build (push) Failing after 0s
BotUI CI / build (push) Failing after 0s
2026-04-21 23:04:27 +00:00
037db5c381 feat: Major workspace reorganization and documentation update
- Add comprehensive documentation in botbook/ with 12 chapters
- Add botapp/ Tauri desktop application
- Add botdevice/ IoT device support
- Add botlib/ shared library crate
- Add botmodels/ Python ML models service
- Add botplugin/ browser extension
- Add botserver/ reorganized server code
- Add bottemplates/ bot templates
- Add bottest/ integration tests
- Add botui/ web UI server
- Add CI/CD workflows in .forgejo/workflows/
- Add AGENTS.md and PROD.md documentation
- Add dependency management scripts (DEPENDENCIES.sh/ps1)
- Remove legacy src/ structure and migrations
- Clean up temporary and backup files
2026-04-19 08:14:25 -03:00