@agimon-ai/po-native-dashboard 0.0.0-alpha.10

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.
Files changed (59) hide show
  1. package/LICENSE +149 -0
  2. package/README.md +5 -0
  3. package/dist/components/ActivityPanel.d.mts +10 -0
  4. package/dist/components/ActivityPanel.d.mts.map +1 -0
  5. package/dist/components/ActivityPanel.mjs +50 -0
  6. package/dist/components/ActivityPanel.mjs.map +1 -0
  7. package/dist/components/CaptureTray.d.mts +12 -0
  8. package/dist/components/CaptureTray.d.mts.map +1 -0
  9. package/dist/components/CaptureTray.mjs +112 -0
  10. package/dist/components/CaptureTray.mjs.map +1 -0
  11. package/dist/components/CompletionSheet.d.mts +46 -0
  12. package/dist/components/CompletionSheet.d.mts.map +1 -0
  13. package/dist/components/CompletionSheet.mjs +392 -0
  14. package/dist/components/CompletionSheet.mjs.map +1 -0
  15. package/dist/components/Composer.d.mts +49 -0
  16. package/dist/components/Composer.d.mts.map +1 -0
  17. package/dist/components/Composer.mjs +451 -0
  18. package/dist/components/Composer.mjs.map +1 -0
  19. package/dist/components/DialogSheet.d.mts +23 -0
  20. package/dist/components/DialogSheet.d.mts.map +1 -0
  21. package/dist/components/DialogSheet.mjs +115 -0
  22. package/dist/components/DialogSheet.mjs.map +1 -0
  23. package/dist/components/MessageActionsSheet.d.mts +16 -0
  24. package/dist/components/MessageActionsSheet.d.mts.map +1 -0
  25. package/dist/components/MessageActionsSheet.mjs +26 -0
  26. package/dist/components/MessageActionsSheet.mjs.map +1 -0
  27. package/dist/components/MoveSessionSheet.d.mts +17 -0
  28. package/dist/components/MoveSessionSheet.d.mts.map +1 -0
  29. package/dist/components/MoveSessionSheet.mjs +145 -0
  30. package/dist/components/MoveSessionSheet.mjs.map +1 -0
  31. package/dist/components/SessionMenus.d.mts +76 -0
  32. package/dist/components/SessionMenus.d.mts.map +1 -0
  33. package/dist/components/SessionMenus.mjs +1187 -0
  34. package/dist/components/SessionMenus.mjs.map +1 -0
  35. package/dist/components/TimelineItem.d.mts +39 -0
  36. package/dist/components/TimelineItem.d.mts.map +1 -0
  37. package/dist/components/TimelineItem.mjs +278 -0
  38. package/dist/components/TimelineItem.mjs.map +1 -0
  39. package/dist/components/sessionGroups.mjs +20 -0
  40. package/dist/components/sessionGroups.mjs.map +1 -0
  41. package/dist/components/sessionTimeline.mjs +20 -0
  42. package/dist/components/sessionTimeline.mjs.map +1 -0
  43. package/dist/components/slotProps.d.mts +23 -0
  44. package/dist/components/slotProps.d.mts.map +1 -0
  45. package/dist/components/slotProps.mjs +68 -0
  46. package/dist/components/slotProps.mjs.map +1 -0
  47. package/dist/index.d.mts +13 -0
  48. package/dist/index.mjs +14 -0
  49. package/dist/screens/SessionScreen.d.mts +63 -0
  50. package/dist/screens/SessionScreen.d.mts.map +1 -0
  51. package/dist/screens/SessionScreen.mjs +562 -0
  52. package/dist/screens/SessionScreen.mjs.map +1 -0
  53. package/dist/screens/SessionsScreen.d.mts +47 -0
  54. package/dist/screens/SessionsScreen.d.mts.map +1 -0
  55. package/dist/screens/SessionsScreen.mjs +1433 -0
  56. package/dist/screens/SessionsScreen.mjs.map +1 -0
  57. package/dist/slotProps.d.mts +2 -0
  58. package/dist/slotProps.mjs +3 -0
  59. package/package.json +92 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogSheet.mjs","names":["Button","fontOf","Input","Panel","Textarea","StyleSheet","DialogAsk","id","method","title","body","placeholder","options","label","DialogSheetProps","ask","value","onChangeValue","onAnswer","askId","onCancel","DialogSheet","textInput","submit","styles","sheet","scroll","content","map","option","actions","create","theme","flexShrink","margin","spacing","padding","gap","borderRadius","lg","borderWidth","borderColor","colors","uni__dependencies","color","hi","fontFamily","sans","fontWeight","semibold","fontSize","lineHeight","text","base","flexGrow","flexDirection","flexWrap"],"sources":["../../src/components/DialogSheet.tsx"],"sourcesContent":["import { Button, fontOf, Input, Panel, Textarea } from '@agimon-ai/po-native-components';\nimport { ScrollView, Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nexport interface DialogAsk {\n id: string;\n method?: 'select' | 'confirm' | 'input' | 'editor';\n title: string;\n body?: string;\n placeholder?: string;\n options: readonly { id: string; label: string }[];\n}\n\nexport interface DialogSheetProps {\n ask: DialogAsk;\n value?: string;\n onChangeValue?: (value: string) => void;\n onAnswer: (askId: string, value: string) => void;\n onCancel?: (askId: string) => void;\n}\n\n/** A question from Po for you: the panel surface with a rose edge. */\nexport function DialogSheet({ ask, value = '', onChangeValue, onAnswer, onCancel }: DialogSheetProps) {\n const method = ask.method ?? 'select';\n const textInput = method === 'input' || method === 'editor';\n const submit = () => onAnswer(ask.id, value);\n return (\n <Panel style={styles.sheet}>\n {/* The question and its options scroll; Cancel and Send stay in reach below. */}\n <ScrollView style={styles.scroll} contentContainerStyle={styles.content} keyboardShouldPersistTaps=\"handled\">\n <Text style={styles.title} accessibilityRole=\"header\">\n {ask.title}\n </Text>\n {ask.body ? <Text style={styles.body}>{ask.body}</Text> : null}\n {textInput ? (\n method === 'editor' ? (\n <Textarea\n value={value}\n onChangeText={onChangeValue}\n accessibilityLabel={ask.title}\n placeholder={ask.placeholder}\n rows={4}\n />\n ) : (\n <Input\n value={value}\n onChangeText={onChangeValue}\n accessibilityLabel={ask.title}\n placeholder={ask.placeholder}\n onSubmitEditing={submit}\n />\n )\n ) : (\n <View style={styles.options}>\n {ask.options.map((option) => (\n <Button\n key={option.id}\n variant=\"outline\"\n size=\"card\"\n onPress={() => onAnswer(ask.id, option.id)}\n accessibilityLabel={option.label}\n >\n {option.label}\n </Button>\n ))}\n </View>\n )}\n </ScrollView>\n {onCancel || textInput ? (\n <View style={styles.actions}>\n {onCancel ? (\n <Button variant=\"ghost\" onPress={() => onCancel(ask.id)}>\n Cancel\n </Button>\n ) : null}\n {textInput ? (\n <Button variant=\"outline\" onPress={submit}>\n Send reply\n </Button>\n ) : null}\n </View>\n ) : null}\n </Panel>\n );\n}\n\nconst styles = StyleSheet.create((theme) => ({\n sheet: {\n flexShrink: 1,\n margin: theme.spacing(3),\n padding: theme.spacing(4),\n gap: theme.spacing(3),\n borderRadius: theme.borderRadius.lg,\n borderWidth: 1,\n borderColor: theme.colors['edge-magenta'],\n },\n title: {\n color: theme.colors.hi,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontWeight: theme.fontWeight.semibold,\n fontSize: theme.fontSize.lg,\n lineHeight: theme.lineHeight.lg,\n },\n body: {\n color: theme.colors.text,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n },\n scroll: { flexGrow: 0, flexShrink: 1 },\n content: { gap: theme.spacing(3) },\n options: { gap: theme.spacing(2) },\n actions: { flexDirection: 'row', flexWrap: 'wrap', gap: theme.spacing(2) },\n}));\n"],"mappings":";;;;;;;;;AAsBA,SAAgBqB,YAAY,EAAEN,KAAKC,QAAQ,IAAIC,eAAeC,UAAUE,YAA8B;CACpG,MAAMZ,SAASO,IAAIP,UAAU;CAC7B,MAAMc,YAAYd,WAAW,WAAWA,WAAW;CACnD,MAAMe,eAAeL,SAASH,IAAIR,IAAIS,KAAK;CAC3C,OACE,qBAAC,OAAD;EAAO,OAAOQ,OAAOC;YAArB,CAEE,qBAAC,YAAD;GAAY,OAAOD,OAAOE;GAAQ,uBAAuBF,OAAOG;GAAS,2BAA0B;aAAnG;IACE,oBAAC,MAAD;KAAM,OAAOH,OAAOf;KAAO,mBAAkB;eAC1CM,IAAIN;IACD;IACLM,IAAIL,OAAO,oBAAC,MAAD;KAAM,OAAOc,OAAOd;eAAOK,IAAIL;IAAW,KAAI;IACzDY,YACCd,WAAW,WACT,oBAAC,UAAD;KACSQ;KACP,cAAcC;KACd,oBAAoBF,IAAIN;KACxB,aAAaM,IAAIJ;KACjB,MAAM;IAAE,KAGV,oBAAC,OAAD;KACSK;KACP,cAAcC;KACd,oBAAoBF,IAAIN;KACxB,aAAaM,IAAIJ;KACjB,iBAAiBY;IAAO,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AAKL,MAAMG,QAAQ,CAAC;EAACQ,mBAAA,CAAA,CAAA;CAAC;CACjC/B,SAAS;EAAEyB,KAAKL,MAAMG,QAAQ,CAAC;EAACQ,mBAAA,CAAA,CAAA;CAAC;CACjCb,SAAS;EAAEyB,eAAe;EAAOC,UAAU;EAAQnB,KAAKL,MAAMG,QAAQ,CAAC;EAACQ,mBAAA,CAAA,CAAA;CAAC;AAC3E,EAAE"}
@@ -0,0 +1,16 @@
1
+ import { InstalledUserMessageAction } from "@agimon-ai/po-web-dashboard/core";
2
+ //#region src/components/MessageActionsSheet.d.ts
3
+ export interface MessageActionsSheetProps {
4
+ sessionId: string;
5
+ /** The message long-pressed; undefined keeps the sheet closed. */
6
+ message?: {
7
+ id: string;
8
+ text: string;
9
+ };
10
+ actions: readonly InstalledUserMessageAction[];
11
+ onClose: () => void;
12
+ }
13
+ /** The phone's version of the cockpit's user-message menu: plugin actions on one of your messages. */
14
+ export declare function MessageActionsSheet({ sessionId, message, actions, onClose }: MessageActionsSheetProps): import("react").JSX.Element;
15
+ //#endregion
16
+ //# sourceMappingURL=MessageActionsSheet.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageActionsSheet.d.mts","names":[],"sources":["../../src/components/MessageActionsSheet.tsx"],"mappings":";;iBAGiB;EACf;;EAEA;IAAY;IAAY;;EACxB,kBAAkB;EAClB;;;wBAIc,sBAAsB,WAAW,SAAS,SAAS,WAAW,2CAAwB,IAAA"}
@@ -0,0 +1,26 @@
1
+ import { ListRow, Sheet, SheetBody, SheetContent, SheetHeader, SheetTitle } from "@agimon-ai/po-native-components";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+
4
+ //#region src/components/MessageActionsSheet.tsx
5
+ /** The phone's version of the cockpit's user-message menu: plugin actions on one of your messages. */
6
+ function MessageActionsSheet({ sessionId, message, actions, onClose }) {
7
+ return /* @__PURE__ */ jsx(Sheet, {
8
+ open: message !== void 0,
9
+ onOpenChange: (open) => !open && onClose(),
10
+ children: /* @__PURE__ */ jsxs(SheetContent, { children: [/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Your message" }) }), message ? /* @__PURE__ */ jsx(SheetBody, { children: actions.map((action) => /* @__PURE__ */ jsx(ListRow, {
11
+ title: action.label,
12
+ onPress: () => {
13
+ onClose();
14
+ action.run({
15
+ sessionId,
16
+ messageId: message.id,
17
+ text: message.text
18
+ });
19
+ }
20
+ }, `${action.pluginId}:${action.id}`)) }) : null] })
21
+ });
22
+ }
23
+
24
+ //#endregion
25
+ export { MessageActionsSheet };
26
+ //# sourceMappingURL=MessageActionsSheet.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageActionsSheet.mjs","names":[],"sources":["../../src/components/MessageActionsSheet.tsx"],"sourcesContent":["import { ListRow, Sheet, SheetBody, SheetContent, SheetHeader, SheetTitle } from '@agimon-ai/po-native-components';\nimport type { InstalledUserMessageAction } from '@agimon-ai/po-web-dashboard/core';\n\nexport interface MessageActionsSheetProps {\n sessionId: string;\n /** The message long-pressed; undefined keeps the sheet closed. */\n message?: { id: string; text: string };\n actions: readonly InstalledUserMessageAction[];\n onClose: () => void;\n}\n\n/** The phone's version of the cockpit's user-message menu: plugin actions on one of your messages. */\nexport function MessageActionsSheet({ sessionId, message, actions, onClose }: MessageActionsSheetProps) {\n return (\n <Sheet open={message !== undefined} onOpenChange={(open) => !open && onClose()}>\n <SheetContent>\n <SheetHeader>\n <SheetTitle>Your message</SheetTitle>\n </SheetHeader>\n {message ? (\n <SheetBody>\n {actions.map((action) => (\n <ListRow\n key={`${action.pluginId}:${action.id}`}\n title={action.label}\n onPress={() => {\n onClose();\n action.run({ sessionId, messageId: message.id, text: message.text });\n }}\n />\n ))}\n </SheetBody>\n ) : null}\n </SheetContent>\n </Sheet>\n );\n}\n"],"mappings":";;;;;AAYA,SAAgB,oBAAoB,EAAE,WAAW,SAAS,SAAS,WAAqC;CACtG,OACE,oBAAC,OAAD;EAAO,MAAM,YAAY;EAAW,eAAe,SAAS,CAAC,QAAQ,QAAQ;YAC3E,qBAAC,cAAD,aACE,oBAAC,aAAD,YACE,oBAAC,YAAD,YAAY,eAAwB,GACzB,IACZ,UACC,oBAAC,WAAD,YACG,QAAQ,KAAK,WACZ,oBAAC,SAAD;GAEE,OAAO,OAAO;GACd,eAAe;IACb,QAAQ;IACR,OAAO,IAAI;KAAE;KAAW,WAAW,QAAQ;KAAI,MAAM,QAAQ;IAAK,CAAC;GACrE;EACD,GANM,GAAG,OAAO,SAAS,GAAG,OAAO,IAMnC,CACF,EACQ,KACT,IACQ;CACT;AAEX"}
@@ -0,0 +1,17 @@
1
+ //#region src/components/MoveSessionSheet.d.ts
2
+ export declare function MoveSessionSheet({ name, workspaceName, destinations, moving, blocked, error, onClose, onMove }: {
3
+ name: string;
4
+ workspaceName: string;
5
+ destinations: readonly {
6
+ id: string;
7
+ name: string;
8
+ root: string;
9
+ }[];
10
+ moving?: boolean;
11
+ blocked?: boolean;
12
+ error?: string;
13
+ onClose: () => void;
14
+ onMove: (workspaceId: string) => void;
15
+ }): import("react").JSX.Element;
16
+ //#endregion
17
+ //# sourceMappingURL=MoveSessionSheet.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MoveSessionSheet.d.mts","names":[],"sources":["../../src/components/MoveSessionSheet.tsx"],"mappings":";wBAegB,mBACd,MACA,eACA,cACA,QACA,SACA,OACA,SACA;EAEA;EACA;EACA;IAAyB;IAAY;IAAc;;EACnD;EACA;EACA;EACA;EACA,SAAS;oBACV,IAAA"}
@@ -0,0 +1,145 @@
1
+ import { View } from "react-native-unistyles/components/native/View";
2
+ import { Text } from "react-native-unistyles/components/native/Text";
3
+ import { Button, CheckIcon, ListRow, Sheet, SheetBody, SheetContent, SheetHeader, SheetTitle, fontOf } from "@agimon-ai/po-native-components";
4
+ import { StyleSheet } from "react-native-unistyles";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { useState } from "react";
7
+
8
+ //#region src/components/MoveSessionSheet.tsx
9
+ function MoveSessionSheet({ name, workspaceName, destinations, moving = false, blocked = false, error, onClose, onMove }) {
10
+ const [selected, setSelected] = useState(destinations[0]?.id ?? "");
11
+ return /* @__PURE__ */ jsx(Sheet, {
12
+ open: true,
13
+ onOpenChange: (next) => !next && !moving && onClose(),
14
+ children: /* @__PURE__ */ jsxs(SheetContent, { children: [/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Move to workspace" }) }), /* @__PURE__ */ jsxs(SheetBody, {
15
+ style: styles.body,
16
+ children: [
17
+ /* @__PURE__ */ jsxs(Text, {
18
+ style: styles.meta,
19
+ children: [
20
+ "Move ",
21
+ /* @__PURE__ */ jsx(Text, {
22
+ style: styles.strong,
23
+ children: name
24
+ }),
25
+ " from ",
26
+ workspaceName,
27
+ ". Your conversation stays with you."
28
+ ]
29
+ }),
30
+ /* @__PURE__ */ jsx(Text, {
31
+ style: styles.meta,
32
+ children: "Workspaces on this computer"
33
+ }),
34
+ destinations.length === 0 ? /* @__PURE__ */ jsx(Text, {
35
+ style: styles.text,
36
+ children: "No other workspaces available on this computer."
37
+ }) : /* @__PURE__ */ jsx(View, {
38
+ accessibilityLabel: "Destination workspace",
39
+ children: destinations.map((workspace) => /* @__PURE__ */ jsx(ListRow, {
40
+ title: workspace.name,
41
+ description: /* @__PURE__ */ jsx(Text, {
42
+ style: styles.path,
43
+ children: workspace.root
44
+ }),
45
+ selected: selected === workspace.id,
46
+ disabled: moving || blocked,
47
+ disclosure: false,
48
+ accessibilityLabel: `${workspace.name}, ${workspace.root}`,
49
+ trailing: selected === workspace.id ? /* @__PURE__ */ jsx(CheckIcon, {
50
+ size: 18,
51
+ color: "green"
52
+ }) : void 0,
53
+ onPress: () => setSelected(workspace.id)
54
+ }, workspace.id))
55
+ }),
56
+ /* @__PURE__ */ jsx(Text, {
57
+ style: styles.meta,
58
+ children: "Po restarts in the destination folder with its settings and permissions. Working files stay where they are."
59
+ }),
60
+ blocked ? /* @__PURE__ */ jsx(Text, {
61
+ style: styles.warning,
62
+ children: "Stop the current run before moving this session."
63
+ }) : null,
64
+ error ? /* @__PURE__ */ jsxs(Text, {
65
+ accessibilityRole: "alert",
66
+ style: styles.error,
67
+ children: ["Could not confirm the move. Reopen the session to check its workspace. ", error]
68
+ }) : null,
69
+ moving ? /* @__PURE__ */ jsxs(Text, {
70
+ accessibilityLiveRegion: "polite",
71
+ style: styles.meta,
72
+ children: [
73
+ "Moving ",
74
+ name,
75
+ " to ",
76
+ destinations.find((workspace) => workspace.id === selected)?.name,
77
+ " and reloading Po…"
78
+ ]
79
+ }) : null,
80
+ /* @__PURE__ */ jsx(Button, {
81
+ variant: "primary",
82
+ size: "lg",
83
+ disabled: moving || blocked || !destinations.some((workspace) => workspace.id === selected),
84
+ onPress: () => onMove(selected),
85
+ loading: moving,
86
+ loadingLabel: "Moving",
87
+ children: "Move and reload"
88
+ }),
89
+ /* @__PURE__ */ jsx(Button, {
90
+ variant: "ghost",
91
+ size: "lg",
92
+ disabled: moving,
93
+ onPress: onClose,
94
+ children: "Cancel"
95
+ })
96
+ ]
97
+ })] })
98
+ });
99
+ }
100
+ const styles = StyleSheet.create((theme) => ({
101
+ body: {
102
+ gap: theme.spacing(3),
103
+ uni__dependencies: [0]
104
+ },
105
+ text: {
106
+ fontFamily: fontOf(theme.fontFamily.sans),
107
+ fontSize: theme.fontSize.base,
108
+ color: theme.colors.text,
109
+ uni__dependencies: [0]
110
+ },
111
+ meta: {
112
+ fontFamily: fontOf(theme.fontFamily.sans),
113
+ fontSize: theme.fontSize.sm,
114
+ lineHeight: theme.lineHeightRelaxed.sm,
115
+ color: theme.colors.dim,
116
+ uni__dependencies: [0]
117
+ },
118
+ strong: {
119
+ fontWeight: theme.fontWeight.semibold,
120
+ color: theme.colors.hi,
121
+ uni__dependencies: [0]
122
+ },
123
+ path: {
124
+ fontFamily: fontOf(theme.fontFamily.mono),
125
+ fontSize: theme.fontSize.sm,
126
+ color: theme.colors.dim,
127
+ uni__dependencies: [0]
128
+ },
129
+ error: {
130
+ fontFamily: fontOf(theme.fontFamily.sans),
131
+ fontSize: theme.fontSize.sm,
132
+ color: theme.colors.red,
133
+ uni__dependencies: [0]
134
+ },
135
+ warning: {
136
+ fontFamily: fontOf(theme.fontFamily.sans),
137
+ fontSize: theme.fontSize.sm,
138
+ color: theme.colors.yellow,
139
+ uni__dependencies: [0]
140
+ }
141
+ }));
142
+
143
+ //#endregion
144
+ export { MoveSessionSheet };
145
+ //# sourceMappingURL=MoveSessionSheet.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MoveSessionSheet.mjs","names":["Button","CheckIcon","fontOf","ListRow","Sheet","SheetBody","SheetContent","SheetHeader","SheetTitle","useState","StyleSheet","MoveSessionSheet","name","workspaceName","destinations","moving","blocked","error","onClose","onMove","id","root","workspaceId","selected","setSelected","next","styles","body","meta","strong","length","text","map","workspace","path","undefined","warning","find","some","create","theme","gap","spacing","uni__dependencies","fontFamily","sans","fontSize","base","color","colors","sm","lineHeight","lineHeightRelaxed","dim","fontWeight","semibold","hi","mono","red","yellow"],"sources":["../../src/components/MoveSessionSheet.tsx"],"sourcesContent":["import {\n Button,\n CheckIcon,\n fontOf,\n ListRow,\n Sheet,\n SheetBody,\n SheetContent,\n SheetHeader,\n SheetTitle,\n} from '@agimon-ai/po-native-components';\nimport { useState } from 'react';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nexport function MoveSessionSheet({\n name,\n workspaceName,\n destinations,\n moving = false,\n blocked = false,\n error,\n onClose,\n onMove,\n}: {\n name: string;\n workspaceName: string;\n destinations: readonly { id: string; name: string; root: string }[];\n moving?: boolean;\n blocked?: boolean;\n error?: string;\n onClose: () => void;\n onMove: (workspaceId: string) => void;\n}) {\n const [selected, setSelected] = useState(destinations[0]?.id ?? '');\n return (\n <Sheet open onOpenChange={(next) => !next && !moving && onClose()}>\n <SheetContent>\n <SheetHeader>\n <SheetTitle>Move to workspace</SheetTitle>\n </SheetHeader>\n <SheetBody style={styles.body}>\n <Text style={styles.meta}>\n Move <Text style={styles.strong}>{name}</Text> from {workspaceName}. Your conversation stays with you.\n </Text>\n <Text style={styles.meta}>Workspaces on this computer</Text>\n {destinations.length === 0 ? (\n <Text style={styles.text}>No other workspaces available on this computer.</Text>\n ) : (\n <View accessibilityLabel=\"Destination workspace\">\n {destinations.map((workspace) => (\n <ListRow\n key={workspace.id}\n title={workspace.name}\n description={<Text style={styles.path}>{workspace.root}</Text>}\n selected={selected === workspace.id}\n disabled={moving || blocked}\n disclosure={false}\n accessibilityLabel={`${workspace.name}, ${workspace.root}`}\n trailing={selected === workspace.id ? <CheckIcon size={18} color=\"green\" /> : undefined}\n onPress={() => setSelected(workspace.id)}\n />\n ))}\n </View>\n )}\n <Text style={styles.meta}>\n Po restarts in the destination folder with its settings and permissions. Working files stay where they are.\n </Text>\n {blocked ? <Text style={styles.warning}>Stop the current run before moving this session.</Text> : null}\n {error ? (\n <Text accessibilityRole=\"alert\" style={styles.error}>\n Could not confirm the move. Reopen the session to check its workspace. {error}\n </Text>\n ) : null}\n {moving ? (\n <Text accessibilityLiveRegion=\"polite\" style={styles.meta}>\n Moving {name} to {destinations.find((workspace) => workspace.id === selected)?.name} and reloading Po…\n </Text>\n ) : null}\n <Button\n variant=\"primary\"\n size=\"lg\"\n disabled={moving || blocked || !destinations.some((workspace) => workspace.id === selected)}\n onPress={() => onMove(selected)}\n loading={moving}\n loadingLabel=\"Moving\"\n >\n Move and reload\n </Button>\n <Button variant=\"ghost\" size=\"lg\" disabled={moving} onPress={onClose}>\n Cancel\n </Button>\n </SheetBody>\n </SheetContent>\n </Sheet>\n );\n}\n\nconst styles = StyleSheet.create((theme) => ({\n body: { gap: theme.spacing(3) },\n text: { fontFamily: fontOf(theme.fontFamily.sans), fontSize: theme.fontSize.base, color: theme.colors.text },\n meta: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeightRelaxed.sm,\n color: theme.colors.dim,\n },\n strong: { fontWeight: theme.fontWeight.semibold, color: theme.colors.hi },\n path: { fontFamily: fontOf(theme.fontFamily.mono), fontSize: theme.fontSize.sm, color: theme.colors.dim },\n error: { fontFamily: fontOf(theme.fontFamily.sans), fontSize: theme.fontSize.sm, color: theme.colors.red },\n warning: { fontFamily: fontOf(theme.fontFamily.sans), fontSize: theme.fontSize.sm, color: theme.colors.yellow },\n}));\n"],"mappings":";;;;;;;;AAeA,SAAgBW,iBAAiB,EAC/BC,MACAC,eACAC,cACAC,SAAS,OACTC,UAAU,OACVC,OACAC,SACAC,UAUC;CACD,MAAM,CAACI,UAAUC,eAAef,SAASK,aAAa,EAAE,EAAEM,MAAM,EAAE;CAClE,OACE,oBAAC,OAAD;EAAO;EAAK,eAAeK,SAAS,CAACA,QAAQ,CAACV,UAAUG,QAAQ;YAC9D,qBAAC,cAAD,aACE,oBAAC,aAAD,YACE,oBAAC,YAAD,YAAY,oBAA6B,GAC9B,IACb,qBAAC,WAAD;GAAW,OAAOQ,OAAOC;aAAzB;IACE,qBAAC,MAAD;KAAM,OAAOD,OAAOE;eAApB;MAAyB;MAClB,oBAAC,MAAD;OAAM,OAAOF,OAAOG;iBAASjB;MAAW;MAAC;MAAOC;MAAc;KAC/D;;IACN,oBAAC,MAAD;KAAM,OAAOa,OAAOE;eAAM;IAAiC;IAC1Dd,aAAagB,WAAW,IACvB,oBAAC,MAAD;KAAM,OAAOJ,OAAOK;eAAM;IAAqD,KAE/E,oBAAC,MAAD;KAAM,oBAAmB;eACtBjB,aAAakB,KAAKC,cACjB,oBAAC,SAAD;MAEE,OAAOA,UAAUrB;MACjB,aAAa,oBAAC,MAAD;OAAM,OAAOc,OAAOQ;iBAAOD,UAAUZ;MAAW;MAC7D,UAAUE,aAAaU,UAAUb;MACjC,UAAUL,UAAUC;MACpB,YAAY;MACZ,oBAAoB,GAAGiB,UAAUrB,KAAI,IAAKqB,UAAUZ;MACpD,U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OR,MAAMS,OAAOI;EAAGV,mBAAA,CAAA,CAAA;CACzB;CACAd,QAAQ;EAAEyB,YAAYd,MAAMc,WAAWC;EAAUP,OAAOR,MAAMS,OAAOO;EAAEb,mBAAA,CAAA,CAAA;CAAC;CACxET,MAAM;EAAEU,YAAY1C,OAAOsC,MAAMI,WAAWa,IAAI;EAAGX,UAAUN,MAAMM,SAASI;EAAIF,OAAOR,MAAMS,OAAOI;EAAGV,mBAAA,CAAA,CAAA;CAAC;CACxG1B,OAAO;EAAE2B,YAAY1C,OAAOsC,MAAMI,WAAWC,IAAI;EAAGC,UAAUN,MAAMM,SAASI;EAAIF,OAAOR,MAAMS,OAAOS;EAAGf,mBAAA,CAAA,CAAA;CAAC;CACzGP,SAAS;EAAEQ,YAAY1C,OAAOsC,MAAMI,WAAWC,IAAI;EAAGC,UAAUN,MAAMM,SAASI;EAAIF,OAAOR,MAAMS,OAAOU;EAAMhB,mBAAA,CAAA,CAAA;CAAC;AAChH,EAAE"}
@@ -0,0 +1,76 @@
1
+ import { ReactNode } from "react";
2
+ import { NativeTemplateSessionsActions, WebTemplateRailPendingSetup, WebTemplateRailSession, WebTemplateRailWorkspace } from "@agimon-ai/po-core/native";
3
+ //#region src/components/SessionMenus.d.ts
4
+ /** A session card's ⋮: the cockpit's rename, groups, resume, restart and remove, with remove confirmed first. */
5
+ export declare function SessionMenuSheet({ session, actions, onGroups, scope, onClose }: {
6
+ session: WebTemplateRailSession | null;
7
+ scope?: string;
8
+ actions: NativeTemplateSessionsActions;
9
+ /** Opens the groups sheet; absent when the phone app cannot change groups. */
10
+ onGroups?: (session: WebTemplateRailSession) => void;
11
+ onClose: () => void;
12
+ }): import("react").JSX.Element;
13
+ /** A workspace's ⋮: resume a saved conversation here, or remove the workspace after confirming. */
14
+ export declare function WorkspaceMenuSheet({ workspace, actions, onClose }: {
15
+ workspace: WebTemplateRailWorkspace | null;
16
+ actions: NativeTemplateSessionsActions;
17
+ onClose: () => void;
18
+ }): import("react").JSX.Element;
19
+ export type SessionGroupsActions = Required<Pick<NativeTemplateSessionsActions, 'setSessionGroups' | 'renameGroup' | 'deleteGroup'>>;
20
+ /**
21
+ * The cockpit's groups dialog as a sheet. Rows check groups on and off and the typed name can
22
+ * become a new one; rename and delete act on every session in the group at once, the checks wait for Save.
23
+ */
24
+ export declare function SessionGroupsSheet({ session, sessions, actions, onClose }: {
25
+ session: WebTemplateRailSession | null;
26
+ /** Every listed session, which is where the known groups and their members come from. */
27
+ sessions: readonly WebTemplateRailSession[];
28
+ actions: SessionGroupsActions;
29
+ onClose: () => void;
30
+ }): import("react").JSX.Element;
31
+ /** A pending setup's ⋮: it has no runtime, so removing it is the only action, as in the cockpit. */
32
+ export declare function SetupMenuSheet({ target, removePendingSetup, onClose }: {
33
+ target: {
34
+ sessionId: string;
35
+ setup: WebTemplateRailPendingSetup;
36
+ } | null;
37
+ removePendingSetup: NonNullable<NativeTemplateSessionsActions['removePendingSetup']>;
38
+ onClose: () => void;
39
+ }): import("react").JSX.Element;
40
+ export type AddWorkspaceActions = Required<Pick<NativeTemplateSessionsActions, 'addWorkspace' | 'searchDirectories' | 'listDirectory'>> & Pick<NativeTemplateSessionsActions, 'discoverWorkspaces' | 'addDeclaredWorkspaces'>;
41
+ export interface AdmissionRow {
42
+ name: string;
43
+ instructions?: string;
44
+ workspaceId?: string;
45
+ checked: boolean;
46
+ error?: string;
47
+ }
48
+ /** The approved native composition, shared by the real sheet and deterministic stories. */
49
+ export declare function AddWorkspaceView({ open, path, name, instructions, rows, discovering, error, busy, manual, canSubmit, onPathChange, onNameChange, onInstructionsChange, onBrowse, onToggle, onSubmit, onClose, folderContent }: {
50
+ open: boolean;
51
+ path: string;
52
+ name: string;
53
+ instructions: string;
54
+ rows: readonly AdmissionRow[];
55
+ discovering: boolean;
56
+ error: string;
57
+ busy: boolean;
58
+ manual: boolean;
59
+ canSubmit: boolean;
60
+ onPathChange: (path: string) => void;
61
+ onNameChange: (name: string) => void;
62
+ onInstructionsChange: (instructions: string) => void;
63
+ onBrowse: () => void;
64
+ onToggle: (name: string) => void;
65
+ onSubmit: () => void;
66
+ onClose: () => void;
67
+ folderContent?: ReactNode;
68
+ }): import("react").JSX.Element;
69
+ /** Discovery is optional so fetched templates still work with older phone providers. */
70
+ export declare function AddWorkspaceSheet({ open, actions, onClose }: {
71
+ open: boolean;
72
+ actions: AddWorkspaceActions;
73
+ onClose: () => void;
74
+ }): import("react").JSX.Element;
75
+ //#endregion
76
+ //# sourceMappingURL=SessionMenus.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionMenus.d.mts","names":[],"sources":["../../src/components/SessionMenus.tsx"],"mappings":";;;;wBAiEgB,mBACd,SACA,SACA,UACA,OACA;EAEA,SAAS;EACT;EACA,SAAS;;EAET,YAAY,SAAS;EACrB;oBACD,IAAA;;wBAiNe,qBACd,WACA,SACA;EAEA,WAAW;EACX,SAAS;EACT;oBACD,IAAA;YAwGW,uBAAuB,SACjC,KAAK;;;;;wBAOS,qBACd,SACA,UACA,SACA;EAEA,SAAS;;EAET,mBAAmB;EACnB,SAAS;EACT;oBACD,IAAA;;wBAgPe,iBACd,QACA,oBACA;EAEA;IAAU;IAAmB,OAAO;;EACpC,oBAAoB,YAAY;EAChC;oBACD,IAAA;YAwDW,sBAAsB,SAChC,KAAK,0FAEL,KAAK;iBA8DU;EACf;EACA;EACA;EACA;EACA;;;wBAIc,mBACd,MACA,MACA,MACA,cACA,MACA,aACA,OACA,MACA,QACA,WACA,cACA,cACA,sBACA,UACA,UACA,UACA,SACA;EAEA;EACA;EACA;EACA;EACA,eAAe;EACf;EACA;EACA;EACA;EACA;EACA,eAAe;EACf,eAAe;EACf,uBAAuB;EACvB;EACA,WAAW;EACX;EACA;EACA,gBAAgB;oBACjB,IAAA;;wBAoIe,oBACd,MACA,SACA;EAEA;EACA,SAAS;EACT;oBACD,IAAA"}