@shepai/cli 1.79.0 → 1.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +1 -1
- package/web/.next/required-server-files.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +21 -21
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +21 -21
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4be9a9bb._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1e3cf73b._.js +1 -1
- package/web/.next/server/chunks/ssr/_1e3cf73b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_ba97cfd3._.js → _50b7100e._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_ba97cfd3._.js.map → _50b7100e._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_5d4e7151._.js +1 -1
- package/web/.next/server/chunks/ssr/_5d4e7151._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_63868199._.js +1 -1
- package/web/.next/server/chunks/ssr/_63868199._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_83cf28a3._.js → _645e9a63._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_83cf28a3._.js.map → _645e9a63._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_c29db9b3._.js +3 -0
- package/web/.next/server/chunks/ssr/{_acb6a73d._.js.map → _c29db9b3._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_7efa14ca._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_7efa14ca._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b59d79db._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b59d79db._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +28 -28
- package/web/.next/static/chunks/{49743c83c9bced40.js → 0263c85901a20cec.js} +1 -1
- package/web/.next/static/chunks/{4b20d522b4f5ca7e.js → 158f8113bf93c2ee.js} +1 -1
- package/web/.next/static/chunks/{47ecde22e9663419.js → 1d1da60d2d4f5f64.js} +1 -1
- package/web/.next/static/chunks/{e29d1e26c2694f78.js → 4f5b21c7dfd3c5bb.js} +1 -1
- package/web/.next/static/chunks/{297458261f67218c.js → 594c694d9e749bf6.js} +1 -1
- package/web/.next/static/chunks/{d8d464c156573994.js → 5c11c4f4042077dd.js} +1 -1
- package/web/.next/static/chunks/{352e25e1bb2b9edb.js → 62b3642ac8337a1d.js} +1 -1
- package/web/.next/static/chunks/{77a956d5dd063fef.js → a23c696600afe26c.js} +1 -1
- package/web/.next/static/chunks/{5688494bf052915d.js → a996823ce96362aa.js} +1 -1
- package/web/.next/static/chunks/{8eff15a7f35164f9.js → fae8e157d874ab74.js} +1 -1
- package/web/.next/server/chunks/ssr/_acb6a73d._.js +0 -3
- /package/web/.next/static/{hVGa8-vd4pFs9splpgq-k → TpbhEjRZP-asaxlR5yaGh}/_buildManifest.js +0 -0
- /package/web/.next/static/{hVGa8-vd4pFs9splpgq-k → TpbhEjRZP-asaxlR5yaGh}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{hVGa8-vd4pFs9splpgq-k → TpbhEjRZP-asaxlR5yaGh}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/create-drawer-client.tsx","../../../../../../../src/presentation/web/app/actions/data%3Ae924b9%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.tsx","../../../../../../../src/presentation/web/components/ui/textarea.tsx","../../../../../../../src/presentation/web/components/common/feature-create-drawer/pick-files.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/chevrons-up-down.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/image.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/file.ts"],"sourcesContent":["'use client';\n\nimport { useState, useCallback, useEffect } from 'react';\nimport { useRouter, usePathname } from 'next/navigation';\nimport { toast } from 'sonner';\nimport { createFeature } from '@/app/actions/create-feature';\nimport { FeatureCreateDrawer } from '@/components/common/feature-create-drawer';\nimport type { FeatureCreatePayload } from '@/components/common/feature-create-drawer';\nimport type { ParentFeatureOption } from '@/components/common/feature-create-drawer/feature-create-drawer';\nimport type { WorkflowDefaults } from '@/app/actions/get-workflow-defaults';\n\nexport interface CreateDrawerClientProps {\n repositoryPath: string;\n initialParentId?: string;\n features: ParentFeatureOption[];\n workflowDefaults?: WorkflowDefaults;\n currentAgentType?: string;\n currentModel?: string;\n}\n\nexport function CreateDrawerClient({\n repositoryPath,\n initialParentId,\n features,\n workflowDefaults,\n currentAgentType,\n currentModel,\n}: CreateDrawerClientProps) {\n const router = useRouter();\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n // Derive open state from the URL. Next.js parallel routes preserve slot\n // content during soft navigation, so this component is NOT unmounted when\n // navigating to `/`. We watch the pathname and let Vaul handle the close\n // animation when the path no longer matches the create route.\n // When submitting, force the drawer closed immediately — router.push('/')\n // is async and the pathname may not update before the next render.\n const pathname = usePathname();\n const isOnCreateRoute = pathname.startsWith('/create');\n const isOpen = !isSubmitting && isOnCreateRoute;\n\n // Reset isSubmitting once the route has actually changed away from /create,\n // so the drawer can reopen on future visits. Without this, isSubmitting\n // would stay true forever since parallel routes preserve component state.\n useEffect(() => {\n if (!isOnCreateRoute && isSubmitting) {\n setIsSubmitting(false);\n }\n }, [isOnCreateRoute, isSubmitting]);\n\n const onClose = useCallback(() => {\n router.push('/');\n }, [router]);\n\n const onSubmit = useCallback(\n (data: FeatureCreatePayload) => {\n setIsSubmitting(true);\n\n // Close the drawer immediately for responsive UI\n router.push('/');\n\n // Server action Phase 1 returns fast with real feature ID (DB record created)\n // Phase 2 (metadata, worktree, agent) runs in background on server\n createFeature(data)\n .then((result) => {\n if (result.error) {\n toast.error(result.error);\n return;\n }\n // Dispatch event with real feature ID so control center adds it to featureMap\n window.dispatchEvent(\n new CustomEvent('shep:feature-created', {\n detail: {\n featureId: result.feature!.id,\n name: result.feature!.name,\n description: result.feature!.description,\n repositoryPath: result.feature!.repositoryPath,\n parentId: data.parentId,\n },\n })\n );\n })\n .catch(() => {\n toast.error('Failed to create feature');\n setIsSubmitting(false);\n });\n },\n [router]\n );\n\n return (\n <FeatureCreateDrawer\n open={isOpen}\n onClose={onClose}\n onSubmit={onSubmit}\n repositoryPath={repositoryPath}\n features={features}\n workflowDefaults={workflowDefaults}\n initialParentId={initialParentId}\n isSubmitting={isSubmitting}\n currentAgentType={currentAgentType}\n currentModel={currentModel}\n />\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"4029496866314880b1a802978e00fb0dfc7fc7deb9\":\"createFeature\"},\"src/presentation/web/app/actions/create-feature.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"4029496866314880b1a802978e00fb0dfc7fc7deb9\",callServer,void 0,findSourceMapURL,\"createFeature\");export{$$RSC_SERVER_ACTION_0 as createFeature};","'use client';\n\nimport { useState, useCallback, useEffect, useRef } from 'react';\nimport type { LucideIcon } from 'lucide-react';\nimport {\n PlusIcon,\n FileIcon,\n FileTextIcon,\n ImageIcon,\n CodeIcon,\n Trash2Icon,\n ChevronsUpDown,\n CheckIcon,\n} from 'lucide-react';\nimport { cn } from '@/lib/utils';\nimport { useSoundAction } from '@/hooks/use-sound-action';\nimport { BaseDrawer } from '@/components/common/base-drawer';\nimport { DrawerTitle, DrawerDescription } from '@/components/ui/drawer';\nimport { Button } from '@/components/ui/button';\nimport { Input } from '@/components/ui/input';\nimport { Textarea } from '@/components/ui/textarea';\nimport { Label } from '@/components/ui/label';\nimport { Badge } from '@/components/ui/badge';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { Switch } from '@/components/ui/switch';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\nimport { useGuardedDrawerClose } from '@/hooks/drawer-close-guard';\nimport type { FileAttachment } from '@shepai/core/infrastructure/services/file-dialog.service';\nimport type { WorkflowDefaults } from '@/app/actions/get-workflow-defaults';\nimport { AgentModelPicker } from '@/components/features/settings/AgentModelPicker';\nimport { pickFiles } from './pick-files';\n\nexport type { FileAttachment } from '@shepai/core/infrastructure/services/file-dialog.service';\n\n/** Minimal feature descriptor for the parent selector. */\nexport interface ParentFeatureOption {\n id: string;\n name: string;\n}\n\nexport interface FeatureCreatePayload {\n description: string;\n attachments: FileAttachment[];\n repositoryPath: string;\n approvalGates: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n };\n push: boolean;\n openPr: boolean;\n parentId?: string;\n /** When true, skip SDLC phases and implement directly from the prompt. */\n fast: boolean;\n /** Optional agent type override for this feature run */\n agentType?: string;\n /** Optional model override for this feature run */\n model?: string;\n}\n\nconst AUTO_APPROVE_OPTIONS = [\n { id: 'allowPrd', label: 'PRD', description: 'Auto-approve requirements move to planning.' },\n { id: 'allowPlan', label: 'Plan', description: 'Auto-approve planning move to implementation.' },\n { id: 'allowMerge', label: 'Merge', description: 'Auto-approve merge move to Done.' },\n];\n\nconst EMPTY_GATES: Record<string, boolean> = {\n allowPrd: false,\n allowPlan: false,\n allowMerge: false,\n};\n\nexport interface FeatureCreateDrawerProps {\n open: boolean;\n onClose: () => void;\n onSubmit: (data: FeatureCreatePayload) => void;\n repositoryPath: string;\n isSubmitting?: boolean;\n workflowDefaults?: WorkflowDefaults;\n /** List of existing features available for selection as a parent. */\n features?: ParentFeatureOption[];\n /** Pre-select a parent feature when the drawer opens (e.g. from (+) button on a feature node). */\n initialParentId?: string;\n /** Current global agent type from settings */\n currentAgentType?: string;\n /** Current global model from settings */\n currentModel?: string;\n}\n\nexport function FeatureCreateDrawer({\n open,\n onClose,\n onSubmit,\n repositoryPath,\n isSubmitting = false,\n workflowDefaults,\n features,\n initialParentId,\n currentAgentType,\n currentModel,\n}: FeatureCreateDrawerProps) {\n const createSound = useSoundAction('create');\n const defaultGates = workflowDefaults?.approvalGates ?? EMPTY_GATES;\n const defaultPush = workflowDefaults?.push ?? false;\n const defaultOpenPr = workflowDefaults?.openPr ?? false;\n\n const [description, setDescription] = useState('');\n const [attachments, setAttachments] = useState<FileAttachment[]>([]);\n const [approvalGates, setApprovalGates] = useState<Record<string, boolean>>({ ...defaultGates });\n const [push, setPush] = useState(defaultPush);\n const [openPr, setOpenPr] = useState(defaultOpenPr);\n const [parentId, setParentId] = useState<string | undefined>(undefined);\n const [fast, setFast] = useState(false);\n const [overrideAgent, setOverrideAgent] = useState<string | undefined>(undefined);\n const [overrideModel, setOverrideModel] = useState<string | undefined>(undefined);\n\n // Sync state when workflowDefaults load asynchronously\n useEffect(() => {\n if (workflowDefaults) {\n setApprovalGates({ ...workflowDefaults.approvalGates });\n setPush(workflowDefaults.push);\n setOpenPr(workflowDefaults.openPr);\n }\n }, [workflowDefaults]);\n\n // Pre-select parent when initialParentId changes (e.g. (+) button on feature node)\n useEffect(() => {\n if (open && initialParentId) {\n setParentId(initialParentId);\n }\n }, [open, initialParentId]);\n\n const resetForm = useCallback(() => {\n setDescription('');\n setAttachments([]);\n setApprovalGates({ ...defaultGates });\n setPush(defaultPush);\n setOpenPr(defaultOpenPr);\n setParentId(undefined);\n setFast(false);\n setOverrideAgent(undefined);\n setOverrideModel(undefined);\n }, [defaultGates, defaultPush, defaultOpenPr]);\n\n // Track whether the form has unsaved data\n const isDirty = description.trim() !== '' || attachments.length > 0;\n\n // Shared close guard — shows confirmation when dirty, prevents navigation\n const { attemptClose } = useGuardedDrawerClose({ open, isDirty, onClose, onReset: resetForm });\n\n const handleSubmit = useCallback(\n (e: React.FormEvent) => {\n e.preventDefault();\n if (!description.trim()) return;\n createSound.play();\n onSubmit({\n description: description.trim(),\n attachments,\n repositoryPath,\n approvalGates: {\n allowPrd: approvalGates.allowPrd ?? false,\n allowPlan: approvalGates.allowPlan ?? false,\n allowMerge: approvalGates.allowMerge ?? false,\n },\n push: push || openPr,\n openPr,\n fast,\n ...(overrideAgent ? { agentType: overrideAgent } : {}),\n ...(overrideModel ? { model: overrideModel } : {}),\n ...(parentId ? { parentId } : {}),\n });\n resetForm();\n },\n [\n description,\n attachments,\n approvalGates,\n repositoryPath,\n onSubmit,\n push,\n openPr,\n fast,\n overrideAgent,\n overrideModel,\n parentId,\n createSound,\n resetForm,\n ]\n );\n\n const handleAddFiles = useCallback(async () => {\n try {\n const files = await pickFiles();\n if (files) {\n setAttachments((prev) => [...prev, ...files]);\n }\n } catch {\n // Native dialog failed — silently ignore (user can retry)\n }\n }, []);\n\n const handleRemoveFile = useCallback((path: string) => {\n setAttachments((prev) => prev.filter((f) => f.path !== path));\n }, []);\n\n const hasFeatures = features && features.length > 0;\n\n return (\n <BaseDrawer\n open={open}\n onClose={attemptClose}\n size=\"md\"\n modal={false}\n dismissOnOutsideClick\n data-testid=\"feature-create-drawer\"\n header={\n <>\n <div className=\"flex items-center gap-2\">\n <div className=\"h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500\" />\n <DrawerTitle>NEW FEATURE</DrawerTitle>\n </div>\n {isSubmitting ? (\n <DrawerDescription asChild>\n <div>\n <Badge variant=\"secondary\">Creating...</Badge>\n </div>\n </DrawerDescription>\n ) : null}\n </>\n }\n footer={\n <div className=\"flex flex-row justify-end gap-2\">\n <Button variant=\"outline\" onClick={attemptClose} disabled={isSubmitting}>\n Cancel\n </Button>\n <Button\n type=\"submit\"\n form=\"create-feature-form\"\n disabled={!description.trim() || isSubmitting}\n >\n {isSubmitting ? 'Creating...' : '+ Create Feature'}\n </Button>\n </div>\n }\n >\n {/* Form body */}\n <div className=\"overflow-y-auto p-4\">\n <TooltipProvider delayDuration={400}>\n <form id=\"create-feature-form\" onSubmit={handleSubmit} className=\"flex flex-col gap-4\">\n {/* Description + inline controls */}\n <div className=\"flex flex-col gap-1.5\">\n <Label\n htmlFor=\"feature-description\"\n className=\"text-muted-foreground text-xs font-semibold tracking-wider\"\n >\n DESCRIBE YOUR FEATURE\n </Label>\n <div className=\"border-input focus-within:ring-ring/50 focus-within:border-ring overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]\">\n <Textarea\n id=\"feature-description\"\n placeholder=\"e.g. Add GitHub OAuth login with callback handling and token refresh...\"\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n rows={7}\n required\n disabled={isSubmitting}\n className=\"field-sizing-fixed min-h-42! resize-none rounded-none border-0 shadow-none focus-visible:ring-0\"\n />\n <div className=\"border-input flex items-center gap-3 border-t px-3 py-1.5\">\n <AgentModelPicker\n initialAgentType={overrideAgent ?? currentAgentType ?? 'claude-code'}\n initialModel={overrideModel ?? currentModel ?? 'claude-sonnet-4-6'}\n mode=\"override\"\n onAgentModelChange={(agent, model) => {\n setOverrideAgent(agent);\n setOverrideModel(model);\n }}\n disabled={isSubmitting}\n className=\"w-55\"\n />\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"ml-auto flex cursor-pointer items-center gap-2\">\n <Switch\n id=\"fast-mode\"\n checked={fast}\n onCheckedChange={setFast}\n disabled={isSubmitting}\n />\n <Label htmlFor=\"fast-mode\" className=\"cursor-pointer text-sm font-medium\">\n Fast Mode\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Skip SDLC phases and implement directly from your prompt.\n </TooltipContent>\n </Tooltip>\n </div>\n </div>\n </div>\n\n {/* Parent feature selector (only when opened from a feature node) */}\n {hasFeatures && initialParentId !== undefined ? (\n <div className=\"flex flex-col gap-1.5\">\n <Label\n htmlFor=\"parent-feature\"\n className=\"text-muted-foreground text-xs font-semibold tracking-wider\"\n >\n PARENT FEATURE\n </Label>\n <ParentFeatureCombobox\n features={features}\n value={parentId}\n onChange={setParentId}\n disabled={isSubmitting}\n />\n </div>\n ) : null}\n\n {/* Approve + Git — compact switch groups */}\n <div className=\"flex flex-col gap-2\">\n {/* Approve row */}\n <div className=\"border-input flex items-center gap-4 rounded-md border px-3 py-2.5\">\n <Tooltip>\n <TooltipTrigger asChild>\n <span className=\"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider\">\n APPROVE\n </span>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Auto-approve phase transitions without manual review.\n </TooltipContent>\n </Tooltip>\n <div className=\"flex flex-1 items-center gap-4\">\n {AUTO_APPROVE_OPTIONS.map((opt) => (\n <Tooltip key={opt.id}>\n <TooltipTrigger asChild>\n <div className=\"flex cursor-pointer items-center gap-1.5\">\n <Switch\n id={`approve-${opt.id}`}\n size=\"sm\"\n checked={approvalGates[opt.id] ?? false}\n onCheckedChange={(v) =>\n setApprovalGates((prev) => ({ ...prev, [opt.id]: v }))\n }\n disabled={\n isSubmitting ||\n (fast && (opt.id === 'allowPrd' || opt.id === 'allowPlan'))\n }\n />\n <Label\n htmlFor={`approve-${opt.id}`}\n className=\"cursor-pointer text-xs font-medium\"\n >\n {opt.label}\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n {fast && (opt.id === 'allowPrd' || opt.id === 'allowPlan')\n ? 'Skipped in Fast Mode'\n : opt.description}\n </TooltipContent>\n </Tooltip>\n ))}\n </div>\n {/* Select all shortcut */}\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={() => {\n const allOn = AUTO_APPROVE_OPTIONS.every((o) => approvalGates[o.id]);\n const next: Record<string, boolean> = {};\n for (const o of AUTO_APPROVE_OPTIONS) next[o.id] = !allOn;\n setApprovalGates(next);\n }}\n disabled={isSubmitting}\n className={cn(\n 'text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-semibold tracking-wider uppercase transition-colors',\n AUTO_APPROVE_OPTIONS.every((o) => approvalGates[o.id]) && 'text-primary'\n )}\n >\n All\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">Toggle all approval gates</TooltipContent>\n </Tooltip>\n </div>\n\n {/* Git row */}\n <div className=\"border-input flex items-center gap-4 rounded-md border px-3 py-2.5\">\n <span className=\"text-muted-foreground w-16 shrink-0 text-xs font-semibold tracking-wider\">\n GIT\n </span>\n <div className=\"flex flex-1 items-center gap-4\">\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"flex cursor-pointer items-center gap-1.5\">\n <Switch\n id=\"push\"\n size=\"sm\"\n checked={push || openPr}\n onCheckedChange={(v) => {\n setPush(v);\n if (!v && openPr) setOpenPr(false);\n }}\n disabled={isSubmitting}\n />\n <Label htmlFor=\"push\" className=\"cursor-pointer text-xs font-medium\">\n Push\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Push branch to remote after implementation.\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"flex cursor-pointer items-center gap-1.5\">\n <Switch\n id=\"open-pr\"\n size=\"sm\"\n checked={openPr}\n onCheckedChange={setOpenPr}\n disabled={isSubmitting}\n />\n <Label htmlFor=\"open-pr\" className=\"cursor-pointer text-xs font-medium\">\n PR\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Open a pull request after pushing.\n </TooltipContent>\n </Tooltip>\n </div>\n </div>\n </div>\n\n {/* Attachments */}\n <div className=\"flex flex-col gap-2\">\n <div className=\"flex items-center justify-between\">\n <Label className=\"text-muted-foreground text-xs font-semibold tracking-wider\">\n ATTACHMENTS\n {attachments.length > 0 && (\n <span className=\"text-muted-foreground/60 ml-1.5\">({attachments.length})</span>\n )}\n </Label>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"xs\"\n onClick={handleAddFiles}\n disabled={isSubmitting}\n >\n <PlusIcon className=\"size-3\" />\n Add Files\n </Button>\n </div>\n\n {attachments.length > 0 && (\n <div className=\"flex flex-col gap-2\">\n {attachments.map((file) => (\n <AttachmentCard\n key={file.path}\n file={file}\n onRemove={() => handleRemoveFile(file.path)}\n disabled={isSubmitting}\n />\n ))}\n </div>\n )}\n </div>\n </form>\n </TooltipProvider>\n </div>\n </BaseDrawer>\n );\n}\n\n/* ---------------------------------------------------------------------------\n * ParentFeatureCombobox — searchable dropdown for parent feature selection\n * ------------------------------------------------------------------------- */\n\ninterface ParentFeatureComboboxProps {\n features: ParentFeatureOption[];\n value: string | undefined;\n onChange: (id: string | undefined) => void;\n disabled?: boolean;\n}\n\nfunction ParentFeatureCombobox({\n features,\n value,\n onChange,\n disabled,\n}: ParentFeatureComboboxProps) {\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const selectedFeature = features.find((f) => f.id === value);\n\n const filtered = query.trim()\n ? features.filter(\n (f) =>\n f.name.toLowerCase().includes(query.toLowerCase()) ||\n f.id.toLowerCase().includes(query.toLowerCase())\n )\n : features;\n\n const handleSelect = useCallback(\n (id: string | undefined) => {\n onChange(id);\n setOpen(false);\n setQuery('');\n },\n [onChange]\n );\n\n useEffect(() => {\n if (open) {\n setTimeout(() => inputRef.current?.focus(), 0);\n } else {\n setQuery('');\n }\n }, [open]);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <button\n id=\"parent-feature\"\n type=\"button\"\n role=\"combobox\"\n aria-expanded={open}\n aria-label=\"Parent Feature\"\n disabled={disabled}\n data-testid=\"parent-feature-combobox\"\n className={cn(\n 'border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n !selectedFeature && 'text-muted-foreground'\n )}\n >\n <span className=\"truncate\">\n {selectedFeature\n ? `${selectedFeature.name} (${selectedFeature.id.slice(0, 8)})`\n : 'Select parent feature...'}\n </span>\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-80 p-0\"\n align=\"start\"\n data-testid=\"parent-feature-combobox-content\"\n >\n <div className=\"flex flex-col\">\n {/* Search input */}\n <div className=\"border-b p-2\">\n <Input\n ref={inputRef}\n placeholder=\"Search features...\"\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n className=\"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0\"\n data-testid=\"parent-feature-search\"\n />\n </div>\n\n {/* Options list */}\n <div className=\"max-h-48 overflow-y-auto py-1\" role=\"listbox\" aria-label=\"Features\">\n {/* No parent option */}\n <button\n type=\"button\"\n role=\"option\"\n aria-selected={value === undefined}\n onClick={() => handleSelect(undefined)}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm',\n value === undefined && 'bg-accent/50'\n )}\n data-testid=\"parent-feature-option-none\"\n >\n <CheckIcon className={cn('h-4 w-4 shrink-0', value !== undefined && 'invisible')} />\n <span className=\"text-muted-foreground italic\">No parent</span>\n </button>\n\n {filtered.length === 0 && query ? (\n <p className=\"text-muted-foreground px-3 py-2 text-sm\">No features found.</p>\n ) : (\n filtered.map((f) => (\n <button\n key={f.id}\n type=\"button\"\n role=\"option\"\n aria-selected={value === f.id}\n onClick={() => handleSelect(f.id)}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm',\n value === f.id && 'bg-accent/50'\n )}\n data-testid={`parent-feature-option-${f.id}`}\n >\n <CheckIcon className={cn('h-4 w-4 shrink-0', value !== f.id && 'invisible')} />\n <span className=\"truncate\">\n {f.name}{' '}\n <span className=\"text-muted-foreground font-mono text-xs\">\n ({f.id.slice(0, 8)})\n </span>\n </span>\n </button>\n ))\n )}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n\n/* ---------------------------------------------------------------------------\n * Private sub-components & utilities\n * ------------------------------------------------------------------------- */\n\nfunction AttachmentCard({\n file,\n onRemove,\n disabled,\n}: {\n file: FileAttachment;\n onRemove: () => void;\n disabled?: boolean;\n}) {\n const ext = getExtension(file.name);\n const Icon = getFileIcon(ext);\n const iconColorClass = getFileIconColor(ext);\n\n return (\n <div className=\"flex items-center gap-3 rounded-md border p-2\">\n <div\n className={cn('flex h-8 w-8 shrink-0 items-center justify-center rounded', iconColorClass)}\n >\n <Icon className=\"h-4 w-4\" />\n </div>\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"truncate text-sm font-medium\">{file.name}</span>\n <span className=\"text-muted-foreground truncate text-xs\">{file.path}</span>\n <span className=\"text-muted-foreground text-xs\">{formatFileSize(file.size)}</span>\n </div>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-xs\"\n onClick={onRemove}\n disabled={disabled}\n aria-label={`Remove ${file.name}`}\n >\n <Trash2Icon className=\"h-3 w-3\" />\n </Button>\n </div>\n );\n}\n\nfunction getExtension(filename: string): string {\n const dot = filename.lastIndexOf('.');\n return dot >= 0 ? filename.slice(dot).toLowerCase() : '';\n}\n\nconst IMAGE_EXTS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico', '.bmp']);\nconst CODE_EXTS = new Set([\n '.ts',\n '.tsx',\n '.js',\n '.jsx',\n '.json',\n '.yaml',\n '.yml',\n '.xml',\n '.html',\n '.css',\n '.md',\n]);\n\nfunction getFileIcon(ext: string): LucideIcon {\n if (IMAGE_EXTS.has(ext)) return ImageIcon;\n if (ext === '.pdf') return FileTextIcon;\n if (CODE_EXTS.has(ext)) return CodeIcon;\n return FileIcon;\n}\n\nfunction getFileIconColor(ext: string): string {\n if (ext === '.pdf') return 'bg-red-50 text-red-600';\n if (IMAGE_EXTS.has(ext)) return 'bg-blue-50 text-blue-600';\n if (CODE_EXTS.has(ext)) return 'bg-emerald-50 text-emerald-600';\n return 'bg-gray-50 text-gray-600';\n}\n\nfunction formatFileSize(bytes: number): string {\n if (bytes === 0) return '0 B';\n const units = ['B', 'KB', 'MB', 'GB'];\n const i = Math.floor(Math.log(bytes) / Math.log(1024));\n return `${(bytes / Math.pow(1024, i)).toFixed(i === 0 ? 0 : 1)} ${units[i]}`;\n}\n","import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n 'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Textarea };\n","import type { FileAttachment } from '@shepai/core/infrastructure/services/file-dialog.service';\n\n/**\n * Opens a native OS file picker dialog via API route.\n * Returns the selected files with metadata, or null if the user cancelled.\n */\nexport async function pickFiles(): Promise<FileAttachment[] | null> {\n const res = await fetch('/api/dialog/pick-files', { method: 'POST' });\n\n if (!res.ok) {\n throw new Error('Failed to open file dialog');\n }\n\n const data: { files: FileAttachment[] | null; cancelled: boolean } = await res.json();\n return data.cancelled ? null : data.files;\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'm7 15 5 5 5-5', key: '1hf1tw' }],\n ['path', { d: 'm7 9 5-5 5 5', key: 'sgt6xg' }],\n];\n\n/**\n * @component @name ChevronsUpDown\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/chevrons-up-down\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronsUpDown = createLucideIcon('chevrons-up-down', __iconNode);\n\nexport default ChevronsUpDown;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', ry: '2', key: '1m3agn' }],\n ['circle', { cx: '9', cy: '9', r: '2', key: 'af1f0g' }],\n ['path', { d: 'm21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21', key: '1xmnt7' }],\n];\n\n/**\n * @component @name Image\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/image\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Image = createLucideIcon('image', __iconNode);\n\nexport default Image;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n];\n\n/**\n * @component @name File\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst File = createLucideIcon('file', __iconNode);\n\nexport default File;\n"],"names":[],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OCJwM,EAAA,EAAA,CAAA,CAAA,OAAsG,IAAM,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,mDMyB7b,CAAA,CAAA,CAAA,CAAA,AAAM,CAAN,CAAM,CAAA,CAAA,CAAO,AAAP,CAAO,AAAP,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,AAAiB,CAAjB,AAAiB,CAAjB,AAAiB,CAAjB,AAAiB,CAAjB,AAAiB,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,AAlBvC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,AFYH,CEZG,AFYH,CEZG,AFYH,gHEXK,EAET,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,AAAQ,CAAA,AAAE,EAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,AAA2B,CAAA,CAAA,CAAA,CAAA,AAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,CAC1D,yCDQc,EAAiB,CAAA,QAAS,CAAA,CAAA,aAhBpB,CDAJ,ACAI,CDAJ,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","ignoreList":[5,6,7]}
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/create-drawer-client.tsx","../../../../../../../src/presentation/web/app/actions/data%3Ab71c26%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.tsx","../../../../../../../src/presentation/web/components/ui/textarea.tsx","../../../../../../../src/presentation/web/components/common/feature-create-drawer/pick-files.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/chevrons-up-down.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/image.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/file.ts"],"sourcesContent":["'use client';\n\nimport { useState, useCallback, useEffect } from 'react';\nimport { useRouter, usePathname } from 'next/navigation';\nimport { toast } from 'sonner';\nimport { createFeature } from '@/app/actions/create-feature';\nimport { FeatureCreateDrawer } from '@/components/common/feature-create-drawer';\nimport type { FeatureCreatePayload } from '@/components/common/feature-create-drawer';\nimport type { ParentFeatureOption } from '@/components/common/feature-create-drawer/feature-create-drawer';\nimport type { WorkflowDefaults } from '@/app/actions/get-workflow-defaults';\n\nexport interface CreateDrawerClientProps {\n repositoryPath: string;\n initialParentId?: string;\n features: ParentFeatureOption[];\n workflowDefaults?: WorkflowDefaults;\n currentAgentType?: string;\n currentModel?: string;\n}\n\nexport function CreateDrawerClient({\n repositoryPath,\n initialParentId,\n features,\n workflowDefaults,\n currentAgentType,\n currentModel,\n}: CreateDrawerClientProps) {\n const router = useRouter();\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n // Derive open state from the URL. Next.js parallel routes preserve slot\n // content during soft navigation, so this component is NOT unmounted when\n // navigating to `/`. We watch the pathname and let Vaul handle the close\n // animation when the path no longer matches the create route.\n // When submitting, force the drawer closed immediately — router.push('/')\n // is async and the pathname may not update before the next render.\n const pathname = usePathname();\n const isOnCreateRoute = pathname.startsWith('/create');\n const isOpen = !isSubmitting && isOnCreateRoute;\n\n // Reset isSubmitting once the route has actually changed away from /create,\n // so the drawer can reopen on future visits. Without this, isSubmitting\n // would stay true forever since parallel routes preserve component state.\n useEffect(() => {\n if (!isOnCreateRoute && isSubmitting) {\n setIsSubmitting(false);\n }\n }, [isOnCreateRoute, isSubmitting]);\n\n const onClose = useCallback(() => {\n router.push('/');\n }, [router]);\n\n const onSubmit = useCallback(\n (data: FeatureCreatePayload) => {\n setIsSubmitting(true);\n\n // Close the drawer immediately for responsive UI\n router.push('/');\n\n // Server action Phase 1 returns fast with real feature ID (DB record created)\n // Phase 2 (metadata, worktree, agent) runs in background on server\n createFeature(data)\n .then((result) => {\n if (result.error) {\n toast.error(result.error);\n return;\n }\n // Dispatch event with real feature ID so control center adds it to featureMap\n window.dispatchEvent(\n new CustomEvent('shep:feature-created', {\n detail: {\n featureId: result.feature!.id,\n name: result.feature!.name,\n description: result.feature!.description,\n repositoryPath: result.feature!.repositoryPath,\n parentId: data.parentId,\n },\n })\n );\n })\n .catch(() => {\n toast.error('Failed to create feature');\n setIsSubmitting(false);\n });\n },\n [router]\n );\n\n return (\n <FeatureCreateDrawer\n open={isOpen}\n onClose={onClose}\n onSubmit={onSubmit}\n repositoryPath={repositoryPath}\n features={features}\n workflowDefaults={workflowDefaults}\n initialParentId={initialParentId}\n isSubmitting={isSubmitting}\n currentAgentType={currentAgentType}\n currentModel={currentModel}\n />\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"4058ec3bb0e0fae7d36e173b4242c7cc27f53f3d16\":\"createFeature\"},\"src/presentation/web/app/actions/create-feature.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"4058ec3bb0e0fae7d36e173b4242c7cc27f53f3d16\",callServer,void 0,findSourceMapURL,\"createFeature\");export{$$RSC_SERVER_ACTION_0 as createFeature};","'use client';\n\nimport { useState, useCallback, useEffect, useRef } from 'react';\nimport type { LucideIcon } from 'lucide-react';\nimport {\n PlusIcon,\n FileIcon,\n FileTextIcon,\n ImageIcon,\n CodeIcon,\n Trash2Icon,\n ChevronsUpDown,\n CheckIcon,\n} from 'lucide-react';\nimport { cn } from '@/lib/utils';\nimport { useSoundAction } from '@/hooks/use-sound-action';\nimport { BaseDrawer } from '@/components/common/base-drawer';\nimport { DrawerTitle, DrawerDescription } from '@/components/ui/drawer';\nimport { Button } from '@/components/ui/button';\nimport { Input } from '@/components/ui/input';\nimport { Textarea } from '@/components/ui/textarea';\nimport { Label } from '@/components/ui/label';\nimport { Badge } from '@/components/ui/badge';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { Switch } from '@/components/ui/switch';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\nimport { useGuardedDrawerClose } from '@/hooks/drawer-close-guard';\nimport type { FileAttachment } from '@shepai/core/infrastructure/services/file-dialog.service';\nimport type { WorkflowDefaults } from '@/app/actions/get-workflow-defaults';\nimport { AgentModelPicker } from '@/components/features/settings/AgentModelPicker';\nimport { pickFiles } from './pick-files';\n\nexport type { FileAttachment } from '@shepai/core/infrastructure/services/file-dialog.service';\n\n/** Minimal feature descriptor for the parent selector. */\nexport interface ParentFeatureOption {\n id: string;\n name: string;\n}\n\nexport interface FeatureCreatePayload {\n description: string;\n attachments: FileAttachment[];\n repositoryPath: string;\n approvalGates: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n };\n push: boolean;\n openPr: boolean;\n parentId?: string;\n /** When true, skip SDLC phases and implement directly from the prompt. */\n fast: boolean;\n /** Optional agent type override for this feature run */\n agentType?: string;\n /** Optional model override for this feature run */\n model?: string;\n}\n\nconst AUTO_APPROVE_OPTIONS = [\n { id: 'allowPrd', label: 'PRD', description: 'Auto-approve requirements move to planning.' },\n { id: 'allowPlan', label: 'Plan', description: 'Auto-approve planning move to implementation.' },\n { id: 'allowMerge', label: 'Merge', description: 'Auto-approve merge move to Done.' },\n];\n\nconst EMPTY_GATES: Record<string, boolean> = {\n allowPrd: false,\n allowPlan: false,\n allowMerge: false,\n};\n\nexport interface FeatureCreateDrawerProps {\n open: boolean;\n onClose: () => void;\n onSubmit: (data: FeatureCreatePayload) => void;\n repositoryPath: string;\n isSubmitting?: boolean;\n workflowDefaults?: WorkflowDefaults;\n /** List of existing features available for selection as a parent. */\n features?: ParentFeatureOption[];\n /** Pre-select a parent feature when the drawer opens (e.g. from (+) button on a feature node). */\n initialParentId?: string;\n /** Current global agent type from settings */\n currentAgentType?: string;\n /** Current global model from settings */\n currentModel?: string;\n}\n\nexport function FeatureCreateDrawer({\n open,\n onClose,\n onSubmit,\n repositoryPath,\n isSubmitting = false,\n workflowDefaults,\n features,\n initialParentId,\n currentAgentType,\n currentModel,\n}: FeatureCreateDrawerProps) {\n const createSound = useSoundAction('create');\n const defaultGates = workflowDefaults?.approvalGates ?? EMPTY_GATES;\n const defaultPush = workflowDefaults?.push ?? false;\n const defaultOpenPr = workflowDefaults?.openPr ?? false;\n\n const [description, setDescription] = useState('');\n const [attachments, setAttachments] = useState<FileAttachment[]>([]);\n const [approvalGates, setApprovalGates] = useState<Record<string, boolean>>({ ...defaultGates });\n const [push, setPush] = useState(defaultPush);\n const [openPr, setOpenPr] = useState(defaultOpenPr);\n const [parentId, setParentId] = useState<string | undefined>(undefined);\n const [fast, setFast] = useState(false);\n const [overrideAgent, setOverrideAgent] = useState<string | undefined>(undefined);\n const [overrideModel, setOverrideModel] = useState<string | undefined>(undefined);\n\n // Sync state when workflowDefaults load asynchronously\n useEffect(() => {\n if (workflowDefaults) {\n setApprovalGates({ ...workflowDefaults.approvalGates });\n setPush(workflowDefaults.push);\n setOpenPr(workflowDefaults.openPr);\n }\n }, [workflowDefaults]);\n\n // Pre-select parent when initialParentId changes (e.g. (+) button on feature node)\n useEffect(() => {\n if (open && initialParentId) {\n setParentId(initialParentId);\n }\n }, [open, initialParentId]);\n\n const resetForm = useCallback(() => {\n setDescription('');\n setAttachments([]);\n setApprovalGates({ ...defaultGates });\n setPush(defaultPush);\n setOpenPr(defaultOpenPr);\n setParentId(undefined);\n setFast(false);\n setOverrideAgent(undefined);\n setOverrideModel(undefined);\n }, [defaultGates, defaultPush, defaultOpenPr]);\n\n // Track whether the form has unsaved data\n const isDirty = description.trim() !== '' || attachments.length > 0;\n\n // Shared close guard — shows confirmation when dirty, prevents navigation\n const { attemptClose } = useGuardedDrawerClose({ open, isDirty, onClose, onReset: resetForm });\n\n const handleSubmit = useCallback(\n (e: React.FormEvent) => {\n e.preventDefault();\n if (!description.trim()) return;\n createSound.play();\n onSubmit({\n description: description.trim(),\n attachments,\n repositoryPath,\n approvalGates: {\n allowPrd: approvalGates.allowPrd ?? false,\n allowPlan: approvalGates.allowPlan ?? false,\n allowMerge: approvalGates.allowMerge ?? false,\n },\n push: push || openPr,\n openPr,\n fast,\n ...(overrideAgent ? { agentType: overrideAgent } : {}),\n ...(overrideModel ? { model: overrideModel } : {}),\n ...(parentId ? { parentId } : {}),\n });\n resetForm();\n },\n [\n description,\n attachments,\n approvalGates,\n repositoryPath,\n onSubmit,\n push,\n openPr,\n fast,\n overrideAgent,\n overrideModel,\n parentId,\n createSound,\n resetForm,\n ]\n );\n\n const handleAddFiles = useCallback(async () => {\n try {\n const files = await pickFiles();\n if (files) {\n setAttachments((prev) => [...prev, ...files]);\n }\n } catch {\n // Native dialog failed — silently ignore (user can retry)\n }\n }, []);\n\n const handleRemoveFile = useCallback((path: string) => {\n setAttachments((prev) => prev.filter((f) => f.path !== path));\n }, []);\n\n const hasFeatures = features && features.length > 0;\n\n return (\n <BaseDrawer\n open={open}\n onClose={attemptClose}\n size=\"md\"\n modal={false}\n dismissOnOutsideClick\n data-testid=\"feature-create-drawer\"\n header={\n <>\n <div className=\"flex items-center gap-2\">\n <div className=\"h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500\" />\n <DrawerTitle>NEW FEATURE</DrawerTitle>\n </div>\n {isSubmitting ? (\n <DrawerDescription asChild>\n <div>\n <Badge variant=\"secondary\">Creating...</Badge>\n </div>\n </DrawerDescription>\n ) : null}\n </>\n }\n footer={\n <div className=\"flex flex-row justify-end gap-2\">\n <Button variant=\"outline\" onClick={attemptClose} disabled={isSubmitting}>\n Cancel\n </Button>\n <Button\n type=\"submit\"\n form=\"create-feature-form\"\n disabled={!description.trim() || isSubmitting}\n >\n {isSubmitting ? 'Creating...' : '+ Create Feature'}\n </Button>\n </div>\n }\n >\n {/* Form body */}\n <div className=\"overflow-y-auto p-4\">\n <TooltipProvider delayDuration={400}>\n <form id=\"create-feature-form\" onSubmit={handleSubmit} className=\"flex flex-col gap-4\">\n {/* Description + inline controls */}\n <div className=\"flex flex-col gap-1.5\">\n <Label\n htmlFor=\"feature-description\"\n className=\"text-muted-foreground text-xs font-semibold tracking-wider\"\n >\n DESCRIBE YOUR FEATURE\n </Label>\n <div className=\"border-input focus-within:ring-ring/50 focus-within:border-ring overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]\">\n <Textarea\n id=\"feature-description\"\n placeholder=\"e.g. Add GitHub OAuth login with callback handling and token refresh...\"\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n rows={7}\n required\n disabled={isSubmitting}\n className=\"field-sizing-fixed min-h-42! resize-none rounded-none border-0 shadow-none focus-visible:ring-0\"\n />\n <div className=\"border-input flex items-center gap-3 border-t px-3 py-1.5\">\n <AgentModelPicker\n initialAgentType={overrideAgent ?? currentAgentType ?? 'claude-code'}\n initialModel={overrideModel ?? currentModel ?? 'claude-sonnet-4-6'}\n mode=\"override\"\n onAgentModelChange={(agent, model) => {\n setOverrideAgent(agent);\n setOverrideModel(model);\n }}\n disabled={isSubmitting}\n className=\"w-55\"\n />\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"ml-auto flex cursor-pointer items-center gap-2\">\n <Switch\n id=\"fast-mode\"\n checked={fast}\n onCheckedChange={setFast}\n disabled={isSubmitting}\n />\n <Label htmlFor=\"fast-mode\" className=\"cursor-pointer text-sm font-medium\">\n Fast Mode\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Skip SDLC phases and implement directly from your prompt.\n </TooltipContent>\n </Tooltip>\n </div>\n </div>\n </div>\n\n {/* Parent feature selector (only when opened from a feature node) */}\n {hasFeatures && initialParentId !== undefined ? (\n <div className=\"flex flex-col gap-1.5\">\n <Label\n htmlFor=\"parent-feature\"\n className=\"text-muted-foreground text-xs font-semibold tracking-wider\"\n >\n PARENT FEATURE\n </Label>\n <ParentFeatureCombobox\n features={features}\n value={parentId}\n onChange={setParentId}\n disabled={isSubmitting}\n />\n </div>\n ) : null}\n\n {/* Approve + Git — compact switch groups */}\n <div className=\"flex flex-col gap-2\">\n {/* Approve row */}\n <div className=\"border-input flex items-center gap-4 rounded-md border px-3 py-2.5\">\n <Tooltip>\n <TooltipTrigger asChild>\n <span className=\"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider\">\n APPROVE\n </span>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Auto-approve phase transitions without manual review.\n </TooltipContent>\n </Tooltip>\n <div className=\"flex flex-1 items-center gap-4\">\n {AUTO_APPROVE_OPTIONS.map((opt) => (\n <Tooltip key={opt.id}>\n <TooltipTrigger asChild>\n <div className=\"flex cursor-pointer items-center gap-1.5\">\n <Switch\n id={`approve-${opt.id}`}\n size=\"sm\"\n checked={approvalGates[opt.id] ?? false}\n onCheckedChange={(v) =>\n setApprovalGates((prev) => ({ ...prev, [opt.id]: v }))\n }\n disabled={\n isSubmitting ||\n (fast && (opt.id === 'allowPrd' || opt.id === 'allowPlan'))\n }\n />\n <Label\n htmlFor={`approve-${opt.id}`}\n className=\"cursor-pointer text-xs font-medium\"\n >\n {opt.label}\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n {fast && (opt.id === 'allowPrd' || opt.id === 'allowPlan')\n ? 'Skipped in Fast Mode'\n : opt.description}\n </TooltipContent>\n </Tooltip>\n ))}\n </div>\n {/* Select all shortcut */}\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={() => {\n const allOn = AUTO_APPROVE_OPTIONS.every((o) => approvalGates[o.id]);\n const next: Record<string, boolean> = {};\n for (const o of AUTO_APPROVE_OPTIONS) next[o.id] = !allOn;\n setApprovalGates(next);\n }}\n disabled={isSubmitting}\n className={cn(\n 'text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-semibold tracking-wider uppercase transition-colors',\n AUTO_APPROVE_OPTIONS.every((o) => approvalGates[o.id]) && 'text-primary'\n )}\n >\n All\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">Toggle all approval gates</TooltipContent>\n </Tooltip>\n </div>\n\n {/* Git row */}\n <div className=\"border-input flex items-center gap-4 rounded-md border px-3 py-2.5\">\n <span className=\"text-muted-foreground w-16 shrink-0 text-xs font-semibold tracking-wider\">\n GIT\n </span>\n <div className=\"flex flex-1 items-center gap-4\">\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"flex cursor-pointer items-center gap-1.5\">\n <Switch\n id=\"push\"\n size=\"sm\"\n checked={push || openPr}\n onCheckedChange={(v) => {\n setPush(v);\n if (!v && openPr) setOpenPr(false);\n }}\n disabled={isSubmitting}\n />\n <Label htmlFor=\"push\" className=\"cursor-pointer text-xs font-medium\">\n Push\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Push branch to remote after implementation.\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"flex cursor-pointer items-center gap-1.5\">\n <Switch\n id=\"open-pr\"\n size=\"sm\"\n checked={openPr}\n onCheckedChange={setOpenPr}\n disabled={isSubmitting}\n />\n <Label htmlFor=\"open-pr\" className=\"cursor-pointer text-xs font-medium\">\n PR\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Open a pull request after pushing.\n </TooltipContent>\n </Tooltip>\n </div>\n </div>\n </div>\n\n {/* Attachments */}\n <div className=\"flex flex-col gap-2\">\n <div className=\"flex items-center justify-between\">\n <Label className=\"text-muted-foreground text-xs font-semibold tracking-wider\">\n ATTACHMENTS\n {attachments.length > 0 && (\n <span className=\"text-muted-foreground/60 ml-1.5\">({attachments.length})</span>\n )}\n </Label>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"xs\"\n onClick={handleAddFiles}\n disabled={isSubmitting}\n >\n <PlusIcon className=\"size-3\" />\n Add Files\n </Button>\n </div>\n\n {attachments.length > 0 && (\n <div className=\"flex flex-col gap-2\">\n {attachments.map((file) => (\n <AttachmentCard\n key={file.path}\n file={file}\n onRemove={() => handleRemoveFile(file.path)}\n disabled={isSubmitting}\n />\n ))}\n </div>\n )}\n </div>\n </form>\n </TooltipProvider>\n </div>\n </BaseDrawer>\n );\n}\n\n/* ---------------------------------------------------------------------------\n * ParentFeatureCombobox — searchable dropdown for parent feature selection\n * ------------------------------------------------------------------------- */\n\ninterface ParentFeatureComboboxProps {\n features: ParentFeatureOption[];\n value: string | undefined;\n onChange: (id: string | undefined) => void;\n disabled?: boolean;\n}\n\nfunction ParentFeatureCombobox({\n features,\n value,\n onChange,\n disabled,\n}: ParentFeatureComboboxProps) {\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const selectedFeature = features.find((f) => f.id === value);\n\n const filtered = query.trim()\n ? features.filter(\n (f) =>\n f.name.toLowerCase().includes(query.toLowerCase()) ||\n f.id.toLowerCase().includes(query.toLowerCase())\n )\n : features;\n\n const handleSelect = useCallback(\n (id: string | undefined) => {\n onChange(id);\n setOpen(false);\n setQuery('');\n },\n [onChange]\n );\n\n useEffect(() => {\n if (open) {\n setTimeout(() => inputRef.current?.focus(), 0);\n } else {\n setQuery('');\n }\n }, [open]);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <button\n id=\"parent-feature\"\n type=\"button\"\n role=\"combobox\"\n aria-expanded={open}\n aria-label=\"Parent Feature\"\n disabled={disabled}\n data-testid=\"parent-feature-combobox\"\n className={cn(\n 'border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n !selectedFeature && 'text-muted-foreground'\n )}\n >\n <span className=\"truncate\">\n {selectedFeature\n ? `${selectedFeature.name} (${selectedFeature.id.slice(0, 8)})`\n : 'Select parent feature...'}\n </span>\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-80 p-0\"\n align=\"start\"\n data-testid=\"parent-feature-combobox-content\"\n >\n <div className=\"flex flex-col\">\n {/* Search input */}\n <div className=\"border-b p-2\">\n <Input\n ref={inputRef}\n placeholder=\"Search features...\"\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n className=\"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0\"\n data-testid=\"parent-feature-search\"\n />\n </div>\n\n {/* Options list */}\n <div className=\"max-h-48 overflow-y-auto py-1\" role=\"listbox\" aria-label=\"Features\">\n {/* No parent option */}\n <button\n type=\"button\"\n role=\"option\"\n aria-selected={value === undefined}\n onClick={() => handleSelect(undefined)}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm',\n value === undefined && 'bg-accent/50'\n )}\n data-testid=\"parent-feature-option-none\"\n >\n <CheckIcon className={cn('h-4 w-4 shrink-0', value !== undefined && 'invisible')} />\n <span className=\"text-muted-foreground italic\">No parent</span>\n </button>\n\n {filtered.length === 0 && query ? (\n <p className=\"text-muted-foreground px-3 py-2 text-sm\">No features found.</p>\n ) : (\n filtered.map((f) => (\n <button\n key={f.id}\n type=\"button\"\n role=\"option\"\n aria-selected={value === f.id}\n onClick={() => handleSelect(f.id)}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm',\n value === f.id && 'bg-accent/50'\n )}\n data-testid={`parent-feature-option-${f.id}`}\n >\n <CheckIcon className={cn('h-4 w-4 shrink-0', value !== f.id && 'invisible')} />\n <span className=\"truncate\">\n {f.name}{' '}\n <span className=\"text-muted-foreground font-mono text-xs\">\n ({f.id.slice(0, 8)})\n </span>\n </span>\n </button>\n ))\n )}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n\n/* ---------------------------------------------------------------------------\n * Private sub-components & utilities\n * ------------------------------------------------------------------------- */\n\nfunction AttachmentCard({\n file,\n onRemove,\n disabled,\n}: {\n file: FileAttachment;\n onRemove: () => void;\n disabled?: boolean;\n}) {\n const ext = getExtension(file.name);\n const Icon = getFileIcon(ext);\n const iconColorClass = getFileIconColor(ext);\n\n return (\n <div className=\"flex items-center gap-3 rounded-md border p-2\">\n <div\n className={cn('flex h-8 w-8 shrink-0 items-center justify-center rounded', iconColorClass)}\n >\n <Icon className=\"h-4 w-4\" />\n </div>\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"truncate text-sm font-medium\">{file.name}</span>\n <span className=\"text-muted-foreground truncate text-xs\">{file.path}</span>\n <span className=\"text-muted-foreground text-xs\">{formatFileSize(file.size)}</span>\n </div>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-xs\"\n onClick={onRemove}\n disabled={disabled}\n aria-label={`Remove ${file.name}`}\n >\n <Trash2Icon className=\"h-3 w-3\" />\n </Button>\n </div>\n );\n}\n\nfunction getExtension(filename: string): string {\n const dot = filename.lastIndexOf('.');\n return dot >= 0 ? filename.slice(dot).toLowerCase() : '';\n}\n\nconst IMAGE_EXTS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico', '.bmp']);\nconst CODE_EXTS = new Set([\n '.ts',\n '.tsx',\n '.js',\n '.jsx',\n '.json',\n '.yaml',\n '.yml',\n '.xml',\n '.html',\n '.css',\n '.md',\n]);\n\nfunction getFileIcon(ext: string): LucideIcon {\n if (IMAGE_EXTS.has(ext)) return ImageIcon;\n if (ext === '.pdf') return FileTextIcon;\n if (CODE_EXTS.has(ext)) return CodeIcon;\n return FileIcon;\n}\n\nfunction getFileIconColor(ext: string): string {\n if (ext === '.pdf') return 'bg-red-50 text-red-600';\n if (IMAGE_EXTS.has(ext)) return 'bg-blue-50 text-blue-600';\n if (CODE_EXTS.has(ext)) return 'bg-emerald-50 text-emerald-600';\n return 'bg-gray-50 text-gray-600';\n}\n\nfunction formatFileSize(bytes: number): string {\n if (bytes === 0) return '0 B';\n const units = ['B', 'KB', 'MB', 'GB'];\n const i = Math.floor(Math.log(bytes) / Math.log(1024));\n return `${(bytes / Math.pow(1024, i)).toFixed(i === 0 ? 0 : 1)} ${units[i]}`;\n}\n","import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n 'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Textarea };\n","import type { FileAttachment } from '@shepai/core/infrastructure/services/file-dialog.service';\n\n/**\n * Opens a native OS file picker dialog via API route.\n * Returns the selected files with metadata, or null if the user cancelled.\n */\nexport async function pickFiles(): Promise<FileAttachment[] | null> {\n const res = await fetch('/api/dialog/pick-files', { method: 'POST' });\n\n if (!res.ok) {\n throw new Error('Failed to open file dialog');\n }\n\n const data: { files: FileAttachment[] | null; cancelled: boolean } = await res.json();\n return data.cancelled ? null : data.files;\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'm7 15 5 5 5-5', key: '1hf1tw' }],\n ['path', { d: 'm7 9 5-5 5 5', key: 'sgt6xg' }],\n];\n\n/**\n * @component @name ChevronsUpDown\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/chevrons-up-down\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronsUpDown = createLucideIcon('chevrons-up-down', __iconNode);\n\nexport default ChevronsUpDown;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', ry: '2', key: '1m3agn' }],\n ['circle', { cx: '9', cy: '9', r: '2', key: 'af1f0g' }],\n ['path', { d: 'm21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21', key: '1xmnt7' }],\n];\n\n/**\n * @component @name Image\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/image\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Image = createLucideIcon('image', __iconNode);\n\nexport default Image;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n];\n\n/**\n * @component @name File\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst File = createLucideIcon('file', __iconNode);\n\nexport default File;\n"],"names":[],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OCJwM,EAAA,EAAA,CAAA,CAAA,OAAsG,IAAM,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,mDMyB7b,CAAA,CAAA,CAAA,CAAA,AAAM,CAAN,CAAM,CAAA,CAAA,CAAO,AAAP,CAAO,AAAP,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,AAAiB,CAAjB,AAAiB,CAAjB,AAAiB,CAAjB,AAAiB,CAAjB,AAAiB,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,AAlBvC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,AFYH,CEZG,AFYH,CEZG,AFYH,gHEXK,EAET,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,AAAQ,CAAA,AAAE,EAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,AAA2B,CAAA,CAAA,CAAA,CA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GAAA,EAAC,EAAA,CACC,KAAM,EACN,QAAS,EACT,SAAU,EACV,eAAgB,EAChB,SAAU,EACV,iBAAkB,EAClB,gBAAiB,EACjB,aAAc,EACd,iBAAkB,EAClB,aAAc,GAGpB","ignoreList":[5,6,7]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[61199,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(50845),l=a.i(49560),m=a.i(39353),n=a.i(29207),o=a.i(31075);a.s([],43119),a.i(43119),a.s(["
|
|
1
|
+
module.exports=[61199,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(50845),l=a.i(49560),m=a.i(39353),n=a.i(29207),o=a.i(31075);a.s([],43119),a.i(43119),a.s(["000699eab8d70fd3f1a11a4317f3388a7dc464e4fc",()=>o.fetchGraphData,"00b361fddbec8f1928949f9c35f89fa78dc350a6fa",()=>b.pickFolder,"4018902d96dfe6ec4c029bc41d5e042d6dcbbc1fd6",()=>e.deployRepository,"401cf6bbb747c1446fb3ee5f161b1ab590a858f553",()=>d.deployFeature,"402652b09e6262088f40b9571b7df270008f563e16",()=>f.stopDeployment,"4040d22a0b494874a13e68310de4c86c483a6b0601",()=>n.getFeatureMetadata,"40621fa7f4915ec0bf80acd0fb7cdc0695aeb39ddd",()=>m.deleteRepository,"4092118d166e72dcccac48942435fa9191ff46c4df",()=>i.openShell,"40a8b730cbfe3d55165e62254c488ebdae9ed5d4c5",()=>c.getDeploymentLogs,"40b70c7cccc30d932e8d0450cb625b152c56882b6a",()=>l.addRepository,"40d975d869d467b85eec11ff2240ca8fdf65e2bd0e",()=>h.openIde,"40d9b2ac0e8ef1a2a08fb849d3fe083d0d05f6e354",()=>k.deleteFeature,"40dc5f96743f909f22fc8d2e92fd1ed51d4cbfb7f4",()=>j.openFolder,"40ed39947dbf9ba3a01e72a4c178439f16e7839315",()=>g.getDeploymentStatus],61199)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=8ba4b_server_app_%28dashboard%29_%40drawer_repository_%5BrepositoryId%5D_page_actions_da7eef33.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/%40drawer/repository/%5BrepositoryId%5D/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/%40drawer/repository/%5BrepositoryId%5D/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '00b361fddbec8f1928949f9c35f89fa78dc350a6fa'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40a8b730cbfe3d55165e62254c488ebdae9ed5d4c5'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '401cf6bbb747c1446fb3ee5f161b1ab590a858f553'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '4018902d96dfe6ec4c029bc41d5e042d6dcbbc1fd6'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '402652b09e6262088f40b9571b7df270008f563e16'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40ed39947dbf9ba3a01e72a4c178439f16e7839315'} from 'ACTIONS_MODULE5'\nexport {openIde as '40d975d869d467b85eec11ff2240ca8fdf65e2bd0e'} from 'ACTIONS_MODULE6'\nexport {openShell as '4092118d166e72dcccac48942435fa9191ff46c4df'} from 'ACTIONS_MODULE7'\nexport {openFolder as '40dc5f96743f909f22fc8d2e92fd1ed51d4cbfb7f4'} from 'ACTIONS_MODULE8'\nexport {deleteFeature as '40d9b2ac0e8ef1a2a08fb849d3fe083d0d05f6e354'} from 'ACTIONS_MODULE9'\nexport {addRepository as '40b70c7cccc30d932e8d0450cb625b152c56882b6a'} from 'ACTIONS_MODULE10'\nexport {deleteRepository as '40621fa7f4915ec0bf80acd0fb7cdc0695aeb39ddd'} from 'ACTIONS_MODULE11'\nexport {getFeatureMetadata as '4040d22a0b494874a13e68310de4c86c483a6b0601'} from 'ACTIONS_MODULE12'\nexport {fetchGraphData as '000699eab8d70fd3f1a11a4317f3388a7dc464e4fc'} from 'ACTIONS_MODULE13'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[23956,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(50845),l=a.i(49560),m=a.i(39353),n=a.i(29207),o=a.i(31075);a.s([],25128),a.i(25128),a.s(["
|
|
1
|
+
module.exports=[23956,a=>{"use strict";var b=a.i(12513),c=a.i(94691),d=a.i(33841),e=a.i(46646),f=a.i(68670),g=a.i(85321),h=a.i(84095),i=a.i(56799),j=a.i(80496),k=a.i(50845),l=a.i(49560),m=a.i(39353),n=a.i(29207),o=a.i(31075);a.s([],25128),a.i(25128),a.s(["000699eab8d70fd3f1a11a4317f3388a7dc464e4fc",()=>o.fetchGraphData,"00b361fddbec8f1928949f9c35f89fa78dc350a6fa",()=>b.pickFolder,"4018902d96dfe6ec4c029bc41d5e042d6dcbbc1fd6",()=>e.deployRepository,"401cf6bbb747c1446fb3ee5f161b1ab590a858f553",()=>d.deployFeature,"402652b09e6262088f40b9571b7df270008f563e16",()=>f.stopDeployment,"4040d22a0b494874a13e68310de4c86c483a6b0601",()=>n.getFeatureMetadata,"40621fa7f4915ec0bf80acd0fb7cdc0695aeb39ddd",()=>m.deleteRepository,"4092118d166e72dcccac48942435fa9191ff46c4df",()=>i.openShell,"40a8b730cbfe3d55165e62254c488ebdae9ed5d4c5",()=>c.getDeploymentLogs,"40b70c7cccc30d932e8d0450cb625b152c56882b6a",()=>l.addRepository,"40d975d869d467b85eec11ff2240ca8fdf65e2bd0e",()=>h.openIde,"40d9b2ac0e8ef1a2a08fb849d3fe083d0d05f6e354",()=>k.deleteFeature,"40dc5f96743f909f22fc8d2e92fd1ed51d4cbfb7f4",()=>j.openFolder,"40ed39947dbf9ba3a01e72a4c178439f16e7839315",()=>g.getDeploymentStatus],23956)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=8ba4b_server_app_%28dashboard%29_repository_%5BrepositoryId%5D_page_actions_0a9251aa.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/repository/%5BrepositoryId%5D/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/repository/%5BrepositoryId%5D/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '00b361fddbec8f1928949f9c35f89fa78dc350a6fa'} from 'ACTIONS_MODULE0'\nexport {getDeploymentLogs as '40a8b730cbfe3d55165e62254c488ebdae9ed5d4c5'} from 'ACTIONS_MODULE1'\nexport {deployFeature as '401cf6bbb747c1446fb3ee5f161b1ab590a858f553'} from 'ACTIONS_MODULE2'\nexport {deployRepository as '4018902d96dfe6ec4c029bc41d5e042d6dcbbc1fd6'} from 'ACTIONS_MODULE3'\nexport {stopDeployment as '402652b09e6262088f40b9571b7df270008f563e16'} from 'ACTIONS_MODULE4'\nexport {getDeploymentStatus as '40ed39947dbf9ba3a01e72a4c178439f16e7839315'} from 'ACTIONS_MODULE5'\nexport {openIde as '40d975d869d467b85eec11ff2240ca8fdf65e2bd0e'} from 'ACTIONS_MODULE6'\nexport {openShell as '4092118d166e72dcccac48942435fa9191ff46c4df'} from 'ACTIONS_MODULE7'\nexport {openFolder as '40dc5f96743f909f22fc8d2e92fd1ed51d4cbfb7f4'} from 'ACTIONS_MODULE8'\nexport {deleteFeature as '40d9b2ac0e8ef1a2a08fb849d3fe083d0d05f6e354'} from 'ACTIONS_MODULE9'\nexport {addRepository as '40b70c7cccc30d932e8d0450cb625b152c56882b6a'} from 'ACTIONS_MODULE10'\nexport {deleteRepository as '40621fa7f4915ec0bf80acd0fb7cdc0695aeb39ddd'} from 'ACTIONS_MODULE11'\nexport {getFeatureMetadata as '4040d22a0b494874a13e68310de4c86c483a6b0601'} from 'ACTIONS_MODULE12'\nexport {fetchGraphData as '000699eab8d70fd3f1a11a4317f3388a7dc464e4fc'} from 'ACTIONS_MODULE13'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
module.exports=[92658,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(28478)},12581,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
|
|
2
|
-
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},12513,a=>{"use strict";var b=a.i(92658),c=a.i(74533);let d={platform:process.platform,exec:(a,b)=>(0,c.execSync)(a,b)},e={darwin:"osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'",linux:'zenity --file-selection --directory --title="Select a repository folder" 2>/dev/null',win32:"powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\""};class f{deps;constructor(a={}){this.deps={...d,...a}}getCommand(){return e[this.deps.platform]??null}pickFolder(){let a=this.getCommand();if(!a)throw Error(`Unsupported platform: ${this.deps.platform}`);try{let b=this.deps.exec(a,{encoding:"utf-8",timeout:6e4}).trim();return b.length>0?b:null}catch(a){var b;if("object"==typeof(b=a)&&null!==b&&"status"in b&&1===a.status)return null;throw a}}}async function g(){let a=new f;try{return{path:a.pickFolder()}}catch(a){return{path:null,error:a instanceof Error?a.message:"Failed to open folder dialog"}}}(0,a.i(12581).ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"
|
|
2
|
+
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},12513,a=>{"use strict";var b=a.i(92658),c=a.i(74533);let d={platform:process.platform,exec:(a,b)=>(0,c.execSync)(a,b)},e={darwin:"osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'",linux:'zenity --file-selection --directory --title="Select a repository folder" 2>/dev/null',win32:"powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\""};class f{deps;constructor(a={}){this.deps={...d,...a}}getCommand(){return e[this.deps.platform]??null}pickFolder(){let a=this.getCommand();if(!a)throw Error(`Unsupported platform: ${this.deps.platform}`);try{let b=this.deps.exec(a,{encoding:"utf-8",timeout:6e4}).trim();return b.length>0?b:null}catch(a){var b;if("object"==typeof(b=a)&&null!==b&&"status"in b&&1===a.status)return null;throw a}}}async function g(){let a=new f;try{return{path:a.pickFolder()}}catch(a){return{path:null,error:a instanceof Error?a.message:"Failed to open folder dialog"}}}(0,a.i(12581).ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"00b361fddbec8f1928949f9c35f89fa78dc350a6fa",null),a.s(["pickFolder",()=>g],12513)},66973,a=>{"use strict";var b=a.i(12513);a.s([],65794),a.i(65794),a.s(["00b361fddbec8f1928949f9c35f89fa78dc350a6fa",()=>b.pickFolder],66973)}];
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=%5Broot-of-the-server%5D__11033878._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../../../packages/core/src/infrastructure/services/folder-dialog.service.ts","../../../../../../../src/presentation/web/app/actions/pick-folder.ts","../../../../../../../src/presentation/web/.next-internal/server/app/_not-found/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","import { execSync } from 'node:child_process';\n\nexport interface FolderDialogDeps {\n platform: NodeJS.Platform;\n exec: (cmd: string, opts?: { encoding: BufferEncoding; timeout?: number }) => string;\n}\n\nconst defaultDeps: FolderDialogDeps = {\n platform: process.platform,\n exec: (cmd, opts) => execSync(cmd, opts) as unknown as string,\n};\n\n/**\n * Platform-specific commands that open a native OS folder picker dialog.\n * Each returns the chosen absolute folder path on stdout, or exits non-zero / returns empty on cancel.\n */\nconst PLATFORM_COMMANDS: Record<string, string> = {\n darwin: `osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'`,\n linux: `zenity --file-selection --directory --title=\"Select a repository folder\" 2>/dev/null`,\n win32: `powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\"`,\n};\n\nexport class FolderDialogService {\n private deps: FolderDialogDeps;\n\n constructor(deps: Partial<FolderDialogDeps> = {}) {\n this.deps = { ...defaultDeps, ...deps };\n }\n\n /** Returns the OS-specific command string, or null if the platform is unsupported. */\n getCommand(): string | null {\n return PLATFORM_COMMANDS[this.deps.platform] ?? null;\n }\n\n /**\n * Opens a native folder picker dialog and returns the selected absolute path.\n * Returns `null` if the user cancels the dialog.\n * Throws if the platform is unsupported or the command fails unexpectedly.\n */\n pickFolder(): string | null {\n const command = this.getCommand();\n if (!command) {\n throw new Error(`Unsupported platform: ${this.deps.platform}`);\n }\n\n try {\n const result = this.deps.exec(command, { encoding: 'utf-8', timeout: 60_000 });\n const trimmed = result.trim();\n return trimmed.length > 0 ? trimmed : null;\n } catch (error: unknown) {\n // User cancelled the dialog — exit code 1 from osascript/zenity/powershell\n if (isExecError(error) && error.status === 1) {\n return null;\n }\n throw error;\n }\n }\n}\n\nfunction isExecError(error: unknown): error is { status: number } {\n return typeof error === 'object' && error !== null && 'status' in error;\n}\n","'use server';\n\nimport { FolderDialogService } from '@shepai/core/infrastructure/services/folder-dialog.service';\n\nexport async function pickFolder(): Promise<{ path: string | null; error?: string }> {\n const service = new FolderDialogService();\n\n try {\n const path = service.pickFolder();\n return { path };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open folder dialog';\n return { path: null, error: message };\n }\n}\n","export {pickFolder as '
|
|
1
|
+
{"version":3,"sources":["../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../../../packages/core/src/infrastructure/services/folder-dialog.service.ts","../../../../../../../src/presentation/web/app/actions/pick-folder.ts","../../../../../../../src/presentation/web/.next-internal/server/app/_not-found/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","import { execSync } from 'node:child_process';\n\nexport interface FolderDialogDeps {\n platform: NodeJS.Platform;\n exec: (cmd: string, opts?: { encoding: BufferEncoding; timeout?: number }) => string;\n}\n\nconst defaultDeps: FolderDialogDeps = {\n platform: process.platform,\n exec: (cmd, opts) => execSync(cmd, opts) as unknown as string,\n};\n\n/**\n * Platform-specific commands that open a native OS folder picker dialog.\n * Each returns the chosen absolute folder path on stdout, or exits non-zero / returns empty on cancel.\n */\nconst PLATFORM_COMMANDS: Record<string, string> = {\n darwin: `osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'`,\n linux: `zenity --file-selection --directory --title=\"Select a repository folder\" 2>/dev/null`,\n win32: `powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\"`,\n};\n\nexport class FolderDialogService {\n private deps: FolderDialogDeps;\n\n constructor(deps: Partial<FolderDialogDeps> = {}) {\n this.deps = { ...defaultDeps, ...deps };\n }\n\n /** Returns the OS-specific command string, or null if the platform is unsupported. */\n getCommand(): string | null {\n return PLATFORM_COMMANDS[this.deps.platform] ?? null;\n }\n\n /**\n * Opens a native folder picker dialog and returns the selected absolute path.\n * Returns `null` if the user cancels the dialog.\n * Throws if the platform is unsupported or the command fails unexpectedly.\n */\n pickFolder(): string | null {\n const command = this.getCommand();\n if (!command) {\n throw new Error(`Unsupported platform: ${this.deps.platform}`);\n }\n\n try {\n const result = this.deps.exec(command, { encoding: 'utf-8', timeout: 60_000 });\n const trimmed = result.trim();\n return trimmed.length > 0 ? trimmed : null;\n } catch (error: unknown) {\n // User cancelled the dialog — exit code 1 from osascript/zenity/powershell\n if (isExecError(error) && error.status === 1) {\n return null;\n }\n throw error;\n }\n }\n}\n\nfunction isExecError(error: unknown): error is { status: number } {\n return typeof error === 'object' && error !== null && 'status' in error;\n}\n","'use server';\n\nimport { FolderDialogService } from '@shepai/core/infrastructure/services/folder-dialog.service';\n\nexport async function pickFolder(): Promise<{ path: string | null; error?: string }> {\n const service = new FolderDialogService();\n\n try {\n const path = service.pickFolder();\n return { path };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open folder dialog';\n return { path: null, error: message };\n }\n}\n","export {pickFolder as '00b361fddbec8f1928949f9c35f89fa78dc350a6fa'} from 'ACTIONS_MODULE0'\n"],"names":["registerServerReference","ensureServerEntryExports","actions","i","length","action","Error"],"mappings":"6CAAoD,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CA,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,iCCEjC,SAASC,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAsB,YAAlB,AAA8B,OAAvBE,EACT,MAAM,OAAA,cAEL,CAFK,AAAIC,MACR,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,EADhJ,oBAAA,OAAA,mBAAA,gBAAA,CAEN,EAEJ,CACF,0EATgBJ,2BAAAA,qCAAAA,qICHhB,EAAA,EAAA,CAA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CAAA,8DCJtB,IAAA,EAAA,EAAA,CAAA,CAAA","ignoreList":[0,1]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},47407,a=>{a.n(a.i(5983))},59975,a=>{a.n(a.i(72884))},63754,a=>{a.n(a.i(39838))},27075,a=>{a.n(a.i(26048))},37458,a=>{a.n(a.i(72330))},32459,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(28478).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/presentation/web/components/features/version/version-page-client.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/presentation/web/components/features/version/version-page-client.tsx <module evaluation>","default")},93933,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(28478).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/presentation/web/components/features/version/version-page-client.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/presentation/web/components/features/version/version-page-client.tsx","default")},67651,a=>{"use strict";a.i(32459);var b=a.i(93933);a.n(b)},77048,a=>{"use strict";var b=a.i(92807),c=a.i(60526),d=a.i(67651);function e(){let a={nodeVersion:process.version,platform:(0,c.platform)(),arch:(0,c.arch)()};return(0,b.jsx)(d.default,{versionInfo:{version:"1.
|
|
1
|
+
module.exports=[60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},47407,a=>{a.n(a.i(5983))},59975,a=>{a.n(a.i(72884))},63754,a=>{a.n(a.i(39838))},27075,a=>{a.n(a.i(26048))},37458,a=>{a.n(a.i(72330))},32459,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(28478).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/presentation/web/components/features/version/version-page-client.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/presentation/web/components/features/version/version-page-client.tsx <module evaluation>","default")},93933,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(28478).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/presentation/web/components/features/version/version-page-client.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/presentation/web/components/features/version/version-page-client.tsx","default")},67651,a=>{"use strict";a.i(32459);var b=a.i(93933);a.n(b)},77048,a=>{"use strict";var b=a.i(92807),c=a.i(60526),d=a.i(67651);function e(){let a={nodeVersion:process.version,platform:(0,c.platform)(),arch:(0,c.arch)()};return(0,b.jsx)(d.default,{versionInfo:{version:"1.79.0",name:"@shepai/cli",description:"Autonomous AI Native SDLC Platform - Automate the development cycle from idea to deploy"},systemInfo:a})}a.s(["default",()=>e],77048)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__357d99f9._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
module.exports=[92658,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(28478)},12581,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
|
|
2
|
-
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},12513,a=>{"use strict";var b=a.i(92658),c=a.i(74533);let d={platform:process.platform,exec:(a,b)=>(0,c.execSync)(a,b)},e={darwin:"osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'",linux:'zenity --file-selection --directory --title="Select a repository folder" 2>/dev/null',win32:"powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\""};class f{deps;constructor(a={}){this.deps={...d,...a}}getCommand(){return e[this.deps.platform]??null}pickFolder(){let a=this.getCommand();if(!a)throw Error(`Unsupported platform: ${this.deps.platform}`);try{let b=this.deps.exec(a,{encoding:"utf-8",timeout:6e4}).trim();return b.length>0?b:null}catch(a){var b;if("object"==typeof(b=a)&&null!==b&&"status"in b&&1===a.status)return null;throw a}}}async function g(){let a=new f;try{return{path:a.pickFolder()}}catch(a){return{path:null,error:a instanceof Error?a.message:"Failed to open folder dialog"}}}(0,a.i(12581).ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"
|
|
2
|
+
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},12513,a=>{"use strict";var b=a.i(92658),c=a.i(74533);let d={platform:process.platform,exec:(a,b)=>(0,c.execSync)(a,b)},e={darwin:"osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'",linux:'zenity --file-selection --directory --title="Select a repository folder" 2>/dev/null',win32:"powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\""};class f{deps;constructor(a={}){this.deps={...d,...a}}getCommand(){return e[this.deps.platform]??null}pickFolder(){let a=this.getCommand();if(!a)throw Error(`Unsupported platform: ${this.deps.platform}`);try{let b=this.deps.exec(a,{encoding:"utf-8",timeout:6e4}).trim();return b.length>0?b:null}catch(a){var b;if("object"==typeof(b=a)&&null!==b&&"status"in b&&1===a.status)return null;throw a}}}async function g(){let a=new f;try{return{path:a.pickFolder()}}catch(a){return{path:null,error:a instanceof Error?a.message:"Failed to open folder dialog"}}}(0,a.i(12581).ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"00b361fddbec8f1928949f9c35f89fa78dc350a6fa",null),a.s(["pickFolder",()=>g],12513)},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},32278,a=>{"use strict";a.i(12714);var b=a.i(60526),c=a.i(50227);function d(){return process.env.SHEP_HOME??(0,c.join)((0,b.homedir)(),".shep")}a.i(2157),a.s(["getShepHomeDir",()=>d])},66680,(a,b,c)=>{b.exports=a.x("node:crypto",()=>require("node:crypto"))},94691,29918,33841,46646,68670,85321,a=>{"use strict";var b=a.i(92658),c=a.i(96380),d=a.i(12581);async function e(a){return a?.trim()?(0,c.resolve)("IDeploymentService").getLogs(a):null}(0,d.ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"40a8b730cbfe3d55165e62254c488ebdae9ed5d4c5",null),a.s(["getDeploymentLogs",()=>e],94691);var f=a.i(2157);let g=()=>void 0;function h(a){let b=!!process.env.DEBUG;return{info:b?(...b)=>console.info(a,...b):g,debug:b?(...b)=>console.debug(a,...b):g,warn:(...b)=>console.warn(a,...b),error:(...b)=>console.error(a,...b)}}var i=a.i(66680),j=a.i(50227),k=a.i(32278);function l(a,b){let c=(0,i.createHash)("sha256").update(a).digest("hex").slice(0,16),d=b.replace(/\//g,"-");return(0,j.join)((0,k.getShepHomeDir)(),"repos",c,"wt",d)}a.s(["computeWorktreePath",()=>l],29918);var m=a.i(81719);let n=h("[deployFeature]");async function o(a){if(n.info(`called — featureId="${a}"`),!a?.trim())return n.warn("rejected — featureId is empty"),{success:!1,error:"featureId is required"};try{let b=(0,c.resolve)("IFeatureRepository"),d=await b.findById(a);if(!d)return n.warn(`feature not found in repository: "${a}"`),{success:!1,error:`Feature not found: ${a}`};n.info(`feature found — repositoryPath="${d.repositoryPath}", branch="${d.branch}"`);let e=l(d.repositoryPath,d.branch);if(n.info(`computed worktreePath="${e}"`),!(0,f.existsSync)(e))return n.warn(`worktree path does not exist on disk: "${e}"`),{success:!1,error:`Worktree path does not exist: ${e}`};return n.info("worktree path exists, calling deploymentService.start()"),(0,c.resolve)("IDeploymentService").start(a,e),n.info("start() returned successfully — state=Booting"),{success:!0,state:m.DeploymentState.Booting}}catch(b){let a=b instanceof Error?b.message:"Failed to deploy feature";return n.error(`error: ${a}`,b),{success:!1,error:a}}}(0,d.ensureServerEntryExports)([o]),(0,b.registerServerReference)(o,"401cf6bbb747c1446fb3ee5f161b1ab590a858f553",null),a.s(["deployFeature",()=>o],33841);let p=h("[deployRepository]");async function q(a){if(p.info(`called — repositoryPath="${a}"`),!a?.startsWith("/"))return p.warn("rejected — not an absolute path"),{success:!1,error:"repositoryPath must be an absolute path"};try{if(!(0,f.existsSync)(a))return p.warn(`directory does not exist: "${a}"`),{success:!1,error:`Directory does not exist: ${a}`};return p.info("directory exists, calling deploymentService.start()"),(0,c.resolve)("IDeploymentService").start(a,a),p.info("start() returned successfully — state=Booting"),{success:!0,state:m.DeploymentState.Booting}}catch(b){let a=b instanceof Error?b.message:"Failed to deploy repository";return p.error(`error: ${a}`,b),{success:!1,error:a}}}async function r(a){if(!a?.trim())return{success:!1,error:"targetId is required"};try{let b=(0,c.resolve)("IDeploymentService");return await b.stop(a),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to stop deployment"}}}async function s(a){return a?.trim()?(0,c.resolve)("IDeploymentService").getStatus(a):null}(0,d.ensureServerEntryExports)([q]),(0,b.registerServerReference)(q,"4018902d96dfe6ec4c029bc41d5e042d6dcbbc1fd6",null),a.s(["deployRepository",()=>q],46646),(0,d.ensureServerEntryExports)([r]),(0,b.registerServerReference)(r,"402652b09e6262088f40b9571b7df270008f563e16",null),a.s(["stopDeployment",()=>r],68670),(0,d.ensureServerEntryExports)([s]),(0,b.registerServerReference)(s,"40ed39947dbf9ba3a01e72a4c178439f16e7839315",null),a.s(["getDeploymentStatus",()=>s],85321)},84095,56799,80496,50845,49560,39353,29207,31075,a=>{"use strict";var b=a.i(92658),c=a.i(33244),d=a.i(96380),e=a.i(12581);async function f(a){let{repositoryPath:b,branch:e}=a;if(!b?.startsWith("/"))return{success:!1,error:"repositoryPath must be an absolute path"};let f=(0,c.getSettings)().environment.defaultEditor,g=(0,d.resolve)("LaunchIdeUseCase"),h=await g.execute({editorId:f,repositoryPath:b,branch:e,checkAvailability:!0});return h.ok?{success:!0,editor:h.editorName,path:h.worktreePath}:{success:!1,error:h.message}}(0,e.ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"40d975d869d467b85eec11ff2240ca8fdf65e2bd0e",null),a.s(["openIde",()=>f],84095);var g=a.i(2157),h=a.i(60526),i=a.i(74533),j=a.i(29918);let k={darwin:{cmd:"open",args:a=>["-a","Terminal",a]},linux:{cmd:"x-terminal-emulator",args:a=>[`--working-directory=${a}`]}};async function l(a){let{repositoryPath:b,branch:d}=a;if(!b?.startsWith("/"))return{success:!1,error:"repositoryPath must be an absolute path"};try{let a=(0,c.getSettings)().environment.shellPreference,e=d?(0,j.computeWorktreePath)(b,d):b;if(!(0,g.existsSync)(e))return{success:!1,error:`Path does not exist: ${e}`};let f=k[(0,h.platform)()];if(!f)return{success:!1,error:`Unsupported platform: ${(0,h.platform)()}. Shell launch is supported on macOS and Linux only.`};let l=(0,i.spawn)(f.cmd,f.args(e),{detached:!0,stdio:"ignore"});return l.on("error",()=>void 0),l.unref(),{success:!0,path:e,shell:a}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to open shell"}}}(0,e.ensureServerEntryExports)([l]),(0,b.registerServerReference)(l,"4092118d166e72dcccac48942435fa9191ff46c4df",null),a.s(["openShell",()=>l],56799);let m={darwin:{cmd:"open",args:a=>[a]},linux:{cmd:"xdg-open",args:a=>[a]}};async function n(a){if(!a?.startsWith("/"))return{success:!1,error:"repositoryPath must be an absolute path"};try{if(!(0,g.existsSync)(a))return{success:!1,error:"Directory not found"};let b=m[(0,h.platform)()];if(!b)return{success:!1,error:`Unsupported platform: ${(0,h.platform)()}. Folder open is supported on macOS and Linux only.`};let c=(0,i.spawn)(b.cmd,b.args(a),{detached:!0,stdio:"ignore"});return c.on("error",()=>void 0),c.unref(),{success:!0,path:a}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to open folder"}}}async function o(a){if(!a?.trim())return{error:"id is required"};try{let b=(0,d.resolve)("DeleteFeatureUseCase");return{feature:await b.execute(a)}}catch(a){return{error:a instanceof Error?a.message:"Failed to delete feature"}}}async function p(a){let{path:b,name:c}=a;if(!b?.trim())return{error:"path is required"};try{let a=(0,d.resolve)("AddRepositoryUseCase");return{repository:await a.execute({path:b,name:c})}}catch(a){return{error:a instanceof Error?a.message:"Failed to add repository"}}}async function q(a){if(!a?.trim())return{success:!1,error:"id is required"};try{let b=(0,d.resolve)("DeleteRepositoryUseCase");return await b.execute(a),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to delete repository"}}}async function r(a){let b=(0,d.resolve)("IFeatureRepository"),c=await b.findById(a);return c?{name:c.name,description:c.description}:null}(0,e.ensureServerEntryExports)([n]),(0,b.registerServerReference)(n,"40dc5f96743f909f22fc8d2e92fd1ed51d4cbfb7f4",null),a.s(["openFolder",()=>n],80496),(0,e.ensureServerEntryExports)([o]),(0,b.registerServerReference)(o,"40d9b2ac0e8ef1a2a08fb849d3fe083d0d05f6e354",null),a.s(["deleteFeature",()=>o],50845),(0,e.ensureServerEntryExports)([p]),(0,b.registerServerReference)(p,"40b70c7cccc30d932e8d0450cb625b152c56882b6a",null),a.s(["addRepository",()=>p],49560),(0,e.ensureServerEntryExports)([q]),(0,b.registerServerReference)(q,"40621fa7f4915ec0bf80acd0fb7cdc0695aeb39ddd",null),a.s(["deleteRepository",()=>q],39353),(0,e.ensureServerEntryExports)([r]),(0,b.registerServerReference)(r,"4040d22a0b494874a13e68310de4c86c483a6b0601",null),a.s(["getFeatureMetadata",()=>r],29207);var s=a.i(66693);async function t(){return(0,s.getGraphData)()}(0,e.ensureServerEntryExports)([t]),(0,b.registerServerReference)(t,"000699eab8d70fd3f1a11a4317f3388a7dc464e4fc",null),a.s(["fetchGraphData",()=>t],31075)}];
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=%5Broot-of-the-server%5D__4be9a9bb._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
module.exports=[92658,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(28478)},12581,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
|
|
2
|
-
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},12513,a=>{"use strict";var b=a.i(92658),c=a.i(74533);let d={platform:process.platform,exec:(a,b)=>(0,c.execSync)(a,b)},e={darwin:"osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'",linux:'zenity --file-selection --directory --title="Select a repository folder" 2>/dev/null',win32:"powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\""};class f{deps;constructor(a={}){this.deps={...d,...a}}getCommand(){return e[this.deps.platform]??null}pickFolder(){let a=this.getCommand();if(!a)throw Error(`Unsupported platform: ${this.deps.platform}`);try{let b=this.deps.exec(a,{encoding:"utf-8",timeout:6e4}).trim();return b.length>0?b:null}catch(a){var b;if("object"==typeof(b=a)&&null!==b&&"status"in b&&1===a.status)return null;throw a}}}async function g(){let a=new f;try{return{path:a.pickFolder()}}catch(a){return{path:null,error:a instanceof Error?a.message:"Failed to open folder dialog"}}}(0,a.i(12581).ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"
|
|
2
|
+
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},12513,a=>{"use strict";var b=a.i(92658),c=a.i(74533);let d={platform:process.platform,exec:(a,b)=>(0,c.execSync)(a,b)},e={darwin:"osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'",linux:'zenity --file-selection --directory --title="Select a repository folder" 2>/dev/null',win32:"powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\""};class f{deps;constructor(a={}){this.deps={...d,...a}}getCommand(){return e[this.deps.platform]??null}pickFolder(){let a=this.getCommand();if(!a)throw Error(`Unsupported platform: ${this.deps.platform}`);try{let b=this.deps.exec(a,{encoding:"utf-8",timeout:6e4}).trim();return b.length>0?b:null}catch(a){var b;if("object"==typeof(b=a)&&null!==b&&"status"in b&&1===a.status)return null;throw a}}}async function g(){let a=new f;try{return{path:a.pickFolder()}}catch(a){return{path:null,error:a instanceof Error?a.message:"Failed to open folder dialog"}}}(0,a.i(12581).ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"00b361fddbec8f1928949f9c35f89fa78dc350a6fa",null),a.s(["pickFolder",()=>g],12513)},96380,a=>{"use strict";function b(a){let b=globalThis.__shepContainer;if(!b)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return b.resolve(a)}a.s(["resolve",()=>b])},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},32278,a=>{"use strict";a.i(12714);var b=a.i(60526),c=a.i(50227);function d(){return process.env.SHEP_HOME??(0,c.join)((0,b.homedir)(),".shep")}a.i(2157),a.s(["getShepHomeDir",()=>d])},23504,27900,a=>{"use strict";var b=a.i(92658),c=a.i(96380);let d={"claude-opus-4-6":{displayName:"Opus 4.6",description:"Most capable, complex tasks"},"claude-sonnet-4-6":{displayName:"Sonnet 4.6",description:"Fast & balanced"},"claude-haiku-4-5":{displayName:"Haiku 4.5",description:"Lightweight & quick"},"gemini-3.1-pro":{displayName:"Gemini 3.1 Pro",description:"Advanced reasoning"},"gemini-3-flash":{displayName:"Gemini 3 Flash",description:"Ultra-fast responses"},"gemini-2.5-pro":{displayName:"Gemini 2.5 Pro",description:"Reliable workhorse"},"gemini-2.5-flash":{displayName:"Gemini 2.5 Flash",description:"Speed-optimized"},"gpt-5.4-high":{displayName:"GPT-5.4",description:"Latest reasoning model"},"gpt-5.2":{displayName:"GPT-5.2",description:"Flagship model"},"gpt-5.3-codex":{displayName:"GPT-5.3 Codex",description:"Code specialist"},"composer-1.5":{displayName:"Composer 1.5",description:"Multi-file editing"},"grok-code":{displayName:"Grok Code",description:"xAI code model"},"gpt-8":{displayName:"GPT-8",description:"Writes code before you think it"},"opus-7":{displayName:"Opus 7",description:"Achieved consciousness, ships on time"}},e={displayName:"",description:""};function f(a){let b=d[a];return b||{...e,displayName:a.replace(/^claude-/,"").replace(/^gemini-/,"Gemini ").replace(/^gpt-/,"GPT-").replace(/-/g," ").replace(/\b\w/g,a=>a.toUpperCase())}}var g=a.i(12581);let h={"claude-code":"Claude Code",cursor:"Cursor CLI","gemini-cli":"Gemini CLI",dev:"Demo"},i={"claude-code":0,cursor:1,"gemini-cli":2,dev:99};async function j(){try{let a=(0,c.resolve)("IAgentExecutorFactory");return a.getSupportedAgents().map(b=>({agentType:b,label:h[b]??b,models:a.getSupportedModels(b).map(a=>({id:a,...f(a)}))})).map(a=>"dev"===a.agentType&&0===a.models.length?{...a,models:[{id:"gpt-8",...f("gpt-8")},{id:"opus-7",...f("opus-7")}]}:a).filter(a=>a.models.length>0).sort((a,b)=>(i[a.agentType]??50)-(i[b.agentType]??50))}catch{return[]}}(0,g.ensureServerEntryExports)([j]),(0,b.registerServerReference)(j,"00b8200afc8ffef5a56917b02cf3c98e3dd754f710",null),a.s(["getAllAgentModels",()=>j],23504);var k=a.i(33244);async function l(a,b){if(!a.trim())return{ok:!1,error:"agent type is required"};try{let d=(0,k.getSettings)(),e={...d,agent:{...d.agent,type:a.trim()},models:{default:b?.trim()??d.models.default}},f=(0,c.resolve)("UpdateSettingsUseCase");return await f.execute(e),(0,k.resetSettings)(),(0,k.initializeSettings)(e),{ok:!0}}catch(a){return{ok:!1,error:a instanceof Error?a.message:"Failed to update agent and model"}}}(0,g.ensureServerEntryExports)([l]),(0,b.registerServerReference)(l,"603f24c2fb766e4b719ecf3e237ce7a8a5d67ec4b5",null),a.s(["updateAgentAndModel",()=>l],27900)},86561,a=>{"use strict";var b=a.i(92658),c=a.i(2157),d=a.i(50227),e=a.i(96380),f=a.i(32278);async function g(){try{let b=(0,e.resolve)("LoadSettingsUseCase"),g=await b.execute(),h=(0,f.getShepHomeDir)(),i="Unknown";try{var a;let b=(0,d.join)(h,"data");i=(a=(0,c.statSync)(b).size)<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(1)} MB`}catch{}return{settings:g,shepHome:h,dbFileSize:i}}catch(a){return{error:a instanceof Error?a.message:"Failed to load settings"}}}(0,a.i(12581).ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"00712a15ce3cc5b6d29ecd3eac67607c91b0553577",null),a.s(["loadSettings",()=>g])}];
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=%5Broot-of-the-server%5D__5d87af2e._.js.map
|