mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-25 18:55:19 +02:00
remove add webhook tool in billed version
This commit is contained in:
parent
ff9f0ff1fc
commit
d6894c4526
6 changed files with 41 additions and 37 deletions
|
|
@ -541,9 +541,12 @@ export function createTools(
|
|||
} else if (config.isComposio) {
|
||||
tools[toolName] = createComposioTool(logger, usageTracker, config, projectId);
|
||||
toolLogger.log(`✓ created composio tool: ${toolName}`);
|
||||
} else {
|
||||
} else if (config.isWebhook) {
|
||||
tools[toolName] = createWebhookTool(logger, usageTracker, config, projectId);
|
||||
toolLogger.log(`✓ created webhook tool: ${toolName} (fallback)`);
|
||||
} else { // this is for placeholder tools
|
||||
tools[toolName] = createMockTool(logger, usageTracker, config);
|
||||
toolLogger.log(`✓ created mock tool: ${toolName}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ export const USE_CHAT_WIDGET = process.env.USE_CHAT_WIDGET === 'true';
|
|||
export const USE_AUTH = process.env.USE_AUTH === 'true';
|
||||
export const USE_RAG_S3_UPLOADS = process.env.USE_RAG_S3_UPLOADS === 'true';
|
||||
export const USE_GEMINI_FILE_PARSING = process.env.USE_GEMINI_FILE_PARSING === 'true';
|
||||
export const USE_BILLING = process.env.USE_BILLING === 'true';
|
||||
export const USE_BILLING = process.env.NEXT_PUBLIC_USE_BILLING === 'true' || process.env.USE_BILLING === 'true';
|
||||
export const USE_COMPOSIO_TOOLS = process.env.USE_COMPOSIO_TOOLS === 'true';
|
||||
export const USE_KLAVIS_TOOLS = process.env.USE_KLAVIS_TOOLS === 'true';
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ export const WorkflowTool = z.object({
|
|||
mcpServerName: z.string().optional(),
|
||||
isComposio: z.boolean().optional(), // whether this is a Composio tool
|
||||
isLibrary: z.boolean().default(false).optional(), // whether this is a library tool
|
||||
isWebhook: z.boolean().optional(), // whether this is a webhook tool
|
||||
composioData: z.object({
|
||||
slug: z.string(), // the slug for the Composio tool e.g. "GITHUB_CREATE_AN_ISSUE"
|
||||
noAuth: z.boolean(), // whether the tool requires no authentication
|
||||
|
|
|
|||
|
|
@ -175,7 +175,6 @@ export function ToolConfig({
|
|||
const projectId = params.projectId as string;
|
||||
const [selectedParams, setSelectedParams] = useState(new Set([]));
|
||||
const isReadOnly = tool.isMcp || tool.isComposio;
|
||||
const isWebhookTool = !tool.isMcp && !tool.isComposio;
|
||||
const [nameError, setNameError] = useState<string | null>(null);
|
||||
const [showSavedBanner, setShowSavedBanner] = useState(false);
|
||||
const [localToolName, setLocalToolName] = useState(tool.name);
|
||||
|
|
@ -366,7 +365,7 @@ export function ToolConfig({
|
|||
</div>
|
||||
)}
|
||||
{/* Tool Type Section */}
|
||||
<div className="bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-950/30 dark:to-indigo-950/30 border border-blue-200 dark:border-blue-800 rounded-lg p-4">
|
||||
{!tool.isLibrary && <div className="bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-950/30 dark:to-indigo-950/30 border border-blue-200 dark:border-blue-800 rounded-lg p-4">
|
||||
<div className="flex items-start gap-3">
|
||||
<div className="flex-shrink-0 mt-1">
|
||||
{tool.isMcp ? (
|
||||
|
|
@ -381,15 +380,13 @@ export function ToolConfig({
|
|||
<h3 className="text-sm font-semibold text-gray-800 dark:text-gray-200 mb-2">
|
||||
How this tool runs
|
||||
</h3>
|
||||
{tool.isMcp ? (
|
||||
<div className="text-sm text-gray-700 dark:text-gray-300">
|
||||
{tool.isMcp && <div className="text-sm text-gray-700 dark:text-gray-300">
|
||||
<p>This tool is powered by the <span className="font-medium text-blue-700 dark:text-blue-300">{tool.mcpServerName}</span> MCP server.</p>
|
||||
<p className="text-xs text-gray-600 dark:text-gray-400 mt-1">
|
||||
MCP (Model Context Protocol) tools are external services that provide additional capabilities to your agent.
|
||||
</p>
|
||||
</div>
|
||||
) : tool.isComposio ? (
|
||||
<div className="text-sm text-gray-700 dark:text-gray-300">
|
||||
</div>}
|
||||
{ tool.isComposio && <div className="text-sm text-gray-700 dark:text-gray-300">
|
||||
<div className="flex items-center gap-2 mb-1">
|
||||
<p>This tool is powered by <span className="font-medium text-purple-700 dark:text-purple-300">Composio</span></p>
|
||||
{tool.composioData?.toolkitName && (
|
||||
|
|
@ -401,20 +398,21 @@ export function ToolConfig({
|
|||
<p className="text-xs text-gray-600 dark:text-gray-400 mt-1">
|
||||
Composio provides pre-built integrations with popular services and APIs.
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
<div className="text-sm text-gray-700 dark:text-gray-300">
|
||||
</div>}
|
||||
{ tool.isWebhook && <div className="text-sm text-gray-700 dark:text-gray-300">
|
||||
<div className="flex items-center gap-1 mb-1">
|
||||
<p>This tool is invoked using the webhook configured in <Link href={`/projects/${projectId}/config`} className="text-green-600 dark:text-green-400 hover:text-green-700 dark:hover:text-green-300 font-medium underline decoration-green-300 hover:decoration-green-500 transition-colors">project settings</Link></p>
|
||||
</div>
|
||||
<p className="text-xs text-gray-600 dark:text-gray-400 mt-1">
|
||||
Webhook tools make HTTP requests to your configured endpoint when called by the agent.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>}
|
||||
{ !tool.isMcp && !tool.isComposio && !tool.isWebhook && <div className="text-sm text-gray-700 dark:text-gray-300">
|
||||
<p>This is a placeholder tool that should be mocked.</p>
|
||||
</div>}
|
||||
</div>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
{/* Identity Section */}
|
||||
<SectionCard
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ export function AddWebhookTool({ projectId, onAddTool }: AddWebhookToolProps) {
|
|||
function handleAddTool() {
|
||||
onAddTool({
|
||||
description: 'Webhook tool',
|
||||
mockTool: false,
|
||||
mockTool: true,
|
||||
isWebhook: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ export function ToolsConfig({
|
|||
const [activeTab, setActiveTab] = useState(defaultActiveTab);
|
||||
const [selectedToolkit, setSelectedToolkit] = useState<ToolkitType | null>(null);
|
||||
const [isToolsPanelOpen, setIsToolsPanelOpen] = useState(false);
|
||||
const useBilling = process.env.NEXT_PUBLIC_USE_BILLING === "true";
|
||||
|
||||
const handleTabChange = (key: Key) => {
|
||||
setActiveTab(key.toString());
|
||||
|
|
@ -84,14 +85,14 @@ export function ToolsConfig({
|
|||
/>
|
||||
</div>
|
||||
</Tab>
|
||||
<Tab key="webhook" title="Webhook">
|
||||
{!useBilling && <Tab key="webhook" title="Webhook">
|
||||
<div className="mt-4 p-6">
|
||||
<AddWebhookTool
|
||||
projectId={projectId}
|
||||
onAddTool={onAddTool}
|
||||
/>
|
||||
</div>
|
||||
</Tab>
|
||||
</Tab>}
|
||||
</Tabs>
|
||||
|
||||
{/* Tools Panel */}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue