feat(KB-643): add project scripts management to dashboard
- Add scripts field to ProjectSettings type for storing custom scripts\n- Add API endpoints for scripts CRUD operations and execution\n- Add client-side API functions for script management\n- Create ScriptsModal component for managing and running scripts\n- Integrate Scripts modal into dashboard header\n- Add comprehensive tests for ScriptsModal component\n- Include changeset documenting the new dashboard scripts UI feature\n- Fix duplicate terminalInitialCommand declaration
This commit is contained in:
@@ -28,6 +28,7 @@ export interface HeaderProps {
|
||||
onOpenGitManager?: () => void;
|
||||
onOpenWorkflowSteps?: () => void;
|
||||
onOpenAgents?: () => void;
|
||||
onOpenScripts?: () => void;
|
||||
onToggleTerminal?: () => void;
|
||||
/** Opens the top-level workspace-aware file browser modal. */
|
||||
onOpenFiles?: () => void;
|
||||
@@ -74,6 +75,7 @@ export function Header({
|
||||
onOpenGitManager,
|
||||
onOpenWorkflowSteps,
|
||||
onOpenAgents,
|
||||
onOpenScripts,
|
||||
onToggleTerminal,
|
||||
onOpenFiles,
|
||||
filesOpen,
|
||||
@@ -393,6 +395,18 @@ export function Header({
|
||||
</button>
|
||||
)}
|
||||
|
||||
{/* Scripts - desktop only */}
|
||||
{!isMobile && onOpenScripts && (
|
||||
<button
|
||||
className="btn-icon"
|
||||
onClick={onOpenScripts}
|
||||
title="Scripts"
|
||||
data-testid="scripts-btn"
|
||||
>
|
||||
<Terminal size={16} />
|
||||
</button>
|
||||
)}
|
||||
|
||||
{/* Settings - always inline on desktop */}
|
||||
{!isMobile && (
|
||||
<button className="btn-icon" onClick={onOpenSettings} title="Settings">
|
||||
@@ -495,6 +509,17 @@ export function Header({
|
||||
<span>Manage Agents</span>
|
||||
</button>
|
||||
)}
|
||||
{onOpenScripts && (
|
||||
<button
|
||||
className="mobile-overflow-item"
|
||||
onClick={() => handleOverflowAction(onOpenScripts)}
|
||||
role="menuitem"
|
||||
data-testid="overflow-scripts-btn"
|
||||
>
|
||||
<Terminal size={16} />
|
||||
<span>Scripts</span>
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
className="mobile-overflow-item"
|
||||
onClick={() => handleOverflowAction(onToggleTerminal)}
|
||||
|
||||
Reference in New Issue
Block a user