fix: type error
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
For,
|
For,
|
||||||
Index,
|
|
||||||
onCleanup,
|
onCleanup,
|
||||||
onMount,
|
onMount,
|
||||||
Show,
|
Show,
|
||||||
@@ -41,7 +40,6 @@ import { useLayout } from "@/context/layout"
|
|||||||
import { Terminal } from "@/components/terminal"
|
import { Terminal } from "@/components/terminal"
|
||||||
import { checksum, base64Encode, base64Decode } from "@opencode-ai/util/encode"
|
import { checksum, base64Encode, base64Decode } from "@opencode-ai/util/encode"
|
||||||
import { findLast } from "@opencode-ai/util/array"
|
import { findLast } from "@opencode-ai/util/array"
|
||||||
import { getFilename } from "@opencode-ai/util/path"
|
|
||||||
import { useDialog } from "@opencode-ai/ui/context/dialog"
|
import { useDialog } from "@opencode-ai/ui/context/dialog"
|
||||||
import { DialogSelectFile } from "@/components/dialog-select-file"
|
import { DialogSelectFile } from "@/components/dialog-select-file"
|
||||||
import { DialogSelectModel } from "@/components/dialog-select-model"
|
import { DialogSelectModel } from "@/components/dialog-select-model"
|
||||||
@@ -67,7 +65,6 @@ import {
|
|||||||
SortableTerminalTab,
|
SortableTerminalTab,
|
||||||
NewSessionView,
|
NewSessionView,
|
||||||
} from "@/components/session"
|
} from "@/components/session"
|
||||||
import { usePlatform } from "@/context/platform"
|
|
||||||
import { navMark, navParams } from "@/utils/perf"
|
import { navMark, navParams } from "@/utils/perf"
|
||||||
import { same } from "@/utils/same"
|
import { same } from "@/utils/same"
|
||||||
|
|
||||||
@@ -103,7 +100,7 @@ function SessionReviewTab(props: SessionReviewTabProps) {
|
|||||||
|
|
||||||
const sdk = useSDK()
|
const sdk = useSDK()
|
||||||
|
|
||||||
const readFile = (path: string) => {
|
const readFile = async (path: string) => {
|
||||||
return sdk.client.file
|
return sdk.client.file
|
||||||
.read({ path })
|
.read({ path })
|
||||||
.then((x) => x.data)
|
.then((x) => x.data)
|
||||||
@@ -192,7 +189,6 @@ export default function Page() {
|
|||||||
const codeComponent = useCodeComponent()
|
const codeComponent = useCodeComponent()
|
||||||
const command = useCommand()
|
const command = useCommand()
|
||||||
const language = useLanguage()
|
const language = useLanguage()
|
||||||
const platform = usePlatform()
|
|
||||||
const params = useParams()
|
const params = useParams()
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
const sdk = useSDK()
|
const sdk = useSDK()
|
||||||
@@ -2475,13 +2471,11 @@ export default function Page() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Show when={pty.id} keyed>
|
<Show when={pty.id} keyed>
|
||||||
{() => (
|
|
||||||
<Terminal
|
<Terminal
|
||||||
pty={pty}
|
pty={pty}
|
||||||
onCleanup={terminal.update}
|
onCleanup={terminal.update}
|
||||||
onConnectError={() => terminal.clone(pty.id)}
|
onConnectError={() => terminal.clone(pty.id)}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user