diff --git a/apps/rowboat/app/lib/feature_flags.ts b/apps/rowboat/app/lib/feature_flags.ts index 3fb5b0dd..4d3f6c9b 100644 --- a/apps/rowboat/app/lib/feature_flags.ts +++ b/apps/rowboat/app/lib/feature_flags.ts @@ -7,6 +7,7 @@ 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_COMPOSIO_TOOLS = process.env.USE_COMPOSIO_TOOLS === 'true'; +export const USE_KLAVIS_TOOLS = process.env.USE_KLAVIS_TOOLS === 'true'; // Hardcoded flags export const USE_MULTIPLE_PROJECTS = true; diff --git a/apps/rowboat/app/projects/[projectId]/tools/components/ToolsConfig.tsx b/apps/rowboat/app/projects/[projectId]/tools/components/ToolsConfig.tsx index 67ba2fbc..35fd33e0 100644 --- a/apps/rowboat/app/projects/[projectId]/tools/components/ToolsConfig.tsx +++ b/apps/rowboat/app/projects/[projectId]/tools/components/ToolsConfig.tsx @@ -7,8 +7,21 @@ import { CustomServers } from './CustomServers'; import { Composio } from './Composio'; import type { Key } from 'react'; -export function ToolsConfig({ useComposioTools }: { useComposioTools: boolean }) { - const [activeTab, setActiveTab] = useState(useComposioTools ? 'composio' : 'hosted'); +export function ToolsConfig({ + useComposioTools, + useKlavisTools +}: { + useComposioTools: boolean; + useKlavisTools: boolean; +}) { + let defaultActiveTab = 'custom'; + if (useKlavisTools) { + defaultActiveTab = 'hosted'; + } + if (useComposioTools) { + defaultActiveTab = 'composio'; + } + const [activeTab, setActiveTab] = useState(defaultActiveTab); const handleTabChange = (key: Key) => { setActiveTab(key.toString()); @@ -30,18 +43,20 @@ export function ToolsConfig({ useComposioTools }: { useComposioTools: boolean }) )} - - Tools Library - - BETA - - - }> -
- setActiveTab(key)} /> -
-
+ {useKlavisTools && ( + + Klavis + + BETA + + + }> +
+ setActiveTab(key)} /> +
+
+ )}
diff --git a/apps/rowboat/app/projects/[projectId]/tools/page.tsx b/apps/rowboat/app/projects/[projectId]/tools/page.tsx index 4a81b752..2fa0d764 100644 --- a/apps/rowboat/app/projects/[projectId]/tools/page.tsx +++ b/apps/rowboat/app/projects/[projectId]/tools/page.tsx @@ -2,7 +2,7 @@ import { Suspense } from 'react'; import { ToolsConfig } from './components/ToolsConfig'; import { PageHeader } from '@/components/ui/page-header'; import { requireActiveBillingSubscription } from '@/app/lib/billing'; -import { USE_COMPOSIO_TOOLS } from '@/app/lib/feature_flags'; +import { USE_COMPOSIO_TOOLS, USE_KLAVIS_TOOLS } from '@/app/lib/feature_flags'; export default async function ToolsPage() { await requireActiveBillingSubscription(); @@ -15,7 +15,10 @@ export default async function ToolsPage() { />
Loading...
}> - +
diff --git a/docker-compose.yml b/docker-compose.yml index 67bc0a88..cf807f41 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -48,6 +48,7 @@ services: - VOICE_API_URL=${VOICE_API_URL} - PROVIDER_DEFAULT_MODEL=${PROVIDER_DEFAULT_MODEL} - RAG_UPLOADS_DIR=/app/uploads + - USE_KLAVIS_TOOLS=${USE_KLAVIS_TOOLS} - KLAVIS_API_KEY=${KLAVIS_API_KEY} - KLAVIS_GITHUB_CLIENT_ID=${KLAVIS_GITHUB_CLIENT_ID} - KLAVIS_GOOGLE_CLIENT_ID=${KLAVIS_GOOGLE_CLIENT_ID} diff --git a/start.sh b/start.sh index 0923f16b..c084a975 100755 --- a/start.sh +++ b/start.sh @@ -14,6 +14,11 @@ if [ -n "$COMPOSIO_API_KEY" ]; then export USE_COMPOSIO_TOOLS=true fi +# enable klavis tools if API key is set +if [ -n "$KLAVIS_API_KEY" ]; then + export USE_KLAVIS_TOOLS=true +fi + # Start with the base command and profile flags CMD="docker-compose" CMD="$CMD --profile setup_qdrant"