summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGitHub Action <[email protected]>2026-01-24 23:02:21 +0000
committerGitHub Action <[email protected]>2026-01-24 23:02:21 +0000
commit6d0fecb985e81c6cc0ae4417715261abf7be395e (patch)
tree1c2d3d03f07382c0fa8cf16ccb6e8870c45baf8d
parente223d1a0e5346d35a895c80da5d9f0baf297ad28 (diff)
downloadopencode-6d0fecb985e81c6cc0ae4417715261abf7be395e.tar.gz
opencode-6d0fecb985e81c6cc0ae4417715261abf7be395e.zip
chore: generate
-rw-r--r--packages/app/src/pages/session.tsx129
1 files changed, 59 insertions, 70 deletions
diff --git a/packages/app/src/pages/session.tsx b/packages/app/src/pages/session.tsx
index b2aa86ff1..38717317d 100644
--- a/packages/app/src/pages/session.tsx
+++ b/packages/app/src/pages/session.tsx
@@ -1,15 +1,4 @@
-import {
- For,
- onCleanup,
- onMount,
- Show,
- Match,
- Switch,
- createMemo,
- createEffect,
- on,
- createSignal,
-} from "solid-js"
+import { For, onCleanup, onMount, Show, Match, Switch, createMemo, createEffect, on, createSignal } from "solid-js"
import { createMediaQuery } from "@solid-primitives/media"
import { createResizeObserver } from "@solid-primitives/resize-observer"
import { Dynamic } from "solid-js/web"
@@ -741,7 +730,7 @@ export default function Page() {
const sessionID = params.id
if (!sessionID) return
if (status()?.type !== "idle") {
- await sdk.client.session.abort({ sessionID }).catch(() => { })
+ await sdk.client.session.abort({ sessionID }).catch(() => {})
}
const revert = info()?.revert?.messageID
// Find the last user message that's not already reverted
@@ -824,69 +813,69 @@ export default function Page() {
},
...(sync.data.config.share !== "disabled"
? [
- {
- id: "session.share",
- title: "Share session",
- description: "Share this session and copy the URL to clipboard",
- category: "Session",
- slash: "share",
- disabled: !params.id || !!info()?.share?.url,
- onSelect: async () => {
- if (!params.id) return
- await sdk.client.session
- .share({ sessionID: params.id })
- .then((res) => {
- navigator.clipboard.writeText(res.data!.share!.url).catch(() =>
+ {
+ id: "session.share",
+ title: "Share session",
+ description: "Share this session and copy the URL to clipboard",
+ category: "Session",
+ slash: "share",
+ disabled: !params.id || !!info()?.share?.url,
+ onSelect: async () => {
+ if (!params.id) return
+ await sdk.client.session
+ .share({ sessionID: params.id })
+ .then((res) => {
+ navigator.clipboard.writeText(res.data!.share!.url).catch(() =>
+ showToast({
+ title: "Failed to copy URL to clipboard",
+ variant: "error",
+ }),
+ )
+ })
+ .then(() =>
+ showToast({
+ title: "Session shared",
+ description: "Share URL copied to clipboard!",
+ variant: "success",
+ }),
+ )
+ .catch(() =>
showToast({
- title: "Failed to copy URL to clipboard",
+ title: "Failed to share session",
+ description: "An error occurred while sharing the session",
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",
- title: "Unshare session",
- description: "Stop sharing this session",
- category: "Session",
- slash: "unshare",
- disabled: !params.id || !info()?.share?.url,
- onSelect: async () => {
- if (!params.id) return
- await sdk.client.session
- .unshare({ sessionID: params.id })
- .then(() =>
- showToast({
- title: "Session unshared",
- description: "Session unshared successfully!",
- variant: "success",
- }),
- )
- .catch(() =>
- showToast({
- title: "Failed to unshare session",
- description: "An error occurred while unsharing the session",
- variant: "error",
- }),
- )
+ {
+ id: "session.unshare",
+ title: "Unshare session",
+ description: "Stop sharing this session",
+ category: "Session",
+ slash: "unshare",
+ disabled: !params.id || !info()?.share?.url,
+ onSelect: async () => {
+ if (!params.id) return
+ await sdk.client.session
+ .unshare({ sessionID: params.id })
+ .then(() =>
+ showToast({
+ title: "Session unshared",
+ description: "Session unshared successfully!",
+ variant: "success",
+ }),
+ )
+ .catch(() =>
+ showToast({
+ title: "Failed to unshare session",
+ description: "An error occurred while unsharing the session",
+ variant: "error",
+ }),
+ )
+ },
},
- },
- ]
+ ]
: []),
])