chore: remove dead code (59 unused files + ~125 unused exports) (#1835)
* chore: remove dead/unreferenced files across ui, vscode Remove 59 unused source files (components, hooks, lib utils, stores, barrels, and orphaned vscode github modules) that are not imported by any entry-reachable code. Also drop a stale test mock for the removed execCommands module. Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com> * refactor: remove unused exported symbols (types, functions, consts, hooks) Remove exported symbols whose identifier is referenced nowhere in the repository (verified via repo-wide search), across ui types/contracts, lib utilities, sync layer, stores, and components. Also drop the few imports/private helpers orphaned by these removals. Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com> * refactor: remove more unused exports (desktop, shortcuts, worktree, vscode) Continue removing repo-wide unreferenced exported functions, consts and types across lib/desktop, shortcuts, worktreeSessionCreator, sync, and vscode gitService, with cascading orphaned helpers/imports cleaned up. Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com> * chore: add dead-code cleanup tooling * refactor: checkpoint dead-code cleanup * refactor: remove dead-code suppressions --------- Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com> Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
committed by
GitHub
co-authored by
Serhii Dziupin
Bohdan Triapitsyn
parent
4a37b9a005
commit
00821700de
@@ -30,7 +30,7 @@ function getRuntimeFilesAPI(): FilesAPI | null {
|
||||
return null;
|
||||
}
|
||||
|
||||
export interface OpenChamberConfig {
|
||||
interface OpenChamberConfig {
|
||||
projectPath?: string;
|
||||
'setup-worktree'?: string[];
|
||||
'setup-worktree-wait'?: boolean;
|
||||
@@ -42,7 +42,7 @@ export interface OpenChamberConfig {
|
||||
draftStarters?: DraftStarterRef[];
|
||||
}
|
||||
|
||||
export type OpenChamberProjectActionPlatform = 'macos' | 'linux' | 'windows';
|
||||
type OpenChamberProjectActionPlatform = 'macos' | 'linux' | 'windows';
|
||||
|
||||
export interface OpenChamberProjectAction {
|
||||
id: string;
|
||||
@@ -91,11 +91,11 @@ export interface OpenChamberProjectContextData extends OpenChamberProjectNotesTo
|
||||
|
||||
export const OPENCHAMBER_PROJECT_NOTES_MAX_LENGTH = 3000;
|
||||
export const OPENCHAMBER_PROJECT_TODO_TEXT_MAX_LENGTH = 120;
|
||||
export const OPENCHAMBER_PROJECT_ACTION_NAME_MAX_LENGTH = 80;
|
||||
export const OPENCHAMBER_PROJECT_ACTION_COMMAND_MAX_LENGTH = 4000;
|
||||
export const OPENCHAMBER_PROJECT_ACTION_OPEN_URL_MAX_LENGTH = 2000;
|
||||
export const OPENCHAMBER_PROJECT_ACTION_DESKTOP_FORWARD_MAX_LENGTH = 300;
|
||||
export const OPENCHAMBER_PROJECT_PLAN_TITLE_MAX_LENGTH = 160;
|
||||
const OPENCHAMBER_PROJECT_ACTION_NAME_MAX_LENGTH = 80;
|
||||
const OPENCHAMBER_PROJECT_ACTION_COMMAND_MAX_LENGTH = 4000;
|
||||
const OPENCHAMBER_PROJECT_ACTION_OPEN_URL_MAX_LENGTH = 2000;
|
||||
const OPENCHAMBER_PROJECT_ACTION_DESKTOP_FORWARD_MAX_LENGTH = 300;
|
||||
const OPENCHAMBER_PROJECT_PLAN_TITLE_MAX_LENGTH = 160;
|
||||
|
||||
const OPENCHAMBER_ACTION_PLATFORM_SET = new Set<OpenChamberProjectActionPlatform>(['macos', 'linux', 'windows']);
|
||||
|
||||
@@ -520,7 +520,7 @@ const getProjectPlansDirectory = async (project: ProjectRef): Promise<string | n
|
||||
return joinPath(projectDirectory, 'plans');
|
||||
};
|
||||
|
||||
export const formatProjectPlanMarkdown = (title: string, body: string): string => {
|
||||
const formatProjectPlanMarkdown = (title: string, body: string): string => {
|
||||
const normalizedTitle = sanitizePlanTitle(title) || 'Plan';
|
||||
const normalizedBody = body.trim();
|
||||
return normalizedBody
|
||||
@@ -552,7 +552,7 @@ export const parseProjectPlanMarkdown = (raw: string): { title: string; body: st
|
||||
* Read the config for a project.
|
||||
* Returns null if file doesn't exist or is invalid.
|
||||
*/
|
||||
export async function readOpenChamberConfig(project: ProjectRef): Promise<OpenChamberConfig | null> {
|
||||
async function readOpenChamberConfig(project: ProjectRef): Promise<OpenChamberConfig | null> {
|
||||
const projectDirectory = typeof project?.path === 'string' ? project.path.trim() : '';
|
||||
if (!projectDirectory) {
|
||||
return null;
|
||||
@@ -624,7 +624,7 @@ export async function readOpenChamberConfig(project: ProjectRef): Promise<OpenCh
|
||||
* dedicated route and never round-trips them through this config write path to
|
||||
* avoid a read-then-write race clobbering a concurrent server update.
|
||||
*/
|
||||
export async function writeOpenChamberConfig(
|
||||
async function writeOpenChamberConfig(
|
||||
project: ProjectRef,
|
||||
config: OpenChamberConfig
|
||||
): Promise<boolean> {
|
||||
@@ -678,7 +678,7 @@ export async function writeOpenChamberConfig(
|
||||
/**
|
||||
* Update specific keys in the config, preserving other values.
|
||||
*/
|
||||
export async function updateOpenChamberConfig(
|
||||
async function updateOpenChamberConfig(
|
||||
project: ProjectRef,
|
||||
updates: Partial<OpenChamberConfig>
|
||||
): Promise<boolean> {
|
||||
@@ -753,12 +753,12 @@ export async function getProjectContextData(project: ProjectRef): Promise<OpenCh
|
||||
});
|
||||
}
|
||||
|
||||
export async function getProjectPlanFiles(project: ProjectRef): Promise<OpenChamberProjectPlanFileLink[]> {
|
||||
async function getProjectPlanFiles(project: ProjectRef): Promise<OpenChamberProjectPlanFileLink[]> {
|
||||
const config = await readOpenChamberConfig(project);
|
||||
return sanitizeProjectPlanFileLinks(config?.projectPlanFiles);
|
||||
}
|
||||
|
||||
export async function saveProjectPlanFiles(
|
||||
async function saveProjectPlanFiles(
|
||||
project: ProjectRef,
|
||||
value: OpenChamberProjectPlanFileLink[]
|
||||
): Promise<boolean> {
|
||||
|
||||
Reference in New Issue
Block a user