mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
woo
This commit is contained in:
parent
7bd06f9cd0
commit
127241d53f
1 changed files with 5 additions and 5 deletions
|
|
@ -30,7 +30,6 @@ import { useCommandDialog } from "./component/dialog-command"
|
|||
export function Session() {
|
||||
const route = useRouteData("session")
|
||||
const sync = useSync()
|
||||
const command = useCommandDialog()
|
||||
const session = createMemo(() => sync.session.get(route.sessionID)!)
|
||||
const messages = createMemo(() => sync.data.message[route.sessionID] ?? [])
|
||||
const todo = createMemo(() => sync.data.todo[route.sessionID] ?? [])
|
||||
|
|
@ -50,19 +49,20 @@ export function Session() {
|
|||
})
|
||||
})
|
||||
|
||||
const command = useCommandDialog()
|
||||
command.register(() => [
|
||||
{
|
||||
title: "Share session",
|
||||
value: "session.share",
|
||||
disabled: !session().share?.url,
|
||||
category: "Session",
|
||||
onSelect: (ctx) => {
|
||||
onSelect: (dialog) => {
|
||||
sdk.session.share({
|
||||
path: {
|
||||
id: route.sessionID,
|
||||
},
|
||||
})
|
||||
ctx.clear()
|
||||
dialog.clear()
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -70,13 +70,13 @@ export function Session() {
|
|||
value: "session.unshare",
|
||||
disabled: !!session().share?.url,
|
||||
category: "Session",
|
||||
onSelect: (ctx) => {
|
||||
onSelect: (dialog) => {
|
||||
sdk.session.unshare({
|
||||
path: {
|
||||
id: route.sessionID,
|
||||
},
|
||||
})
|
||||
ctx.clear()
|
||||
dialog.clear()
|
||||
},
|
||||
},
|
||||
])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue