refactor: remove deprecated config-path.ts (dead code, 0 references)

This commit is contained in:
justsisyphus
2026-01-25 12:58:40 +09:00
parent d9723e76ab
commit 512952f66d
2 changed files with 0 additions and 44 deletions

View File

@@ -1,43 +0,0 @@
import * as path from "path"
import * as os from "os"
import * as fs from "fs"
/**
* Returns the user-level config directory based on the OS.
* @deprecated Use getOpenCodeConfigDir() from opencode-config-dir.ts instead.
*/
export function getUserConfigDir(): string {
if (process.platform === "win32") {
const crossPlatformDir = path.join(os.homedir(), ".config")
const crossPlatformConfigPath = path.join(crossPlatformDir, "opencode", "oh-my-opencode.json")
const appdataDir = process.env.APPDATA || path.join(os.homedir(), "AppData", "Roaming")
const appdataConfigPath = path.join(appdataDir, "opencode", "oh-my-opencode.json")
if (fs.existsSync(crossPlatformConfigPath)) {
return crossPlatformDir
}
if (fs.existsSync(appdataConfigPath)) {
return appdataDir
}
return crossPlatformDir
}
return process.env.XDG_CONFIG_HOME || path.join(os.homedir(), ".config")
}
/**
* Returns the full path to the user-level oh-my-opencode config file.
*/
export function getUserConfigPath(): string {
return path.join(getUserConfigDir(), "opencode", "oh-my-opencode.json")
}
/**
* Returns the full path to the project-level oh-my-opencode config file.
*/
export function getProjectConfigPath(directory: string): string {
return path.join(directory, ".opencode", "oh-my-opencode.json")
}

View File

@@ -10,7 +10,6 @@ export * from "./hook-disabled"
export * from "./deep-merge"
export * from "./file-utils"
export * from "./dynamic-truncator"
export * from "./config-path"
export * from "./data-path"
export * from "./config-errors"
export * from "./claude-config-dir"