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:
2026-02-04 18:47:03 -05:00
parent c1b4384890
commit f0609e423e
191 changed files with 3162 additions and 824 deletions

View File

@@ -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";

View File

@@ -0,0 +1,6 @@
/**
* Banner Core - Rendering and Logo
*/
export * from "./render";
export * from "./logo";

View File

@@ -2,7 +2,7 @@
* Banner logo utilities
*/
import { Style } from "@ui/styles";
import { Style } from "@ui/core/styles";
/**
* Simple logo for inline display

View File

@@ -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";

View File

@@ -0,0 +1,5 @@
/**
* Banner Menu - Print functions
*/
export * from "./print";

View File

@@ -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

View File

@@ -0,0 +1,5 @@
/**
* Components Core - Box component
*/
export * from "./box";

View File

@@ -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> = {

View File

@@ -0,0 +1,8 @@
/**
* Components Menu - Status, Message, Header, List
*/
export * from "./status";
export * from "./message";
export * from "./header";
export * from "./list";

View File

@@ -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
View File

@@ -0,0 +1,6 @@
/**
* UI Core - Core UI utilities
*/
export * from "./styles";
export * from "./components";

View File

@@ -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";

View File

@@ -14,4 +14,4 @@ export {
createInputEditor,
InputEditor,
type InputEditorInstance,
} from "@ui/input-editor/editor";
} from "@ui/input-editor/core/editor";

View File

@@ -0,0 +1,5 @@
/**
* Input Editor Core - Main editor functionality
*/
export * from "./editor";

View File

@@ -11,7 +11,7 @@ export {
createSpinner,
Spinner,
type SpinnerInstance,
} from "@ui/spinner/spinner";
} from "@ui/spinner/core/spinner";
export {
createScannerInstance,

View File

@@ -0,0 +1,5 @@
/**
* Spinner Core - Main spinner functionality
*/
export * from "./spinner";