You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 20de84f
Browse filesBrowse the repository at this point in the historyBrowse files
Refactor Tool Explorer and View Components for Enhanced Tool Detail Management
- Introduce a new `hasRenderableToolDetails` function to streamline the determination of tool detail availability in the ToolExplorer component.
- Update loading state handling in the ToolExplorer and ToolsView components to improve user experience during data fetching.
- Refactor the display logic for tool details in the ToolDetail component, ensuring accurate representation of input and output hints.
- Enhance memoization strategies in the ToolsView component to optimize performance and reduce unnecessary re-renders.
- Adjust the handling of tool source names and visibility in the ToolsView component for better clarity and organization.
Copy file name to clipboardExpand all lines: executor/packages/core/src/declaration-generation.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -29,8 +29,8 @@ export function generateToolInventory(tools: ToolDescriptor[]): string {
29
29
"You have access to these tool namespaces:",
30
30
` ${namespaces.join(", ")}`,
31
31
"",
32
-
"Prefer one broad lookup over many small ones: use `tools.catalog.namespaces({})` and `tools.catalog.tools({ namespace?, query?, compact: false, depth: 2, limit: 20 })` first.",
33
-
"Then use `tools.discover({ query, depth?, limit?, compact? })` when you need ranking. It returns `{ bestPath, results, total }` (not an array).",
32
+
"Prefer one broad lookup over many small ones: use `tools.catalog.namespaces({})` and `tools.catalog.tools({ namespace?, query?, depth: 2, limit: 20 })` first.",
33
+
"Then use `tools.discover({ query, depth?, limit? })` when you need ranking. It returns `{ bestPath, results, total }` (not an array).",
34
34
"Prefer `bestPath` when present; each result includes `{ path, input, output }` to help you form a correct call.",
35
35
"For migration/ETL tasks: discover once, then execute in small batches and return compact summaries (counts, IDs, top-N samples).",
36
36
"Never shadow the global `tools` object (do NOT write `const tools = ...`).",
constdiscoverNote="\n\nTooling tip: avoid repeated tiny discovery calls. Start with a single broad inventory pass via `tools.catalog.namespaces({})` and `tools.catalog.tools({ namespace?, query?, compact: true, depth: 1, limit: 20 })`, then do at most one focused `tools.discover({ query, compact: true, depth: 1, limit: 12 })`. If you still need full signatures for a final pick, rerun only that shortlist with `compact: false`. `discover` returns `{ bestPath, results, schemas?, total }`; prefer `bestPath` when present, otherwise copy `results[i].exampleCall`. Do not assign to `const tools = ...`; use a different variable name (e.g. `const discovered = ...`).";
58
+
constdiscoverNote="\n\nTooling tip: avoid repeated tiny discovery calls. Start with a single broad inventory pass via `tools.catalog.namespaces({})` and `tools.catalog.tools({ namespace?, query?, depth: 1, limit: 20 })`, then do at most one focused `tools.discover({ query, depth: 1, limit: 12 })`. `discover` returns `{ bestPath, results, schemas?, total }`; prefer `bestPath` when present, otherwise copy `results[i].exampleCall`. Do not assign to `const tools = ...`; use a different variable name (e.g. `const discovered = ...`).";
59
59
constexecutionNote="\n\nExecution tip: for migration/ETL-style tasks, discover once, then run in small batches and `return` compact summaries (counts, IDs, and top-N samples) instead of full objects.";
0 commit comments