Skip to content

Conversation

@bfollington
Copy link
Contributor

@bfollington bfollington commented Oct 31, 2025

And fix link handling in tool results


Summary by cubic

Added a translate tool to the Note pattern to translate content to a chosen language, supporting CT-1016’s goal of exposing patterns as tools. Also sanitized tool results to prevent links from being returned.

  • New Features

    • Added translate patternTool with language input; uses LLM to translate the current note content and handles pending/error states.
  • Bug Fixes

    • Sanitized tool return values in llm-dialog via JSON stringify/parse to strip links; retains "OK" when a tool returns no value.

Written for commit 71e04ce. Summary will update automatically on new commits.

And fix link handling in tool results
@linear
Copy link

linear bot commented Oct 31, 2025

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 3 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="packages/patterns/note.tsx">

<violation number="1" location="packages/patterns/note.tsx:189">
Empty translations are treated as errors because the code checks `!result`. Use an explicit null/undefined check so a legitimate empty string is returned to the caller.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

@bfollington bfollington merged commit 4d8707a into main Oct 31, 2025
9 checks passed
@bfollington bfollington deleted the ben/ct-1016-patterntool-for-exposing-patterns-as-tools-with-partial branch October 31, 2025 01:51
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.

2 participants