Skip to content

Fix: Remove the empty response field from the retrieval operator. - #18963

Merged
wangq8 merged 2 commits into
infiniflow:mainfrom
cike8899:fix-multi-chat
Aug 28, 2026
Merged

wangq8 merged 2 commits into
infiniflow:mainfrom
cike8899:fix-multi-chat

Conversation

@cike8899

Copy link
Copy Markdown
Contributor

Summary

Fix: Remove the empty response field from the retrieval operator.

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Aug 28, 2026
@cike8899
cike8899 requested a review from wangq8 August 28, 2026 06:15
@cike8899 cike8899 added the ci Continue Integration label Aug 28, 2026
@cike8899
cike8899 marked this pull request as draft August 28, 2026 06:15
@cike8899
cike8899 marked this pull request as ready for review August 28, 2026 06:15
@dosubot dosubot Bot added 🐞 bug Something isn't working, pull request that fix bug. 🧰 typescript Pull requests that update Typescript code labels Aug 28, 2026
@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1e2a22b5-2454-4077-b31e-c64211b5e92c

📥 Commits

Reviewing files that changed from the base of the PR and between 29af552 and ac79068.

📒 Files selected for processing (4)
  • web/src/interfaces/database/agent.ts
  • web/src/pages/agent/constant/index.tsx
  • web/src/pages/agent/form/retrieval-form/next.tsx
  • web/src/pages/agent/form/tool-form/retrieval-form/index.tsx
💤 Files with no reviewable changes (3)
  • web/src/pages/agent/constant/index.tsx
  • web/src/interfaces/database/agent.ts
  • web/src/pages/agent/form/tool-form/retrieval-form/index.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The retrieval configuration no longer supports empty_response. The interface, default values, validation schema, and retrieval form components were updated accordingly.

Changes

Retrieval empty response removal

Layer / File(s) Summary
Update retrieval contract and defaults
web/src/interfaces/database/agent.ts, web/src/pages/agent/constant/index.tsx
The retrieval interface and initial values no longer include empty_response.
Remove retrieval form field
web/src/pages/agent/form/retrieval-form/next.tsx, web/src/pages/agent/form/tool-form/retrieval-form/index.tsx
The schema, textarea component, imports, and advanced settings rendering no longer include empty_response.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: 🔵 Low · up to ac790

The retrieval form no longer exposes or validates empty_response, while existing saved configurations can still cause the API to return that legacy response when retrieval is empty. This creates bounded configuration-history-dependent behavior that should have an explicit compatibility or migration policy, but the change remains mergeable with owner awareness.

Suggested reviewers: wangq8

Poem

A rabbit found a field to spare
And swept its traces from the form with care
The schema shed one empty name
The defaults followed just the same
Clean fields now hop through every frame

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: removing the empty response field from the retrieval operator.
Description check ✅ Passed The description includes the required Summary heading and states the purpose of the pull request. It does not provide background context, but the description is sufficiently complete for this small ch…
Full details: Description check

Explanation

The description includes the required Summary heading and states the purpose of the pull request. It does not provide background context, but the description is sufficiently complete for this small change.

  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cike8899
cike8899 marked this pull request as draft August 28, 2026 06:16
@cike8899
cike8899 marked this pull request as ready for review August 28, 2026 06:16
@cike8899 cike8899 added ci Continue Integration and removed ci Continue Integration labels Aug 28, 2026

@wangq8 wangq8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is an AI review comment.

The change is small and clean, but I want to flag that the backend still fully supports empty_response for the retrieval operator, so removing it only from the frontend has functional consequences:

  1. Feature becomes unreachable but still live. internal/agent/component/universe_a_wrappers.go still parses params["empty_response"] into retrievalParams.EmptyResponse and applies it as a node-level default; internal/agent/tool/retrieval.go uses args.EmptyResponse as the fallback output when retrieval returns nothing (around lines 163/172/249/291-292); internal/agent/tool/registry.go still validates it as a string param. So this removes the UI, not the behavior.

  2. Silent data loss on re-save. Because RetrievalPartialSchema and initialRetrievalValues no longer include empty_response, an existing canvas whose Retrieval node already has empty_response set will silently drop that value the next time the node is edited/saved (zod strips unknown keys). Users won't get any warning that their configured fallback text is gone.

Please confirm this is an intentional deprecation. If so, I'd suggest:

  • a stated deprecation plan (ideally removing/neutralizing the backend handling in a follow-up, or keeping it only for backward compat on existing DSLs), and/or
  • a migration or note so existing canvases don't silently lose the value.

If it's not intentional, the field should stay in the form until the backend behavior is removed too.

This is an AI review comment.

@wangq8
wangq8 merged commit 458cbfa into infiniflow:main Aug 28, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:M This PR changes 30-99 lines, ignoring generated files. 🧰 typescript Pull requests that update Typescript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants