Skip to content

[Feat] Multi-suggestion autocomplete, Vision LLM config & Desktop analytics#1162

Merged
MODSetter merged 28 commits into
MODSetter:devfrom
CREDO23:feat/vision-autocomplete
Apr 7, 2026
Merged

[Feat] Multi-suggestion autocomplete, Vision LLM config & Desktop analytics#1162
MODSetter merged 28 commits into
MODSetter:devfrom
CREDO23:feat/vision-autocomplete

Conversation

@CREDO23

@CREDO23 CREDO23 commented Apr 7, 2026

Copy link
Copy Markdown
Collaborator

Multi-suggestion autocomplete, dedicated Vision LLM config system, and PostHog analytics for the desktop app.

Description

  • Multi-suggestion autocomplete: The vision autocomplete agent now returns 3 distinct suggestion options instead of a single completion. The overlay UI displays option cards users can click to accept.
  • Vision LLM config: Dedicated Vision LLM configuration system (separate from chat/agent LLMs) with full CRUD, global YAML configs, Auto mode routing, RBAC permissions, and a new "Vision Models" tab in settings.
  • Desktop analytics: PostHog integration in the Electron main process tracking key actions (app launch, autocomplete trigger/accept/dismiss, quick ask). Disabled when POSTHOG_KEY is empty. Uses anonymous machine ID — no PII.

API Changes

  • This PR includes API changes

New endpoints:

  • GET /api/v1/global-vision-llm-configs
  • POST/GET/PUT/DELETE /api/v1/vision-llm-configs
  • Renamed vision_llm_idvision_llm_config_id in LLM preferences

Change Type

  • New feature
  • Dependency/Build system

Testing Performed

  • Tested locally
  • Manual/QA verification

Checklist

  • Follows project coding standards and conventions
  • Documentation updated as needed
  • Dependencies updated as needed
  • No lint/build errors or new warnings
  • All relevant tests are passing

High-level PR Summary

This PR introduces three major features: multi-suggestion autocomplete that provides 3 distinct completion options instead of a single one, a dedicated Vision LLM configuration system (separate from chat/agent LLMs) with full CRUD operations, YAML-based global configs, Auto mode routing, and RBAC permissions, and PostHog analytics integration for the desktop app that tracks key user actions (app launch, autocomplete trigger/accept/dismiss, quick assist) using an anonymous machine ID. The Vision LLM system includes database migration, API endpoints, a new settings tab in the UI, and backend routing service. Analytics are disabled when POSTHOG_KEY is empty and collect no PII.

⏱️ Estimated Review Time: 1-3 hours

💡 Review Order Suggestion
Order File Path
1 surfsense_backend/alembic/versions/120_add_vision_llm_configs_table.py
2 surfsense_backend/app/db.py
3 surfsense_backend/app/schemas/vision_llm.py
4 surfsense_backend/app/services/vision_llm_router_service.py
5 surfsense_backend/app/routes/vision_llm_routes.py
6 surfsense_backend/app/config/__init__.py
7 surfsense_backend/app/config/global_llm_config.example.yaml
8 surfsense_backend/app/services/llm_service.py
9 surfsense_backend/app/agents/autocomplete/autocomplete_agent.py
10 surfsense_backend/app/routes/search_spaces_routes.py
11 surfsense_backend/app/schemas/new_llm_config.py
12 surfsense_desktop/src/modules/analytics.ts
13 surfsense_desktop/package.json
14 surfsense_desktop/pnpm-lock.yaml
15 surfsense_desktop/src/main.ts
16 surfsense_desktop/src/modules/autocomplete/index.ts
17 surfsense_desktop/src/modules/quick-ask.ts
18 surfsense_desktop/.env
19 surfsense_desktop/scripts/build-electron.mjs
20 .github/workflows/desktop-release.yml
21 surfsense_web/app/desktop/suggestion/page.tsx
22 surfsense_web/app/desktop/suggestion/suggestion.css
23 surfsense_web/contracts/types/new-llm-config.types.ts
24 surfsense_web/contracts/enums/vision-providers.ts
25 surfsense_web/lib/apis/vision-llm-config-api.service.ts
26 surfsense_web/atoms/vision-llm-config/vision-llm-config-query.atoms.ts
27 surfsense_web/atoms/vision-llm-config/vision-llm-config-mutation.atoms.ts
28 surfsense_web/components/shared/vision-config-dialog.tsx
29 surfsense_web/components/settings/vision-model-manager.tsx
30 surfsense_web/components/settings/llm-role-manager.tsx
31 surfsense_web/components/settings/search-space-settings-dialog.tsx
32 surfsense_web/components/new-chat/model-selector.tsx
33 surfsense_web/components/new-chat/chat-header.tsx
34 surfsense_web/lib/query-client/cache-keys.ts
35 surfsense_web/messages/en.json
36 surfsense_web/messages/es.json
37 surfsense_web/messages/hi.json
38 surfsense_web/messages/pt.json
39 surfsense_web/messages/zh.json
40 surfsense_backend/app/routes/__init__.py
41 surfsense_backend/app/schemas/__init__.py
42 surfsense_backend/app/app.py
43 surfsense_backend/app/celery_app.py
44 surfsense_web/.env.example
45 surfsense_web/components/TokenHandler.tsx
46 surfsense_web/components/desktop/shortcut-recorder.tsx
47 surfsense_web/app/dashboard/[search_space_id]/client-layout.tsx
48 surfsense_web/app/dashboard/[search_space_id]/user-settings/components/DesktopContent.tsx
49 surfsense_web/app/desktop/login/page.tsx

