mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix: type errors
This commit is contained in:
parent
8474cf6279
commit
4609d12efe
5 changed files with 12 additions and 6 deletions
|
|
@ -60,7 +60,7 @@ export const { use: useSession, provider: SessionProvider } = createSimpleContex
|
|||
})
|
||||
const status = createMemo(
|
||||
() =>
|
||||
sync.data.session_status[params.id] ?? {
|
||||
sync.data.session_status[params.id ?? ""] ?? {
|
||||
type: "idle",
|
||||
},
|
||||
)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export default function Layout(props: ParentProps) {
|
|||
const params = useParams()
|
||||
const sync = useGlobalSync()
|
||||
const directory = createMemo(() => {
|
||||
const decoded = base64Decode(params.dir)
|
||||
const decoded = base64Decode(params.dir!)
|
||||
return sync.data.projects.find((x) => x.worktree === decoded)?.worktree ?? "/"
|
||||
})
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ export default function Page() {
|
|||
<Switch>
|
||||
<Match when={session.id}>
|
||||
<SessionTimeline
|
||||
sessionID={session.id}
|
||||
sessionID={session.id!}
|
||||
expanded={layout.review.state() === "tab" || !session.diffs().length}
|
||||
/>
|
||||
</Match>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { createSeen } from "../hooks/create-seen"
|
||||
import { AssistantMessage } from "@opencode-ai/sdk"
|
||||
import { useData } from "../context"
|
||||
import { Binary } from "@opencode-ai/util/binary"
|
||||
|
|
|
|||
|
|
@ -13,9 +13,16 @@
|
|||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"noEmit": true,
|
||||
"lib": ["es2022", "dom", "dom.iterable"],
|
||||
"lib": [
|
||||
"es2023",
|
||||
"dom",
|
||||
"dom.iterable"
|
||||
],
|
||||
// Type Checking & Safety
|
||||
"strict": true,
|
||||
"types": ["vite/client", "bun"]
|
||||
"types": [
|
||||
"vite/client",
|
||||
"bun"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue