Skip to content

feat(agent): add Querit Agent tool UI - #4

Merged
ethan7zhanghx merged 2 commits into
feat/querit-search-toolfrom
feat/querit-agent-ui
Jul 28, 2026
Merged

ethan7zhanghx merged 2 commits into
feat/querit-search-toolfrom
feat/querit-agent-ui

Conversation

@ethan7zhanghx

@ethan7zhanghx ethan7zhanghx commented Jul 27, 2026 •

Copy link
Copy Markdown

Summary

Add Querit as an embedded Agent search tool, reuse the Canvas field contract, redact API keys from exported DSL, and display Querit consistently in Agent menus, nodes, and timelines.

The official Querit transparent PNG logo from the provided brand package is included and verified at the actual Agent UI icon sizes.

What changed

  • Register QueritSearch in the Agent Search Tools menu and embedded tool-form map.
  • Reuse the existing Querit form widgets without a query field; the Agent model/runtime supplies the query.
  • Add Agent-specific initial values and persistence logic that omit query and outputs.
  • Validate and normalize form values before updating the Agent tool configuration.
  • Rehydrate persisted string arrays into the UI list representation.
  • Redact the Querit API key when exporting Agent DSL without changing unrelated tools.
  • Use the official Querit transparent PNG logo and map Querit consistently in node and timeline displays.
  • Normalize both QueritSearch and querit_search tool names to Operator.QueritSearch.

Agent field contract

Field UI / validation Persisted value Notes
api_key Password input string Stored in the Agent configuration; blanked during DSL export.
count Integer, minimum 1 number Maximum result count.
chunks_per_doc Integer from 1 to 3 number Maximum chunks returned per document.
site_include Repeatable text input Trimmed string[] Empty entries are removed.
site_exclude Repeatable text input Trimmed string[] Empty entries are removed.
time_range Select / text value string Uses the existing Querit field contract.
country_include Repeatable text input Trimmed string[] Empty entries are removed.
country_exclude Repeatable text input Trimmed string[] Empty entries are removed.
language_include Repeatable text input Trimmed string[] Empty entries are removed.
language_exclude Repeatable text input Trimmed string[] Empty entries are removed.

query is deliberately absent from the Agent form and persisted defaults because it is supplied dynamically by the Agent runtime. outputs is also not persisted by the Agent UI.

Validation performed

  • Focused Jest run: 7 suites, 38 tests passed.
  • Targeted ESLint: passed for all changed TypeScript/TSX files.
  • Targeted Prettier and git diff --check: passed.
  • Production frontend build on ARM: 14,208 modules built successfully in 34m 43s.
  • Browser verification against production assets and the actual Querit form components:
    • no browser console errors or warnings;
    • no Query field rendered;
    • valid numeric and list values persisted in normalized form;
    • invalid values displayed validation errors and did not overwrite the last valid configuration;
    • official logo loaded from the production bundle at its original 499 × 472 resolution;
    • official logo rendered without clipping or distortion at 16px, 20px, and 24px on light and dark backgrounds.

Known validation boundaries

  • The repository-wide TypeScript check still reports existing baseline errors. Filtering its output to changed paths found no new Querit errors; the only matching error is the pre-existing unused destructuring warning at tool-command.tsx:113.
  • Full RAGFlow backend end-to-end verification is deferred because this ARM machine cannot run the supported RAGFlow image. The frontend production build, unit tests, and isolated browser interaction checks are complete.
  • Final runtime schema/invocation verification will be repeated after the separately developed Go implementation is merged.

@ethan7zhanghx
ethan7zhanghx marked this pull request as ready for review July 28, 2026 02:52
@ethan7zhanghx
ethan7zhanghx merged commit c795dd0 into feat/querit-search-tool Jul 28, 2026
ethan7zhanghx pushed a commit that referenced this pull request Aug 7, 2026
…17937)

Collapses three duplicated/dead code smells in the canvas debug-result
path of `internal/ingestion/task` (remaining findings #2/#3/#4 from the
package CTO review):

- **#2 — vector-key stripping duplication.** `isVectorKey` (the full
stripper: fixed legacy keys `vector`/`embedding`/`feature`/`q_vec` plus
the `q_<dim>_vec` pattern) was re-implemented as a weaker inline copy in
the golden-compare tool (`tool/compare_pipeline_golden.go`) that only
matched `q_<dim>_vec` and let real vectors leak into the diff. Exported
as `IsVectorKey` and reused by the tool.
- **#3 — near-duplicate deep copy.** `deepCopy` and `deepCopyStrip` were
identical walkers differing only in vector stripping. Parameterized
`deepCopy(v any, stripVector bool) any` and deleted `deepCopyStrip`.
- **#4 — redundant switch.** `lookupComponentOutput` had two switch
cases with identical bodies (both the `map[string]map[string]any` and
`map[string]any` state shapes). Unified into a single `found`/`ok`
resolution; nested-state and flat-fallback semantics unchanged.
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.

1 participant