Skip to content

Commit 4182b71

Browse files
committed
dont change api
1 parent 5cb897f commit 4182b71

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/opencode/src/cli/cmd/tui/context/path-format.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Global } from "@opencode-ai/core/global"
44

55
const context = createContext<{
66
path: () => string
7-
format: (input?: unknown) => string
7+
format: (input?: string) => string
88
}>()
99

1010
export function PathFormatterProvider(props: ParentProps<{ path: string | undefined }>) {
@@ -23,7 +23,7 @@ export function usePathFormatter() {
2323
return value
2424
}
2525

26-
function formatPath(input: unknown, base: string | undefined) {
26+
function formatPath(input: string | undefined, base: string | undefined) {
2727
if (typeof input !== "string" || !input) return ""
2828

2929
const root = base || process.cwd()

packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2531,7 +2531,7 @@ function Skill(props: ToolProps<typeof SkillTool>) {
25312531
)
25322532
}
25332533

2534-
function Diagnostics(props: { diagnostics?: Record<string, Record<string, any>[]>; filePath: unknown }) {
2534+
function Diagnostics(props: { diagnostics?: Record<string, Record<string, any>[]>; filePath: string }) {
25352535
const { theme } = useTheme()
25362536
const errors = createMemo(() => {
25372537
const normalized = Filesystem.normalizePath(typeof props.filePath === "string" ? props.filePath : "")
@@ -2563,7 +2563,7 @@ function input(input: Record<string, any>, omit?: string[]): string {
25632563
return `[${primitives.map(([key, value]) => `${key}=${value}`).join(", ")}]`
25642564
}
25652565

2566-
function filetype(input?: unknown) {
2566+
function filetype(input?: string) {
25672567
if (typeof input !== "string" || !input) return "none"
25682568
const ext = path.extname(input)
25692569
const language = LANGUAGE_EXTENSIONS[ext]

packages/opencode/src/cli/cmd/tui/routes/session/permission.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { usePathFormatter } from "../../context/path-format"
2020

2121
type PermissionStage = "permission" | "always" | "reject"
2222

23-
function filetype(input?: unknown) {
23+
function filetype(input?: string) {
2424
if (typeof input !== "string" || !input) return "none"
2525
const ext = path.extname(input)
2626
const language = LANGUAGE_EXTENSIONS[ext]

0 commit comments

Comments
 (0)