Skip to content

Update semantic search integration#424

Merged
esengine merged 7 commits into
esengine:mainfrom
kabaka9527:main
May 8, 2026
Merged

Update semantic search integration#424
esengine merged 7 commits into
esengine:mainfrom
kabaka9527:main

Conversation

@kabaka9527

Copy link
Copy Markdown
Contributor

What

This pull request introduces support for OpenAI-compatible embedding providers to the semantic search feature. It allows users to configure custom API URLs, API keys, models, and request bodies for embedding generation, replacing the previously hardcoded Ollama-only setup. Additionally, it refactors the semantic search panel UI, adds comprehensive UI text improvements for both English and Chinese translations, and enhances the indexing job handling with more detailed status reporting.

Why

This change enables users to leverage alternative embedding models or services that are compatible with the OpenAI API standard. This flexibility is crucial for users who may prefer different embedding models for performance, cost, or language support reasons. The update also improves the user experience by providing clearer status messages, better configuration options, and more robust error handling during the indexing process. No pre-existing issue is directly linked, but the changes fulfill a common feature request for broader embedding model support.

How to verify

Start the application: Run reasonix code to start the main application or launch the dashboard directly.
Navigate to Semantic Search: Open the dashboard (via /dashboard command) and go to the semantic search settings panel.
Select a new provider: In the semantic panel, select "OpenAI-Compatible" from the provider dropdown.
Configure the provider: Enter a valid API URL, API key, and model name. Add any optional custom request body if needed.
Save the configuration: Click the "Save" button. The UI should show a success message without errors.
Build an index: Initiate a new index build. The job should proceed through "scanning", "embedding", and "writing" phases.
Verify functionality: After the index is built, perform a semantic search query. The search should return relevant results using the configured provider.
Check UI text: Verify that the updated English and Chinese text strings appear correctly in the interface (e.g., "incompatible status", "setup failed", "remote provider").

Checklist

  • [ ✅] passes locally (lint + typecheck + tests + comment-policy gate)npm run verify
  • [ ✅] No trailer in commitsCo-Authored-By: Claude
  • [ ✅] Comments follow CONTRIBUTING.md (no module-essay headers, no incident history)
  • [ ✅] No edits to — release notes are maintainer-written at release timeCHANGELOG.md

Comment thread src/index/semantic/embedding.ts
@esengine

esengine commented May 8, 2026

Copy link
Copy Markdown
Owner

Thanks for the effort here. The OpenAI-Compatible provider itself (src/config.ts, embedding.ts, store.ts, builder.ts, server/api/semantic.ts, dashboard/panels/semantic.ts plus the new tests) reads well — the provider abstraction, index identity check, abort wiring through the builder, and API-key redaction are all in the right shape.

I can't merge it as-is though. The diff carries three unrelated regressions that look like a stale rebase — your fork's base predates #380, and the merge brought those files back to the older version:

  1. src/cli/commands/chat.tsx:512 — drops incrementalRendering: true and alternateScreen: opts.altScreen !== false. Both lines are load-bearing for feat(ui): row-precision virtual scroll on Ink 7 + React 19 #380 (row-precision virtual scroll on Ink 7); without them, scrollback reflow ghosting comes back.

  2. src/cli/ui/layout/CardStream.tsx — replaces Ink 7's useBoxMetrics with useEffect + measureElement + useState, and the effect has no dependency array. That re-runs setState on every render, which triggers another render — at best a measurement loop, at worst infinite. This is the pre-feat(ui): row-precision virtual scroll on Ink 7 + React 19 #380 implementation.

  3. src/cli/ui/ticker.tsx — swaps useAnimation for a raw setInterval. useAnimation shares one Ink-managed interval and is paused globally by TickerProvider's disabled flag (PLAIN_UI mode and modal overlays rely on that for byte-stable output). A naked setInterval per caller breaks that invariant.

CI passing doesn't catch these — they're TUI rendering behavior, not anything the unit tests exercise.

Could you reset just those three files to current main and force-push?

git fetch upstream main
git checkout upstream/main -- src/cli/commands/chat.tsx src/cli/ui/layout/CardStream.tsx src/cli/ui/ticker.tsx
git commit --amend --no-edit
git push --force-with-lease

