mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-18 21:31:46 +00:00
chore: remove debug console.log statements from agent tool implementations (evaluateInEngine262, graphExplorer, searchSpecSections)
This commit is contained in:
@@ -45,8 +45,6 @@ export function createEvaluateInEngine262Tool() {
|
|||||||
"Executes JavaScript code in the engine262 JavaScript engine and captures which ECMAScript specification sections are hit during execution. Returns the full marks array as JSON. Useful for understanding how specific JavaScript operations map to the ECMAScript spec.",
|
"Executes JavaScript code in the engine262 JavaScript engine and captures which ECMAScript specification sections are hit during execution. Returns the full marks array as JSON. Useful for understanding how specific JavaScript operations map to the ECMAScript spec.",
|
||||||
schema: evaluateSchema,
|
schema: evaluateSchema,
|
||||||
func: async ({ code }) => {
|
func: async ({ code }) => {
|
||||||
console.log(`[Tool: ask262_evaluate_in_engine262] Executing code...`);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const engine = await loadEngine262();
|
const engine = await loadEngine262();
|
||||||
const ask262Debug = engine.ask262Debug as {
|
const ask262Debug = engine.ask262Debug as {
|
||||||
@@ -129,10 +127,6 @@ export function createEvaluateInEngine262Tool() {
|
|||||||
// Get captured marks
|
// Get captured marks
|
||||||
const marks = ask262Debug.marks;
|
const marks = ask262Debug.marks;
|
||||||
|
|
||||||
console.log(
|
|
||||||
`[Tool: ask262_evaluate_in_engine262] Captured ${marks.length} unique marks`,
|
|
||||||
);
|
|
||||||
|
|
||||||
// Filter and group marks by important flag
|
// Filter and group marks by important flag
|
||||||
const importantMarks = marks.filter((m) => m.important);
|
const importantMarks = marks.filter((m) => m.important);
|
||||||
const otherMarks = marks.filter((m) => !m.important);
|
const otherMarks = marks.filter((m) => !m.important);
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ export function createGraphExplorerTool(graph: Graph) {
|
|||||||
"Explores structural relationships between specification sections and implementation code (functions). Use this to find which spec section a function implements.",
|
"Explores structural relationships between specification sections and implementation code (functions). Use this to find which spec section a function implements.",
|
||||||
schema: graphExplorerSchema,
|
schema: graphExplorerSchema,
|
||||||
func: async ({ query }) => {
|
func: async ({ query }) => {
|
||||||
console.log(`[Tool: ask262_graph_explorer] Querying for: ${query}`);
|
|
||||||
|
|
||||||
let nodeId = query;
|
let nodeId = query;
|
||||||
if (!graph.hasNode(nodeId)) {
|
if (!graph.hasNode(nodeId)) {
|
||||||
if (graph.hasNode(`func-${query}`)) {
|
if (graph.hasNode(`func-${query}`)) {
|
||||||
|
|||||||
@@ -36,10 +36,6 @@ export function createSearchSpecSectionsTool(
|
|||||||
// Search using LanceDB directly, limit to top 5 results
|
// Search using LanceDB directly, limit to top 5 results
|
||||||
const results = await table.search(queryVector).limit(5).toArray();
|
const results = await table.search(queryVector).limit(5).toArray();
|
||||||
|
|
||||||
console.log(
|
|
||||||
`[ask262_search_spec_sections] Query: "${query.slice(0, 50)}..." - Fetched ${results.length} results`,
|
|
||||||
);
|
|
||||||
|
|
||||||
// Return documents with metadata as JSON
|
// Return documents with metadata as JSON
|
||||||
const output = results.map((r: Record<string, unknown>) => ({
|
const output = results.map((r: Record<string, unknown>) => ({
|
||||||
sectionId: String(r.sectionid || "unknown"),
|
sectionId: String(r.sectionid || "unknown"),
|
||||||
|
|||||||
Reference in New Issue
Block a user