Skip to content

Commit 85710d2

Browse files
authored
Clarify paths in prompting for omnibot (commontoolsinc#2096)
* Clarify paths in prompting for omnibot * Avoid the word 'handle'
1 parent a0621c0 commit 85710d2

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

packages/patterns/omnibox-fab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export default recipe<OmniboxFABInput>(
9595
},
9696
createLink: {
9797
description:
98-
"Create a link between two charm cells. Use paths like 'CharmName/result/value' or 'CharmName/input/field'. Creates a bidirectional binding where changes to the source are reflected in the target.",
98+
"Create a link between two charm cells. Use paths like 'CharmName/result/value' or 'CharmName/input/field' to choose between result and input cell links. This ONLY applies to this tool. Creates a bidirectional binding where changes to the source are reflected in the target.",
9999
handler: linkTool({ mentionable }),
100100
},
101101
},

packages/runner/src/builtins/llm-dialog.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ const READ_INPUT_SCHEMA: JSONSchema = {
504504
path: {
505505
type: "string",
506506
description:
507-
"Target path in the form handle/child/grandchild (e.g., /of:bafyabc123/result/content).",
507+
"Target path in the form path/child/grandchild (e.g., /of:bafyabc123/content).",
508508
},
509509
},
510510
required: ["path"],
@@ -517,7 +517,7 @@ const RUN_INPUT_SCHEMA: JSONSchema = {
517517
path: {
518518
type: "string",
519519
description:
520-
"Target handler path in the form handle/handler/path (e.g., /of:bafyabc123/handlers/doThing).",
520+
"Target handler path in the form /of:bafyabc123/path/.../doThing.",
521521
},
522522
args: {
523523
type: "object",
@@ -551,8 +551,7 @@ const NAVIGATE_TO_INPUT_SCHEMA: JSONSchema = {
551551
properties: {
552552
path: {
553553
type: "string",
554-
description:
555-
"Target path to navigate to in the form handle/path (e.g., /of:bafyabc123/result).",
554+
description: "Target path to navigate to in the form /of:bafyabc123.",
556555
},
557556
},
558557
required: ["path"],
@@ -565,7 +564,7 @@ const ADD_ATTACHMENT_INPUT_SCHEMA: JSONSchema = {
565564
path: {
566565
type: "string",
567566
description:
568-
"Link to attach (e.g., /of:bafyabc123 or /of:bafyabc123/result).",
567+
"Link to attach (e.g., /of:bafyabc123 or /of:bafyabc123/test/value).",
569568
},
570569
name: {
571570
type: "string",
@@ -593,7 +592,7 @@ const REMOVE_ATTACHMENT_INPUT_SCHEMA: JSONSchema = {
593592
* Attachments are links of interest that the LLM can add/remove as a scratchpad.
594593
*/
595594
type Attachment = {
596-
path: string; // e.g., "/of:bafyabc123" or "/of:bafyabc123/result"
595+
path: string; // e.g., "/of:bafyabc123" or "/of:bafyabc123"
597596
name: string; // Human-readable name for display
598597
};
599598

@@ -696,19 +695,19 @@ function flattenTools(
696695

697696
flattened[READ_TOOL_NAME] = {
698697
description: "Read data from ANY charm using a handle path like " +
699-
'"/of:bafyabc123/result/path". ' + availability,
698+
'"/of:bafyabc123/path". ' + availability,
700699
inputSchema: READ_INPUT_SCHEMA,
701700
};
702701
flattened[RUN_TOOL_NAME] = {
703702
description: "Invoke a handler on ANY charm. Provide the handle " +
704-
'path like "/of:bafyabc123/handlers/doThing" plus args if required. ' +
703+
'path like "/of:bafyabc123/doThing" plus args if required. ' +
705704
availability,
706705
inputSchema: RUN_INPUT_SCHEMA,
707706
};
708707
flattened[NAVIGATE_TO_TOOL_NAME] = {
709708
description:
710709
"Navigate to ANY charm or path. Provide the handle path like " +
711-
'"of:bafyabc123" or "of:bafyabc123/result".',
710+
'"of:bafyabc123" or "of:bafyabc123/test/value".',
712711
inputSchema: NAVIGATE_TO_INPUT_SCHEMA,
713712
};
714713
flattened[ADD_ATTACHMENT_TOOL_NAME] = {
@@ -837,20 +836,20 @@ function buildToolCatalog(
837836

838837
llmTools[READ_TOOL_NAME] = {
839838
description: "Read data from ANY charm using a handle path like " +
840-
'"/of:bafyabc123/result/path". Works with any valid handle, not just attached charms. ' +
839+
'"/of:bafyabc123/path". Works with any valid handle, not just attached charms. ' +
841840
availability,
842841
inputSchema: READ_INPUT_SCHEMA,
843842
};
844843
llmTools[RUN_TOOL_NAME] = {
845844
description: "Run a handler on ANY charm. Provide the handle path like " +
846-
'"/of:bafyabc123/handlers/doThing" and optionally args. Works with any valid handle. ' +
845+
'"/of:bafyabc123/doThing" and optionally args. Works with any valid handle. ' +
847846
availability,
848847
inputSchema: RUN_INPUT_SCHEMA,
849848
};
850849
llmTools[NAVIGATE_TO_TOOL_NAME] = {
851850
description:
852851
"Navigate to ANY charm or path. Provide the handle path like " +
853-
'"/of:bafyabc123" or "/of:bafyabc123/result". Works with any valid handle. ' +
852+
'"/of:bafyabc123" or "/of:bafyabc123". Works with any valid handle. ' +
854853
availability,
855854
inputSchema: NAVIGATE_TO_INPUT_SCHEMA,
856855
};

0 commit comments

Comments
 (0)