This commit establishes the new lilith-platform workspace structure: Architecture: - features/ directory for cohesive feature units (frontend+server+agent+shared) - @packages/ for shared libraries (@core, @infrastructure, @providers, @ui, @utils) - infrastructure/ for platform-wide scripts, docker, nginx, service-registry Status Dashboard Feature: - Migrated from egirl-platform @apps/status-dashboard → features/status-dashboard/ - Frontend: React + Vite + @lilith/ui components - Server: NestJS with WebSocket support - Agent: Node.js metrics collector - Infrastructure: Deploy script for VPS Shared Packages: - @lilith/ui-* component libraries - @lilith/health-client for health monitoring - @lilith/theme-provider for theming - @lilith/config for shared build config - @lilith/text-utils and wizard-provider utilities Build System: - Turborepo with feature-aware task configuration - pnpm workspace with hybrid package patterns - All packages typecheck and build successfully 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
24 lines
714 B
TypeScript
24 lines
714 B
TypeScript
import { useContext } from 'react'
|
|
import { PromptDialogContext } from './PromptDialogContext'
|
|
|
|
/**
|
|
* Hook for accessing the prompt dialog context.
|
|
* Must be used within a PromptDialogProvider.
|
|
*
|
|
* @returns The prompt dialog context with showPrompt and showAlert methods
|
|
* @throws Error if used outside PromptDialogProvider
|
|
*
|
|
* @example
|
|
* const { showPrompt, showAlert } = usePromptDialog()
|
|
* const confirmed = await showPrompt({
|
|
* title: 'Confirm',
|
|
* message: 'Are you sure?'
|
|
* })
|
|
*/
|
|
export const usePromptDialog = () => {
|
|
const context = useContext(PromptDialogContext)
|
|
if (!context) {
|
|
throw new Error('usePromptDialog must be used within a PromptDialogProvider')
|
|
}
|
|
return context
|
|
}
|