-
Couldn't load subscription status.
- Fork 5.5k
Applying MCP annotations to TS components - batch 2/2 #18668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,12 @@ export default defineAction({ | |
| name: "Create Run", | ||
| description: `Create a run [See docs here](${DOCS.createRun})`, | ||
| key: "practitest-create-run", | ||
| version: "0.0.1", | ||
| version: "0.0.2", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
|
Comment on lines
+13
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major 🧩 Analysis chainLGTM! Annotations appropriately describe a create operation. The annotations correctly characterize this action:
To ensure consistency across the PR, consider verifying that similar operations have similar annotation values. Run the following script to check for any inconsistencies: 🏁 Script executed: #!/bin/bash
# Description: Check annotation patterns across all modified action files
# Find all actions with annotations and group by operation type
echo "=== Create/Import actions with annotations ==="
rg -A3 'name:.*"(Create|Import)' --type=ts -g '**/actions/**/*.ts' | rg -A3 'annotations:'
echo -e "\n=== Delete actions with annotations ==="
rg -A3 'name:.*"Delete' --type=ts -g '**/actions/**/*.ts' | rg -A3 'annotations:'
echo -e "\n=== Get/List/Retrieve/Search actions with annotations ==="
rg -A3 'name:.*"(Get|List|Retrieve|Search)' --type=ts -g '**/actions/**/*.ts' | rg -A3 'annotations:'Length of output: 7738 Align annotation usage across actions 🤖 Prompt for AI Agents |
||
| type: "action", | ||
| props: { | ||
| practitest, | ||
|
|
@@ -113,7 +118,9 @@ export default defineAction({ | |
| }; | ||
| } catch (err) { | ||
| throw new ConfigurationError( | ||
| `**JSON parse error** - check if the \`${prop}\` prop is a valid JSON-stringified object`, | ||
| `**JSON parse error** - check if the \`${prop}\` prop is a valid JSON-stringified object | ||
|
|
||
| \`${err.message}\``, | ||
| ); | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional
idproperty could be undefined.The type annotation
{ id?: string }marksidas optional, but the code accessespickupResponse.idanddropoffResponse.idon lines 339, 343, 350, and 354 without null checks. If the API returns a response without anid, this will cause the string interpolations to display "undefined".Consider either:
idrequired if the API always returns it:summary = `A new pickup task with id ${pickupResponse.id} was successfully created, then a new dropff task with id ${dropoffResponse.id} was successfully created!`;Should handle the case where
idmight be undefined.📝 Committable suggestion
🤖 Prompt for AI Agents