Need help? Join our Discord

Analyze latest changes

CREDO23 added 28 commits April 7, 2026 17:38
@vercel

vercel Bot commented Apr 7, 2026

Copy link
Copy Markdown

@CREDO23 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@recurseml recurseml Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by RecurseML

🔍 Review performed on 00ee797..4dd1b6c

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (48)

.github/workflows/desktop-release.yml
surfsense_backend/app/agents/autocomplete/autocomplete_agent.py
surfsense_backend/app/app.py
surfsense_backend/app/celery_app.py
surfsense_backend/app/config/__init__.py
surfsense_backend/app/config/global_llm_config.example.yaml
surfsense_backend/app/db.py
surfsense_backend/app/routes/__init__.py
surfsense_backend/app/routes/search_spaces_routes.py
surfsense_backend/app/routes/vision_llm_routes.py
surfsense_backend/app/schemas/__init__.py
surfsense_backend/app/schemas/new_llm_config.py
surfsense_backend/app/schemas/vision_llm.py
surfsense_backend/app/services/llm_service.py
surfsense_backend/app/services/vision_llm_router_service.py
surfsense_desktop/.env
surfsense_desktop/package.json
surfsense_desktop/pnpm-lock.yaml
surfsense_desktop/scripts/build-electron.mjs
surfsense_desktop/src/main.ts
surfsense_desktop/src/modules/analytics.ts
surfsense_desktop/src/modules/autocomplete/index.ts
surfsense_desktop/src/modules/quick-ask.ts
surfsense_web/.env.example
surfsense_web/app/dashboard/[search_space_id]/client-layout.tsx
surfsense_web/app/dashboard/[search_space_id]/user-settings/components/DesktopContent.tsx
surfsense_web/app/desktop/login/page.tsx
surfsense_web/app/desktop/suggestion/page.tsx
surfsense_web/app/desktop/suggestion/suggestion.css
surfsense_web/atoms/vision-llm-config/vision-llm-config-mutation.atoms.ts
surfsense_web/atoms/vision-llm-config/vision-llm-config-query.atoms.ts
surfsense_web/components/TokenHandler.tsx
surfsense_web/components/desktop/shortcut-recorder.tsx
surfsense_web/components/new-chat/chat-header.tsx
surfsense_web/components/new-chat/model-selector.tsx
surfsense_web/components/settings/llm-role-manager.tsx
surfsense_web/components/settings/search-space-settings-dialog.tsx
surfsense_web/components/settings/vision-model-manager.tsx
surfsense_web/components/shared/vision-config-dialog.tsx
surfsense_web/contracts/enums/vision-providers.ts
surfsense_web/contracts/types/new-llm-config.types.ts
surfsense_web/lib/apis/vision-llm-config-api.service.ts
surfsense_web/lib/query-client/cache-keys.ts
surfsense_web/messages/en.json
surfsense_web/messages/es.json
surfsense_web/messages/hi.json
surfsense_web/messages/pt.json
surfsense_web/messages/zh.json

@MODSetter
MODSetter merged commit e827a39 into MODSetter:dev Apr 7, 2026
5 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants