assistant-ui icon indicating copy to clipboard operation
assistant-ui copied to clipboard

chore(docs): add page for `makeAssistantToolUI`

Open AVGVSTVS96 opened this issue 6 months ago • 15 comments

Testing Google's Jules Agent, it's available for free!

This commit introduces a new documentation page for the makeAssistantToolUI utility.

The page includes:

  • An explanation of the utility's purpose.
  • Usage examples demonstrating how to register a tool UI.
  • API documentation for makeAssistantToolUI, detailing its parameters and return value, using the custom ParametersTable component for clarity.
  • An example illustrating how to display different UI elements based on tool execution status.

This new documentation page is located in the "Copilots" section.


[!IMPORTANT] Adds documentation for makeAssistantToolUI utility, including usage, API, and examples, and updates meta.json.

  • Documentation:
    • Adds make-assistant-tool-ui.mdx to document makeAssistantToolUI utility.
    • Includes purpose, usage examples, API details, and a status-based UI example.
    • Uses ParametersTable for parameter clarity.
  • Meta Update:
    • Updates meta.json to include make-assistant-tool-ui in the Copilots section.

This description was created by Ellipsis for d64f01c50389e0524233fb6e5a96aa07bf5957cc. You can customize this summary. It will automatically update as commits are pushed.

AVGVSTVS96 avatar May 25 '25 01:05 AVGVSTVS96

Bug Report

Name Severity Example test case Description
Incorrect component path in Example Low Examine the example code provided in the make-assistant-tool-ui.mdx file. The example code imports AssistantRuntimeProvider from "assistant-ui/react/providers". It should be imported directly from "assistant-ui/react".

Comments? Email us.

jazzberry-ai[bot] avatar May 25 '25 01:05 jazzberry-ai[bot]

⚠️ No Changeset found

Latest commit: 6aa6a289d803580b866c381b22fbfd0f3726e38c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar May 25 '25 01:05 changeset-bot[bot]

@google-labs-jules[bot] is attempting to deploy a commit to the assistant-ui Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar May 25 '25 01:05 vercel[bot]

✅ No documentation updates required.

promptless[bot] avatar May 25 '25 01:05 promptless[bot]

Walkthrough

A new documentation file, make-assistant-tool-ui.mdx, has been added to provide reference material and usage examples for the makeAssistantToolUI utility, which registers tool UI components within the Assistant framework. The documentation details the function's API, usage with configuration objects, and includes an extended example demonstrating UI rendering based on tool execution status. Additionally, the documentation navigation configuration was updated by adding the "make-assistant-tool-ui" page identifier to the "pages" array in the copilots/meta.json file, integrating the new documentation page into the structure. The TypeScript configuration for the packages/react package was updated to specify the root directory as src. No changes were made to exported or public entity declarations in the codebase.


📜 Recent review details

Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6aa6a289d803580b866c381b22fbfd0f3726e38c and af27e7b9557e95890d8eacf812cad5804ab6126f.

📒 Files selected for processing (1)
  • packages/react/tsconfig.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/react/tsconfig.json

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar May 25 '25 01:05 coderabbitai[bot]

Bug Report

Name Severity Example test case Description
Incorrect import path for AssistantRuntimeProvider Medium Check the example code in the makeAssistantToolUI documentation page. The example code uses the incorrect import path assistant-ui/react/providers for AssistantRuntimeProvider. It should be @assistant-ui/react/providers.

Comments? Email us.

jazzberry-ai[bot] avatar May 25 '25 01:05 jazzberry-ai[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
assistant-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 25, 2025 4:07pm

vercel[bot] avatar May 25 '25 01:05 vercel[bot]

Bug Report

Name Severity Example test case Description
Incorrect import path in documentation High View the documentation for makeAssistantToolUI The documentation for makeAssistantToolUI incorrectly specifies the import path as "assistant-ui/". The correct import path is @assistant-ui/react.

Comments? Email us.

jazzberry-ai[bot] avatar May 25 '25 01:05 jazzberry-ai[bot]

Bug Report

Name Severity Example test case Description
Incorrect import paths in makeAssistantToolUI.mdx High Attempt to build the documentation. The documentation incorrectly imports makeAssistantToolUI and AssistantRuntimeProvider from "assistant-ui/" instead of their correct paths ("assistant-ui/react" and "assistant-ui/react/providers", respectively). This will lead to build errors or broken examples.

Comments? Email us.

jazzberry-ai[bot] avatar May 25 '25 03:05 jazzberry-ai[bot]

Bug Report

Name Severity Example test case Description
Incorrect import path for makeAssistantToolUI High Check the import path in the makeAssistantToolUI documentation. The documentation states the import path should be "assistant-ui/react", but it should be "@assistant-ui/react".
Incorrect import path for AssistantRuntimeProvider High Check the import path in the makeAssistantToolUI documentation. The documentation imports AssistantRuntimeProvider from "assistant-ui/react/providers", but it should be "@assistant-ui/react/providers".

Comments? Email us.

jazzberry-ai[bot] avatar May 25 '25 03:05 jazzberry-ai[bot]

An error occured.

This error may be due to rate limits. If this error persists, please email us.

jazzberry-ai[bot] avatar May 25 '25 14:05 jazzberry-ai[bot]

Bug Report

Name Severity Example test case Description
Cannot find module 'assistant-ui/react' Medium Run npx ts-node -e 'import { makeAssistantToolUI } from "assistant-ui/react";' The ts-node command cannot resolve the assistant-ui/react module, even though the files exist in the file system. This could be due to incorrect tsconfig.json settings or other configuration issues.

Comments? Email us.

jazzberry-ai[bot] avatar May 25 '25 14:05 jazzberry-ai[bot]

Review Summary

Skipped posting 1 drafted comments based on your review threshold. Feel free to update them here.

Draft Comments
apps/docs/content/docs/copilots/make-assistant-tool-ui.mdx:16-21
The `render` function example in the usage section is missing proper indentation for its body, which could confuse readers about the correct syntax.

Scores:

  • Production Impact: 1
  • Fix Specificity: 5
  • Urgency Impact: 2
  • Total Score: 8

Reason for filtering: The comment addresses a code formatting issue that doesn't violate any of the strict rules. It's a simple indentation fix in documentation that improves readability.

Analysis: This is a simple indentation fix in documentation code example. While the fix is very specific and clear (5), it has minimal production impact (1) as it's just a documentation formatting issue. The urgency is low (2) as incorrect indentation in docs is not critical. With a total score of 8, this falls below the threshold of 13 and should be filtered out.

Bug Report

Name Severity Example test case Description
makeAssistantToolUI UI Update Issue Medium Create a tool with a UI displaying a config setting. Change the setting and observe the UI doesn't update. The makeAssistantToolUI utility does not provide a mechanism for dynamically updating the tool UI. Changes to the tool prop are not reflected, leading to stale UIs.

Comments? Email us.

jazzberry-ai[bot] avatar May 25 '25 15:05 jazzberry-ai[bot]

Bug Report

Name|Severity|Example test case|Description Mismatched tool name in makeAssistantToolUI can lead to UI not being rendered.|Medium|1. Define a tool in the assistant with the name "real_tool". 2. Create a UI component using makeAssistantToolUI with toolName: "wrong_tool". 3. Render the UI component within the AssistantRuntimeProvider. 4. Execute the "real_tool" in the assistant. 5. Observe that the UI component defined for "wrong_tool" is not displayed or updated.|The makeAssistantToolUI function relies on the toolName property to match the tool defined in the assistant. If the names do not match, the UI component will not be correctly associated with the tool, and the render function will not be called when the tool is executed. This can lead to a broken or non-functional user experience.

Comments? Email us.

jazzberry-ai[bot] avatar May 25 '25 16:05 jazzberry-ai[bot]