chore: 移除 packages/ 下多处未引用的导出

涉及 11 个 workspace 包文件,每处均为独立的 unreferenced export 删除或 export 关键字冗余移除:

- @ant/ink/core/termio/csi.ts(eraseLine)
- acp-link/manager/types.ts、acp-link/ws-message.ts
- builtin-tools/AgentTool/agentMemory.ts、BashTool/bashSecurity.ts、BashTool/sedEditParser.ts
- builtin-tools/ConfigTool/supportedSettings.ts、FileEditTool/utils.ts
- remote-control-server/store.ts、transport/event-bus.ts、types/messages.ts

Co-Authored-By: glm-5.2 <zai-org@claude-code-best.win>
This commit is contained in:
claude-code-best
2026-06-20 11:38:08 +08:00
parent 9e507bd823
commit 51f2c3f9ed
10 changed files with 0 additions and 101 deletions

View File

@@ -100,16 +100,6 @@ export function isAgentMemoryPath(absolutePath: string): boolean {
return false
}
/**
* Returns the agent memory file path for a given agent type and scope.
*/
export function getAgentMemoryEntrypoint(
agentType: string,
scope: AgentMemoryScope,
): string {
return join(getAgentMemoryDir(agentType, scope), 'MEMORY.md')
}
export function getMemoryScopeDisplay(
memory: AgentMemoryScope | undefined,
): string {

View File

@@ -579,11 +579,6 @@ export function stripSafeHeredocSubstitutions(command: string): string | null {
return result
}
/** Detection-only check: does the command contain a safe heredoc substitution? */
export function hasSafeHeredocSubstitution(command: string): boolean {
return stripSafeHeredocSubstitutions(command) !== null
}
function validateSafeCommandSubstitution(
context: ValidationContext,
): PermissionResult {

View File

@@ -33,15 +33,6 @@ export type SedEditInfo = {
extendedRegex: boolean
}
/**
* Check if a command is a sed in-place edit command
* Returns true only for simple sed -i 's/pattern/replacement/flags' file commands
*/
export function isSedInPlaceEdit(command: string): boolean {
const info = parseSedEditCommand(command)
return info !== null
}
/**
* Parse a sed edit command and extract the edit information
* Returns null if the command is not a valid sed in-place edit

View File

@@ -193,10 +193,6 @@ export function getConfig(key: string): SettingConfig | undefined {
return SUPPORTED_SETTINGS[key]
}
export function getAllKeys(): string[] {
return Object.keys(SUPPORTED_SETTINGS)
}
export function getOptionsForSetting(key: string): string[] | undefined {
const config = SUPPORTED_SETTINGS[key]
if (!config) return undefined

View File

@@ -317,42 +317,6 @@ export function getSnippetForPatch(
return { formattedSnippet, startLine }
}
/**
* Gets a snippet from a file showing the context around a single edit.
* This is a convenience function that uses the original algorithm.
* @param originalFile The original file content
* @param oldString The text to replace
* @param newString The text to replace it with
* @param contextLines The number of lines to show before and after the change
* @returns The snippet and the starting line number
*/
export function getSnippet(
originalFile: string,
oldString: string,
newString: string,
contextLines: number = 4,
): { snippet: string; startLine: number } {
// Use the original algorithm from FileEditTool.tsx
const before = originalFile.split(oldString)[0] ?? ''
const replacementLine = before.split(/\r?\n/).length - 1
const newFileLines = applyEditToFile(
originalFile,
oldString,
newString,
).split(/\r?\n/)
// Calculate the start and end line numbers for the snippet
const startLine = Math.max(0, replacementLine - contextLines)
const endLine =
replacementLine + contextLines + newString.split(/\r?\n/).length
// Get snippet
const snippetLines = newFileLines.slice(startLine, endLine)
const snippet = snippetLines.join('\n')
return { snippet, startLine: startLine + 1 }
}
export function getEditsForPatch(patch: StructuredPatchHunk[]): FileEdit[] {
return patch.map(hunk => {
// Extract the changes from this hunk