moi-computer 0.13.1-next.0 → 0.13.1-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/api/app-config.ts +0 -1
- package/client/app/routes/workspace-route.tsx +4 -7
- package/client/features/account/account-test-utils.tsx +13 -5
- package/client/features/account/api.ts +4 -2
- package/client/features/account/profile-actions.ts +1 -1
- package/client/features/app-settings/avatar-upload.tsx +62 -0
- package/client/features/app-settings/profile-settings.tsx +10 -0
- package/client/features/chat/applet-chat-intents.ts +4 -4
- package/client/features/chat/sessions/api.ts +5 -5
- package/client/features/chat/sessions/use-selected-session.ts +3 -3
- package/client/features/chat/use-chat.ts +4 -4
- package/client/features/collab/applet-api.ts +1 -1
- package/client/features/collab/components/cursors.tsx +6 -1
- package/client/features/collab/components/presence-avatars.tsx +1 -1
- package/client/features/collab/components/presence-frame.tsx +1 -1
- package/client/features/collab/components/presence-group.tsx +1 -1
- package/client/features/collab/components/presence-helpers.ts +2 -2
- package/client/features/collab/components/user-avatar-group.tsx +1 -1
- package/client/features/collab/components/user-avatar.tsx +1 -1
- package/client/features/collab/components/user.tsx +1 -1
- package/client/features/collab/index.ts +3 -3
- package/client/features/{workspace-members → collab/members}/api.ts +6 -3
- package/client/features/{workspace-members → collab/members}/hooks.ts +11 -35
- package/client/features/{workspace-members → collab/members}/store.ts +4 -4
- package/client/features/{workspace-members → collab/members}/types.ts +2 -2
- package/client/features/collab/{client.ts → presence/client.ts} +2 -2
- package/client/features/collab/{provider.tsx → presence/provider.tsx} +1 -12
- package/client/features/collab/{users.ts → presence/users.ts} +19 -21
- package/client/features/collab/sharing/agent-invite.tsx +30 -0
- package/client/features/collab/sharing/workspace-members.tsx +277 -0
- package/client/features/collab/sharing/workspace-sharing-menu.tsx +179 -0
- package/client/features/collab/testing/component-fixtures.tsx +3 -3
- package/client/features/collab/testing/fake-engine.ts +2 -2
- package/client/features/dev/collab/collab-playground.tsx +2 -2
- package/client/features/dev/dev-index-page.tsx +0 -6
- package/client/features/dev/dev-routes.tsx +0 -2
- package/client/features/dev/workspace-setup-mocks.ts +0 -1
- package/client/features/identity/host-api.ts +2 -2
- package/client/features/identity/store.ts +1 -1
- package/client/features/views/use-view-actions.ts +3 -3
- package/client/features/workspace/browser-tab-state.ts +6 -6
- package/client/features/workspace/workspace-content.tsx +10 -6
- package/dist/{chunk-00s35r33.js → chunk-3smkkcfw.js} +76 -76
- package/dist/chunk-47h9c2qy.js +2 -0
- package/dist/chunk-8qed2gqp.js +75 -0
- package/dist/{chunk-7rz6g7g7.js → chunk-8zy3vesm.js} +1 -1
- package/dist/{chunk-s5s1vzdw.js → chunk-a47zy276.js} +2 -2
- package/dist/chunk-g4c1nte9.css +1 -0
- package/dist/chunk-kcactdr4.js +2 -0
- package/dist/chunk-m8bhx6tw.js +1 -0
- package/dist/{chunk-svxhxfeq.js → chunk-pf19zcrn.js} +2 -2
- package/dist/{chunk-kdgk4dac.js → chunk-th91xfnp.js} +1 -1
- package/dist/chunk-ygzxah0e.js +1 -0
- package/dist/index.html +1 -1
- package/lib/types.ts +0 -1
- package/package.json +1 -1
- package/server/app-config.ts +2 -7
- package/server/applets/declarations.ts +6 -7
- package/server/cli/commands/init.ts +0 -11
- package/server/collab/config.ts +1 -5
- package/server/collab/manager.ts +5 -2
- package/server/collab/skill/index.ts +1 -47
- package/server/skills/template.ts +3 -2
- package/server/skills/update.ts +1 -1
- package/server/skills/workspace.ts +0 -2
- package/server/web.ts +1 -2
- package/server/workspaces/scaffold.ts +1 -0
- package/skill/SKILL.md +1 -1
- package/client/features/collab/workspace-users-menu.tsx +0 -190
- package/client/features/dev/cloud-avatar-upload.tsx +0 -58
- package/client/features/dev/cloud-page.tsx +0 -363
- package/dist/chunk-af2jyddf.js +0 -2
- package/dist/chunk-cekekc3f.css +0 -1
- package/dist/chunk-ep5vh16c.js +0 -75
- package/dist/chunk-t0r0bds1.js +0 -1
- package/dist/chunk-vp2qzc0d.js +0 -1
- package/dist/chunk-wz5qv1bn.js +0 -2
- /package/client/features/{workspace-members → collab/members}/keys.ts +0 -0
- /package/client/features/collab/{hooks.tsx → presence/hooks.tsx} +0 -0
- /package/client/features/collab/{presence-publisher.ts → presence/presence-publisher.ts} +0 -0
- /package/client/features/collab/{presence-target.ts → presence/presence-target.ts} +0 -0
- /package/client/features/collab/{store.ts → presence/store.ts} +0 -0
|
@@ -2,7 +2,7 @@ import { useCallback, useMemo, useState } from 'react'
|
|
|
2
2
|
|
|
3
3
|
import type { WorkspaceTabsState } from '@/lib/types'
|
|
4
4
|
import { normalizeWorkspaceTabs } from '@/lib/workspace-layout'
|
|
5
|
-
import {
|
|
5
|
+
import { useAppConfig } from '@/client/api/app-config'
|
|
6
6
|
import { useWorkspaceLayoutCtx } from './workspace-layout-context'
|
|
7
7
|
|
|
8
8
|
const keyFor = (workspaceId: string) => `moi:collab:${workspaceId}:tabs`
|
|
@@ -29,15 +29,15 @@ export function writeWorkspaceTabs(workspaceId: string, tabs: WorkspaceTabsState
|
|
|
29
29
|
|
|
30
30
|
export function useWorkspaceTabs() {
|
|
31
31
|
const { workspaceId, layout, setLayout } = useWorkspaceLayoutCtx()
|
|
32
|
-
const
|
|
32
|
+
const cloud = useAppConfig().environment === 'cloud'
|
|
33
33
|
const defaults = useMemo(() => normalizeWorkspaceTabs(layout.tabs), [layout.tabs])
|
|
34
34
|
const [local, setLocal] = useState<WorkspaceTabsState>(() =>
|
|
35
|
-
|
|
35
|
+
cloud ? readWorkspaceTabs(workspaceId, defaults) : defaults
|
|
36
36
|
)
|
|
37
37
|
const setTabs = useCallback(
|
|
38
38
|
(tabs: WorkspaceTabsState) => {
|
|
39
39
|
const next = normalizeWorkspaceTabs(tabs)
|
|
40
|
-
if (
|
|
40
|
+
if (cloud) {
|
|
41
41
|
setLocal(next)
|
|
42
42
|
writeWorkspaceTabs(workspaceId, next)
|
|
43
43
|
} else {
|
|
@@ -45,7 +45,7 @@ export function useWorkspaceTabs() {
|
|
|
45
45
|
}
|
|
46
46
|
return next
|
|
47
47
|
},
|
|
48
|
-
[
|
|
48
|
+
[cloud, setLayout, workspaceId]
|
|
49
49
|
)
|
|
50
|
-
return [
|
|
50
|
+
return [cloud ? local : defaults, setTabs] as const
|
|
51
51
|
}
|
|
@@ -17,7 +17,8 @@ import type { WelcomeDestination } from '@/client/features/chat/messages/chat-em
|
|
|
17
17
|
import { ChatPopup } from '@/client/features/chat/chat-popup'
|
|
18
18
|
import { ThemePanel } from '@/client/features/workspace/theme-panel'
|
|
19
19
|
import { Overview } from '@/client/features/overview/overview'
|
|
20
|
-
import {
|
|
20
|
+
import { useAppConfig } from '@/client/api/app-config'
|
|
21
|
+
import { WorkspaceSharingMenu } from '@/client/features/collab'
|
|
21
22
|
import { PanelHeader } from '@/client/components/shared/panel-header'
|
|
22
23
|
import { Button } from '@/client/components/ui/button'
|
|
23
24
|
import { Tooltip, TooltipContent, TooltipTrigger } from '@/client/components/ui/tooltip'
|
|
@@ -117,6 +118,7 @@ function tabItemFor(
|
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
export function WorkspaceContent({ widgets, views: allViews }: WorkspaceContentProps) {
|
|
121
|
+
const { environment } = useAppConfig()
|
|
120
122
|
const { layout, workspaceId } = useWorkspaceLayoutCtx()
|
|
121
123
|
const theme = resolveWorkspaceTheme(layout.theme)
|
|
122
124
|
const viewActions = useViewActions()
|
|
@@ -543,11 +545,13 @@ export function WorkspaceContent({ widgets, views: allViews }: WorkspaceContentP
|
|
|
543
545
|
onReorder={reorderTabs}
|
|
544
546
|
/>
|
|
545
547
|
</div>
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
548
|
+
{environment === 'cloud' && (
|
|
549
|
+
<WorkspaceSharingMenu
|
|
550
|
+
workspaceId={workspaceId}
|
|
551
|
+
describeTab={tab => tabItemFor(tab, allViews, false, () => false)}
|
|
552
|
+
onOpenTab={openTab}
|
|
553
|
+
/>
|
|
554
|
+
)}
|
|
551
555
|
{canUseSplit && mode === 'fullscreen' && (
|
|
552
556
|
<Tooltip>
|
|
553
557
|
<TooltipTrigger
|