The rest of the PR stays untouched. Once those three files are back to main, I'll do another pass and merge.

@kabaka9527

Copy link
Copy Markdown
Contributor Author

now?

@esengine

esengine commented May 8, 2026

Copy link
Copy Markdown
Owner

The three files are byte-identical to main now — that part is sorted, thanks for the fast turnaround.

One last thing before merge: a few i18n PRs landed on main after you last synced (#447 / #448 / the dashboard i18n batch), so the PR is currently CONFLICTING. The conflicts are in three files you also modified:

  • dashboard/src/i18n/en.ts
  • dashboard/src/i18n/zh-CN.ts
  • src/cli/ui/slash/handlers/semantic.ts

Merge main in once more and resolve those (should be small on both sides — mostly adjacent string additions), then I'll do the final review and merge.

git fetch upstream main
git merge upstream/main
# resolve the three conflicts
git push

@kabaka9527

Copy link
Copy Markdown
Contributor Author

The three files are byte-identical to main now — that part is sorted, thanks for the fast turnaround.

One last thing before merge: a few i18n PRs landed on main after you last synced (#447 / #448 / the dashboard i18n batch), so the PR is currently CONFLICTING. The conflicts are in three files you also modified:

  • dashboard/src/i18n/en.ts
  • dashboard/src/i18n/zh-CN.ts
  • src/cli/ui/slash/handlers/semantic.ts

Merge main in once more and resolve those (should be small on both sides — mostly adjacent string additions), then I'll do the final review and merge.

git fetch upstream main
git merge upstream/main
# resolve the three conflicts
git push

now ?

Keep the EmbeddingProvider import added by this PR; auto-merge handled
the two dashboard i18n files (adjacent string additions on both sides).
@esengine

esengine commented May 8, 2026

Copy link
Copy Markdown
Owner

Took the liberty of doing the merge myself since maintainerCanModify is on — your last push had the right diff but wasn't a true merge commit (single parent), so GitHub kept flagging it CONFLICTING.

What's now on your main:

  • Real merge commit (a614307) with two parents — your tip 90c2f13 + current upstream main f9a1d09
  • One conflict resolved: src/cli/ui/slash/handlers/semantic.ts — kept the import type { EmbeddingProvider } from "@/config.js" line your PR added (it's used by IndexSummary and readIndexMeta further down)
  • Two dashboard i18n files auto-merged (adjacent string additions on both sides)

Ran npm run verify locally — all 2320 tests pass. Once CI finishes I'll squash-merge.

Thanks for sticking with this through the rebase churn.

@esengine esengine merged commit a9471ae into esengine:main May 8, 2026
3 checks passed
This was referenced May 8, 2026
esengine pushed a commit that referenced this pull request May 9, 2026
Closes #449

- Theme runtime via useColor() hook + ThemeProvider context
- Built-in themes: default, dark, light, tokyo-night, github-dark, github-light, plus auto/high-contrast
- Persisted via config: theme.name, with auto resolving against terminal background
- /theme slash command (advanced group) with arg completer

Merged through #453 slash refactor (theme placed in advanced group) and #424 semantic config additions.
ChasLui pushed a commit to ChasLui/DeepSeek-Reasonix that referenced this pull request May 23, 2026
Configurable API URL / key / model / request body for embeddings, replacing the Ollama-only setup. Adds a provider abstraction in src/index/semantic/embedding.ts, index identity check + abort wiring through the builder, API-key redaction in dashboard/status output, and en-US + zh-CN strings for the new provider UI.
ChasLui pushed a commit to ChasLui/DeepSeek-Reasonix that referenced this pull request May 23, 2026
Closes esengine#449

- Theme runtime via useColor() hook + ThemeProvider context
- Built-in themes: default, dark, light, tokyo-night, github-dark, github-light, plus auto/high-contrast
- Persisted via config: theme.name, with auto resolving against terminal background
- /theme slash command (advanced group) with arg completer

Merged through esengine#453 slash refactor (theme placed in advanced group) and esengine#424 semantic config additions.
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.

3 participants