import {
  WARP_GREP_DESCRIPTION,
  WARP_GREP_TOOL_NAME
} from "../../chunk-KW7OEGZK.js";
import {
  executeToolCall,
  formatResult
} from "../../chunk-ELZ7YZDN.js";
import "../../chunk-PUGSTXLO.js";
import "../../chunk-OO7ZYRV6.js";
import "../../chunk-KRDIR7GG.js";
import "../../chunk-APP75CBN.js";
import "../../chunk-SNGGSPYJ.js";
import {
  getSystemPrompt
} from "../../chunk-FMLHRJDF.js";
import "../../chunk-4KMBU6T3.js";
import "../../chunk-G2RSY56Q.js";
import "../../chunk-YPKNMYD4.js";
import "../../chunk-TPP2UGQP.js";
import "../../chunk-5PNMAWLC.js";
import "../../chunk-PZ5AY32C.js";

// tools/warp_grep/gemini.ts
var TOOL_PARAMETERS = {
  type: "OBJECT",
  properties: {
    query: {
      type: "STRING",
      description: "Free-form repository question"
    }
  },
  required: ["query"]
};
var warpGrepFunctionDeclaration = {
  name: WARP_GREP_TOOL_NAME,
  description: WARP_GREP_DESCRIPTION,
  parameters: TOOL_PARAMETERS
};
async function execute(input, config) {
  return executeToolCall(input, config);
}
function createWarpGrepTool(config) {
  const declaration = {
    name: config.name ?? WARP_GREP_TOOL_NAME,
    description: config.description ?? WARP_GREP_DESCRIPTION,
    parameters: TOOL_PARAMETERS
  };
  return Object.assign(declaration, {
    execute: async (input) => {
      return executeToolCall(input, config);
    },
    formatResult: (result) => {
      return formatResult(result);
    },
    getSystemPrompt: () => {
      return getSystemPrompt();
    }
  });
}
var createMorphWarpGrepTool = createWarpGrepTool;
var gemini_default = warpGrepFunctionDeclaration;
export {
  createMorphWarpGrepTool,
  createWarpGrepTool,
  gemini_default as default,
  execute,
  formatResult,
  getSystemPrompt,
  warpGrepFunctionDeclaration
};
//# sourceMappingURL=gemini.js.map