Skip to content

OBSINTA-1383: send available tool UI IDs in chat request#2058

Open
tremes wants to merge 1 commit into
openshift:mainfrom
tremes:available-ui-tools
Open

OBSINTA-1383: send available tool UI IDs in chat request#2058
tremes wants to merge 1 commit into
openshift:mainfrom
tremes:available-ui-tools

Conversation

@tremes

@tremes tremes commented Jun 11, 2026

Copy link
Copy Markdown

Include the list of available tool UI IDs in the OLS API request payload, resolved via the useToolUIMapping hook.

Assisted-by: Claude Code:claude-opus-4-6

Summary by CodeRabbit

  • Refactor
    • Improved tool UI availability tracking by integrating tool UI mapping logic into the prompt component. The component now dynamically determines available tools and communicates this information more efficiently to the backend.

Include the list of available tool UI IDs in the OLS API
request payload, resolved via the useToolUIMapping hook.

Signed-off-by: Tomáš Remeš <tremes@redhat.com>
Assisted-by: Claude Code:claude-opus-4-6
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 11, 2026
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 11, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 11, 2026

Copy link
Copy Markdown

@tremes: This pull request references OBSINTA-1383 which is a valid jira issue.

Details

In response to this:

Include the list of available tool UI IDs in the OLS API request payload, resolved via the useToolUIMapping hook.

Assisted-by: Claude Code:claude-opus-4-6

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: aa9d6080-e0bf-4b15-9844-37dcd34d5229

📥 Commits

Reviewing files that changed from the base of the PR and between 11b9c99 and 1694c5d.

📒 Files selected for processing (1)
  • src/components/Prompt.tsx

📝 Walkthrough

Walkthrough

Prompt component now integrates tool UI availability from a useToolUIMapping hook. It computes available tool UI IDs via useMemo, conditionally includes them in the streaming request payload when tool data is resolved, and updates the onSubmit dependency list accordingly.

Changes

Tool UI Availability Integration

Layer / File(s) Summary
Hook import and ID computation
src/components/Prompt.tsx
Added useToolUIMapping hook import. Component now calls the hook to obtain tool UI mapping and resolution state, then derives availableToolUIIDs from mapping keys using useMemo.
Request payload and dependency updates
src/components/Prompt.tsx
Streaming request JSON payload now conditionally includes available_tool_ui_ids field when toolUIResolved is true. Updated onSubmit callback dependency list to include availableToolUIIDs and toolUIResolved.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A hook arrives with IDs so fine,
Tool UIs now align,
When payloads flow and deps stay true,
The prompt knows what to do!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately reflects the main change: sending available tool UI IDs in chat requests, which aligns with the file modifications in Prompt.tsx.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed due to a network error.


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 and usage tips.

@openshift-ci

openshift-ci Bot commented Jun 11, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign xrajesh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tremes tremes marked this pull request as ready for review June 12, 2026 08:33
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 12, 2026
@openshift-ci openshift-ci Bot requested review from joshuawilson and syedriko June 12, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants