chore: generate

This commit is contained in:
GitHub Action
2026-01-24 23:02:21 +00:00
parent e223d1a0e5
commit 6d0fecb985

View File

@@ -1,15 +1,4 @@
import { import { For, onCleanup, onMount, Show, Match, Switch, createMemo, createEffect, on, createSignal } from "solid-js"
For,
onCleanup,
onMount,
Show,
Match,
Switch,
createMemo,
createEffect,
on,
createSignal,
} from "solid-js"
import { createMediaQuery } from "@solid-primitives/media" import { createMediaQuery } from "@solid-primitives/media"
import { createResizeObserver } from "@solid-primitives/resize-observer" import { createResizeObserver } from "@solid-primitives/resize-observer"
import { Dynamic } from "solid-js/web" import { Dynamic } from "solid-js/web"
@@ -741,7 +730,7 @@ export default function Page() {
const sessionID = params.id const sessionID = params.id
if (!sessionID) return if (!sessionID) return
if (status()?.type !== "idle") { if (status()?.type !== "idle") {
await sdk.client.session.abort({ sessionID }).catch(() => { }) await sdk.client.session.abort({ sessionID }).catch(() => {})
} }
const revert = info()?.revert?.messageID const revert = info()?.revert?.messageID
// Find the last user message that's not already reverted // Find the last user message that's not already reverted
@@ -824,69 +813,69 @@ export default function Page() {
}, },
...(sync.data.config.share !== "disabled" ...(sync.data.config.share !== "disabled"
? [ ? [
{ {
id: "session.share", id: "session.share",
title: "Share session", title: "Share session",
description: "Share this session and copy the URL to clipboard", description: "Share this session and copy the URL to clipboard",
category: "Session", category: "Session",
slash: "share", slash: "share",
disabled: !params.id || !!info()?.share?.url, disabled: !params.id || !!info()?.share?.url,
onSelect: async () => { onSelect: async () => {
if (!params.id) return if (!params.id) return
await sdk.client.session await sdk.client.session
.share({ sessionID: params.id }) .share({ sessionID: params.id })
.then((res) => { .then((res) => {
navigator.clipboard.writeText(res.data!.share!.url).catch(() => navigator.clipboard.writeText(res.data!.share!.url).catch(() =>
showToast({
title: "Failed to copy URL to clipboard",
variant: "error",
}),
)
})
.then(() =>
showToast({ showToast({
title: "Failed to copy URL to clipboard", title: "Session shared",
description: "Share URL copied to clipboard!",
variant: "success",
}),
)
.catch(() =>
showToast({
title: "Failed to share session",
description: "An error occurred while sharing the session",
variant: "error", variant: "error",
}), }),
) )
}) },
.then(() =>
showToast({
title: "Session shared",
description: "Share URL copied to clipboard!",
variant: "success",
}),
)
.catch(() =>
showToast({
title: "Failed to share session",
description: "An error occurred while sharing the session",
variant: "error",
}),
)
}, },
}, {
{ id: "session.unshare",
id: "session.unshare", title: "Unshare session",
title: "Unshare session", description: "Stop sharing this session",
description: "Stop sharing this session", category: "Session",
category: "Session", slash: "unshare",
slash: "unshare", disabled: !params.id || !info()?.share?.url,
disabled: !params.id || !info()?.share?.url, onSelect: async () => {
onSelect: async () => { if (!params.id) return
if (!params.id) return await sdk.client.session
await sdk.client.session .unshare({ sessionID: params.id })
.unshare({ sessionID: params.id }) .then(() =>
.then(() => showToast({
showToast({ title: "Session unshared",
title: "Session unshared", description: "Session unshared successfully!",
description: "Session unshared successfully!", variant: "success",
variant: "success", }),
}), )
) .catch(() =>
.catch(() => showToast({
showToast({ title: "Failed to unshare session",
title: "Failed to unshare session", description: "An error occurred while unsharing the session",
description: "An error occurred while unsharing the session", variant: "error",
variant: "error", }),
}), )
) },
}, },
}, ]
]
: []), : []),
]) ])