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
@@ -45,7 +45,7 @@ export type Snippet = {
|
||||
};
|
||||
|
||||
export type PluginScope = 'user' | 'project';
|
||||
export type PluginParsedKind = 'npm' | 'path';
|
||||
type PluginParsedKind = 'npm' | 'path';
|
||||
|
||||
export type PluginEntry = {
|
||||
id: string;
|
||||
@@ -200,7 +200,7 @@ const getUserAgentPath = (agentName: string, lookupCache: AgentLookupCache = glo
|
||||
return pluralPath;
|
||||
};
|
||||
|
||||
export const getAgentScope = (
|
||||
const getAgentScope = (
|
||||
agentName: string,
|
||||
workingDirectory?: string,
|
||||
lookupCache: AgentLookupCache = globalAgentLookupCache
|
||||
@@ -273,7 +273,7 @@ const getUserCommandPath = (commandName: string): string => {
|
||||
return pluralPath;
|
||||
};
|
||||
|
||||
export const getCommandScope = (commandName: string, workingDirectory?: string): { scope: CommandScope | null; path: string | null } => {
|
||||
const getCommandScope = (commandName: string, workingDirectory?: string): { scope: CommandScope | null; path: string | null } => {
|
||||
if (workingDirectory) {
|
||||
const projectPath = getProjectCommandPath(workingDirectory, commandName);
|
||||
if (fs.existsSync(projectPath)) {
|
||||
@@ -1194,23 +1194,6 @@ export const queryPluginRegistry = async (
|
||||
return { results };
|
||||
};
|
||||
|
||||
export type McpLocalConfig = {
|
||||
type: 'local';
|
||||
command?: string[];
|
||||
environment?: Record<string, string>;
|
||||
enabled?: boolean;
|
||||
};
|
||||
|
||||
export type McpRemoteConfig = {
|
||||
type: 'remote';
|
||||
url?: string;
|
||||
environment?: Record<string, string>;
|
||||
headers?: Record<string, string>;
|
||||
enabled?: boolean;
|
||||
};
|
||||
|
||||
export type McpConfigPayload = McpLocalConfig | McpRemoteConfig;
|
||||
|
||||
export type McpConfigEntry = {
|
||||
name: string;
|
||||
scope?: AgentScope | null;
|
||||
@@ -2241,7 +2224,7 @@ export const SKILL_SCOPE = {
|
||||
export type SkillScope = typeof SKILL_SCOPE[keyof typeof SKILL_SCOPE];
|
||||
export type SkillSource = 'opencode' | 'claude' | 'agents';
|
||||
|
||||
export type SupportingFile = {
|
||||
type SupportingFile = {
|
||||
name: string;
|
||||
path: string;
|
||||
fullPath: string;
|
||||
@@ -2382,9 +2365,9 @@ const getProjectAgentsSkillDir = (workingDirectory: string, skillName: string):
|
||||
return path.join(workingDirectory, '.agents', 'skills', skillName);
|
||||
};
|
||||
|
||||
export const getSkillScope = (skillName: string, workingDirectory?: string): {
|
||||
scope: SkillScope | null;
|
||||
path: string | null;
|
||||
const getSkillScope = (skillName: string, workingDirectory?: string): {
|
||||
scope: SkillScope | null;
|
||||
path: string | null;
|
||||
source: SkillSource | null;
|
||||
} => {
|
||||
const discovered = discoverSkills(workingDirectory).find((skill) => skill.name === skillName);
|
||||
|
||||
Reference in New Issue
Block a user