Restructure src/ modules with consistent internal organization
Reorganize major src/ directories to follow a consistent pattern with
core/, menu/, submenu/, inputs/, logs/, layout/, feedback/ subdirectories.
Changes by module:
- stores/: Move 5 store files to stores/core/
- utils/: Create core/ (terminal, tools, etc.) and menu/ (progress-bar)
- api/: Create copilot/core/, copilot/auth/, ollama/core/
- providers/: Create core/, copilot/core/, copilot/auth/, ollama/core/, login/core/
- ui/: Create core/, banner/core/, banner/menu/, spinner/core/,
input-editor/core/, components/core/, components/menu/
- tools/: Create core/ for registry.ts and types.ts
- tui-solid/: Reorganize components/ into menu/, submenu/, inputs/,
logs/, modals/, panels/, layout/, feedback/
- commands/: Create core/ for runner.ts and handlers.ts
- services/: Create core/ for agent.ts, permissions.ts, session.ts,
executor.ts, config.ts
All imports updated to use new paths. TypeScript compilation verified.
This commit is contained in:
@@ -4,6 +4,6 @@
|
||||
|
||||
export type { BannerStyle } from "@/types/banner";
|
||||
export { getBannerLines } from "@ui/banner/lines";
|
||||
export { renderBanner, renderBannerWithSubtitle } from "@ui/banner/render";
|
||||
export { printBanner, printWelcome } from "@ui/banner/print";
|
||||
export { getInlineLogo } from "@ui/banner/logo";
|
||||
export { renderBanner, renderBannerWithSubtitle } from "@ui/banner/core/render";
|
||||
export { printBanner, printWelcome } from "@ui/banner/menu/print";
|
||||
export { getInlineLogo } from "@ui/banner/core/logo";
|
||||
|
||||
6
src/ui/banner/core/index.ts
Normal file
6
src/ui/banner/core/index.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Banner Core - Rendering and Logo
|
||||
*/
|
||||
|
||||
export * from "./render";
|
||||
export * from "./logo";
|
||||
@@ -2,7 +2,7 @@
|
||||
* Banner logo utilities
|
||||
*/
|
||||
|
||||
import { Style } from "@ui/styles";
|
||||
import { Style } from "@ui/core/styles";
|
||||
|
||||
/**
|
||||
* Simple logo for inline display
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
import { GRADIENT_COLORS } from "@constants/banner";
|
||||
import { Style } from "@ui/styles";
|
||||
import { Style } from "@ui/core/styles";
|
||||
import type { BannerStyle } from "@/types/banner";
|
||||
import { getBannerLines } from "@ui/banner/lines";
|
||||
|
||||
5
src/ui/banner/menu/index.ts
Normal file
5
src/ui/banner/menu/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* Banner Menu - Print functions
|
||||
*/
|
||||
|
||||
export * from "./print";
|
||||
@@ -2,9 +2,9 @@
|
||||
* Banner printing utilities
|
||||
*/
|
||||
|
||||
import { Style } from "@ui/styles";
|
||||
import { Style } from "@ui/core/styles";
|
||||
import type { BannerStyle } from "@/types/banner";
|
||||
import { renderBanner } from "@ui/banner/render";
|
||||
import { renderBanner } from "@ui/banner/core/render";
|
||||
|
||||
/**
|
||||
* Print the banner to console
|
||||
5
src/ui/components/core/index.ts
Normal file
5
src/ui/components/core/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* Components Core - Box component
|
||||
*/
|
||||
|
||||
export * from "./box";
|
||||
@@ -5,7 +5,7 @@
|
||||
import { Style, Theme } from "@constants/styles";
|
||||
import { colors } from "@ui/styles/colors";
|
||||
import { stripAnsi, getTerminalWidth, line } from "@ui/styles/text";
|
||||
import { box } from "@ui/components/box";
|
||||
import { box } from "@ui/components/core/box";
|
||||
import type { HeaderStyle } from "@/types/components";
|
||||
|
||||
const HEADER_STYLE_HANDLERS: Record<HeaderStyle, (text: string) => string> = {
|
||||
8
src/ui/components/menu/index.ts
Normal file
8
src/ui/components/menu/index.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Components Menu - Status, Message, Header, List
|
||||
*/
|
||||
|
||||
export * from "./status";
|
||||
export * from "./message";
|
||||
export * from "./header";
|
||||
export * from "./list";
|
||||
@@ -17,8 +17,8 @@ export type {
|
||||
MessageRole,
|
||||
} from "@/types/components";
|
||||
|
||||
export { box, panel, errorBox, successBox } from "@ui/components/box";
|
||||
export { header, divider } from "@ui/components/header";
|
||||
export { keyValue, list } from "@ui/components/list";
|
||||
export { status, toolCall } from "@ui/components/status";
|
||||
export { message, codeBlock } from "@ui/components/message";
|
||||
export { box, panel, errorBox, successBox } from "@ui/components/core/box";
|
||||
export { header, divider } from "@ui/components/menu/header";
|
||||
export { keyValue, list } from "@ui/components/menu/list";
|
||||
export { status, toolCall } from "@ui/components/menu/status";
|
||||
export { message, codeBlock } from "@ui/components/menu/message";
|
||||
6
src/ui/core/index.ts
Normal file
6
src/ui/core/index.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* UI Core - Core UI utilities
|
||||
*/
|
||||
|
||||
export * from "./styles";
|
||||
export * from "./components";
|
||||
@@ -2,9 +2,8 @@
|
||||
* Terminal UI components for CodeTyper CLI
|
||||
*/
|
||||
|
||||
export * from "@ui/core";
|
||||
export * from "@ui/banner";
|
||||
export * from "@ui/styles";
|
||||
export * from "@ui/spinner";
|
||||
export * from "@ui/components";
|
||||
export * from "@ui/tips";
|
||||
export * from "@ui/input-editor";
|
||||
|
||||
@@ -14,4 +14,4 @@ export {
|
||||
createInputEditor,
|
||||
InputEditor,
|
||||
type InputEditorInstance,
|
||||
} from "@ui/input-editor/editor";
|
||||
} from "@ui/input-editor/core/editor";
|
||||
|
||||
5
src/ui/input-editor/core/index.ts
Normal file
5
src/ui/input-editor/core/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* Input Editor Core - Main editor functionality
|
||||
*/
|
||||
|
||||
export * from "./editor";
|
||||
@@ -11,7 +11,7 @@ export {
|
||||
createSpinner,
|
||||
Spinner,
|
||||
type SpinnerInstance,
|
||||
} from "@ui/spinner/spinner";
|
||||
} from "@ui/spinner/core/spinner";
|
||||
|
||||
export {
|
||||
createScannerInstance,
|
||||
|
||||
5
src/ui/spinner/core/index.ts
Normal file
5
src/ui/spinner/core/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* Spinner Core - Main spinner functionality
|
||||
*/
|
||||
|
||||
export * from "./spinner";
|
||||
Reference in New Issue
Block a user