From 7865e18a8a555e7c84180e723ef629176a78fdbf Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Tue, 29 Sep 2026 07:49:00 +0000 Subject: [PATCH] chore(web): remove orphaned cloud-agent-next demo-session components Delete DemoSessionModal, DemoSessionCTA, and their demo-config module. The config is imported only by these two components, and neither component is imported, rendered, or referenced anywhere else in the repo, so the whole cluster is unreachable from every entry point. --- .../cloud-agent-next/DemoSessionCTA.tsx | 81 ------------------ .../cloud-agent-next/DemoSessionModal.tsx | 82 ------------------- .../cloud-agent-next/demo-config.ts | 40 --------- 3 files changed, 203 deletions(-) delete mode 100644 apps/web/src/components/cloud-agent-next/DemoSessionCTA.tsx delete mode 100644 apps/web/src/components/cloud-agent-next/DemoSessionModal.tsx delete mode 100644 apps/web/src/components/cloud-agent-next/demo-config.ts diff --git a/apps/web/src/components/cloud-agent-next/DemoSessionCTA.tsx b/apps/web/src/components/cloud-agent-next/DemoSessionCTA.tsx deleted file mode 100644 index 3da99d86a0..0000000000 --- a/apps/web/src/components/cloud-agent-next/DemoSessionCTA.tsx +++ /dev/null @@ -1,81 +0,0 @@ -'use client'; - -import { useEffect, useRef } from 'react'; -import { Card, CardContent } from '@/components/ui/card'; -import { Button } from '@/components/ui/button'; -import { Sparkles, Loader2, GitFork } from 'lucide-react'; -import type { DemoConfig } from './demo-config'; -import { DEMO_SOURCE_REPO } from './demo-config'; -import { cn } from '@/lib/utils'; - -type DemoSessionCTAProps = { - demo: DemoConfig; - onAction: () => void; - isForked: boolean; - isWaitingForFork: boolean; - isHighlighted?: boolean; -}; - -export function DemoSessionCTA({ - demo, - onAction, - isForked, - isWaitingForFork, - isHighlighted = false, -}: DemoSessionCTAProps) { - const cardRef = useRef(null); - - // Scroll to and focus the card when highlighted - useEffect(() => { - if (isHighlighted && cardRef.current) { - cardRef.current.scrollIntoView({ behavior: 'smooth', block: 'center' }); - } - }, [isHighlighted]); - - const getButtonLabel = () => { - if (isWaitingForFork) { - return ( - <> - - Waiting for fork... - - ); - } - if (isForked) { - return 'Show me'; - } - return ( - <> - - Fork {DEMO_SOURCE_REPO} on GitHub - - ); - }; - - return ( - - -
- -
-

{demo.title}

-

{demo.description}

-
-
- -
-
- ); -} diff --git a/apps/web/src/components/cloud-agent-next/DemoSessionModal.tsx b/apps/web/src/components/cloud-agent-next/DemoSessionModal.tsx deleted file mode 100644 index b00f8b11d6..0000000000 --- a/apps/web/src/components/cloud-agent-next/DemoSessionModal.tsx +++ /dev/null @@ -1,82 +0,0 @@ -'use client'; - -import { - Dialog, - DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogTitle, -} from '@/components/ui/dialog'; -import { Button } from '@/components/ui/button'; -import { Rocket, Loader2, ExternalLink } from 'lucide-react'; -import { DEMO_SOURCE_REPO, type DemoConfig } from './demo-config'; - -type DemoSessionModalProps = { - open: boolean; - onOpenChange: (open: boolean) => void; - onComplete: () => void; - isLoading: boolean; - demo: DemoConfig | null; -}; - -export function DemoSessionModal({ - open, - onOpenChange, - onComplete, - isLoading, - demo, -}: DemoSessionModalProps) { - if (!demo) return null; - - return ( - - - - Fork {DEMO_SOURCE_REPO} - -
-

- To try this demo, you'll need to fork the repository to your GitHub account. -

-
-
    -
  1. Click the link below to open the GitHub fork page
  2. -
  3. Click the "Create fork" button on GitHub
  4. -
  5. Come back here and click "Done. Let's Go!" when finished
  6. -
-
- - Open fork page on GitHub - - -
-
-
- - - - -
-
- ); -} diff --git a/apps/web/src/components/cloud-agent-next/demo-config.ts b/apps/web/src/components/cloud-agent-next/demo-config.ts deleted file mode 100644 index 07ee703b65..0000000000 --- a/apps/web/src/components/cloud-agent-next/demo-config.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { AgentMode } from './types'; - -export const DEMO_SOURCE_OWNER = 'Kilo-Org'; -export const DEMO_SOURCE_REPO_NAME = 'KiloMan'; -export const DEMO_SOURCE_REPO = `${DEMO_SOURCE_OWNER}/${DEMO_SOURCE_REPO_NAME}`; - -export type DemoConfig = { - id: string; - title: string; - description: string; - prompt: string; - mode: AgentMode; - model: string; -}; - -export const DEMO_CONFIGS: DemoConfig[] = [ - { - id: 'update-avatar', - title: 'Update Player Avatar in the KiloMan repo', - description: - 'Personalize the KiloMan game by updating the player avatar to use your GitHub Gravatar', - prompt: - 'Update the player avatar in this game to use the Gravatar for GitHub user "{username}". The Gravatar URL should be: https://github.com/{username}.png. Once complete, please use "gh" the github cli to create a draft pull request with the changes, the GH_TOKEN is already available in the environment. Please be sure assign the pr to the user.', - mode: 'code', - model: 'x-ai/grok-code-fast-1', - }, - { - id: 'explain-game-mechanics', - title: 'Learn About Game Mechanics in the KiloMan repo', - description: 'Discover how the game mechanics work in KiloMan', - prompt: 'Explain to me how the game mechanics work in this game', - mode: 'plan', - model: 'x-ai/grok-code-fast-1', - }, -]; - -// Helper to replace template variables in prompts -export function templatePrompt(prompt: string, githubUsername: string): string { - return prompt.replace(/\{username\}/g, githubUsername); -}