@buffcore/admin-shell 0.8.39 → 0.8.41
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/dist/i18n/en.d.ts +3 -0
- package/dist/i18n/en.js +3 -0
- package/dist/i18n/es.json +3 -0
- package/dist/workbench/app/ServedSetup.js +8 -1
- package/dist/workbench/app/StudioApp.js +14 -2
- package/dist/workbench/app/__snapshots__/places-dom.test.tsx.snap +3 -3
- package/dist/workbench/app/actions.d.ts +9 -0
- package/dist/workbench/app/actions.js +7 -1
- package/dist/workbench/app/chat-session.d.ts +12 -0
- package/dist/workbench/app/chat.d.ts +22 -0
- package/dist/workbench/app/chat.js +1 -0
- package/dist/workbench/app/loop.js +10 -4
- package/dist/workbench/app/panel-cards.d.ts +10 -0
- package/dist/workbench/app/panel-cards.js +28 -0
- package/dist/workbench/app/studio-post.js +1 -0
- package/dist/workbench/app/test/loop-fixture.d.ts +8 -2
- package/dist/workbench/studio/frame/AllowFolderCard.d.ts +16 -0
- package/dist/workbench/studio/frame/AllowFolderCard.js +63 -0
- package/dist/workbench/studio/frame/PanelList.js +6 -1
- package/dist/workbench/studio/frame/PanelMessage.d.ts +2 -0
- package/dist/workbench/studio/frame/PanelMessage.js +1 -1
- package/dist/workbench/studio/frame/PanelPermission.d.ts +2 -0
- package/dist/workbench/studio/frame/PanelPermission.js +4 -0
- package/dist/workbench/studio/frame/PlatformsCard.d.ts +10 -0
- package/dist/workbench/studio/frame/PlatformsCard.js +26 -0
- package/dist/workbench/studio/frame/WaitingBanner.d.ts +5 -0
- package/dist/workbench/studio/frame/WaitingBanner.js +17 -0
- package/dist/workbench/studio/frame/panelControls.d.ts +12 -0
- package/dist/workbench/studio/frame/useTurnDraft.d.ts +1 -0
- package/dist/workbench/studio/frame/useTurnDraft.js +3 -1
- package/dist/workbench/studio/i18n/frame.en.d.ts +18 -0
- package/dist/workbench/studio/i18n/frame.en.js +19 -1
- package/dist/workbench/studio/i18n/frame.es.json +20 -2
- package/dist/workbench/studio/i18n/levels.en.d.ts +3 -3
- package/dist/workbench/studio/i18n/levels.en.js +3 -3
- package/dist/workbench/studio/i18n/levels.es.json +3 -3
- package/dist/workbench/studio/i18n/loop.en.d.ts +12 -0
- package/dist/workbench/studio/i18n/loop.en.js +14 -2
- package/dist/workbench/studio/i18n/loop.es.json +14 -2
- package/dist/workbench/studio/run/WhereItRuns.d.ts +5 -0
- package/dist/workbench/studio/run/WhereItRuns.js +37 -17
- package/dist/workbench/studio/work/work-test-data.d.ts +1 -1
- package/package.json +6 -6
package/dist/i18n/en.d.ts
CHANGED
|
@@ -42,6 +42,9 @@ declare const _default: {
|
|
|
42
42
|
'admin.mode.contrast': string;
|
|
43
43
|
'admin.themes.neutral': string;
|
|
44
44
|
'admin.themes.soft': string;
|
|
45
|
+
'admin.themes.clear': string;
|
|
46
|
+
'admin.themes.warm': string;
|
|
47
|
+
'admin.themes.bold': string;
|
|
45
48
|
'admin.roles.owner': string;
|
|
46
49
|
'admin.platforms.web': string;
|
|
47
50
|
'admin.platforms.ios': string;
|
package/dist/i18n/en.js
CHANGED
|
@@ -45,6 +45,9 @@ export default {
|
|
|
45
45
|
'admin.mode.contrast': 'High contrast',
|
|
46
46
|
'admin.themes.neutral': 'Neutral',
|
|
47
47
|
'admin.themes.soft': 'Soft',
|
|
48
|
+
'admin.themes.clear': 'Clear',
|
|
49
|
+
'admin.themes.warm': 'Warm',
|
|
50
|
+
'admin.themes.bold': 'Bold',
|
|
48
51
|
'admin.roles.owner': 'Owner',
|
|
49
52
|
'admin.platforms.web': 'Web',
|
|
50
53
|
'admin.platforms.ios': 'iOS',
|
package/dist/i18n/es.json
CHANGED
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
"admin.mode.contrast": "Alto contraste",
|
|
37
37
|
"admin.themes.neutral": "Neutro",
|
|
38
38
|
"admin.themes.soft": "Suave",
|
|
39
|
+
"admin.themes.clear": "Claro",
|
|
40
|
+
"admin.themes.warm": "Cálido",
|
|
41
|
+
"admin.themes.bold": "Audaz",
|
|
39
42
|
"admin.roles.owner": "Propietario",
|
|
40
43
|
"admin.platforms.web": "Web",
|
|
41
44
|
"admin.platforms.ios": "iOS",
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useT } from '@buffcore/i18n/react';
|
|
3
|
-
import { useState } from 'react';
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
4
|
import { SetupPage } from '../studio/run/SetupPage.js';
|
|
5
5
|
import { studioRefusal } from './actions.js';
|
|
6
6
|
import { setupProps } from './run.js';
|
|
7
7
|
export function ServedSetup({ state, server, actions, }) {
|
|
8
8
|
const t = useT();
|
|
9
9
|
const [last, setLast] = useState();
|
|
10
|
+
// A chat's platforms card chose these: read once, so a later visit to Setup opens nothing.
|
|
11
|
+
const [wanted] = useState(() => actions.platformsWanted?.current);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (actions.platformsWanted)
|
|
14
|
+
actions.platformsWanted.current = undefined;
|
|
15
|
+
}, [actions.platformsWanted]);
|
|
10
16
|
const { viewer, runs } = state;
|
|
11
17
|
const canBuild = !viewer || viewer.rights === 'all' || viewer.rights.includes('build');
|
|
12
18
|
const running = Object.entries(runs).some(([id, run]) => /^(?:enable|disable):/.test(id) && run.state === 'running');
|
|
@@ -32,6 +38,7 @@ export function ServedSetup({ state, server, actions, }) {
|
|
|
32
38
|
const controllable = canBuild && !running && !last?.pending;
|
|
33
39
|
return (_jsx(SetupPage, { ...props, onRun: actions.run, where: {
|
|
34
40
|
...props.where,
|
|
41
|
+
wanted,
|
|
35
42
|
refusal: last && error ? { platform: last.platform, text: error } : undefined,
|
|
36
43
|
onEnable: controllable
|
|
37
44
|
? (platform, id) => void runPlatform(platform, `enable:${platform}:${id}`)
|
|
@@ -6,12 +6,14 @@ import { EmptyState, Loading } from '../../components/states.js';
|
|
|
6
6
|
import { captionText } from '../../components/styles.js';
|
|
7
7
|
import { CodeDoor, useCodeDoor } from '../studio/frame/CodeDoor.js';
|
|
8
8
|
import { StudioFrame } from '../studio/frame/StudioFrame.js';
|
|
9
|
+
import { WaitingBanner } from '../studio/frame/WaitingBanner.js';
|
|
9
10
|
import { PreviewChoiceContext } from '../studio/loop/PrototypeApp.js';
|
|
10
11
|
import { canReadAgents, useChat } from './chat.js';
|
|
11
12
|
import { frameProps, useStudioPage, useStudioTitle } from './frame.js';
|
|
12
13
|
import { StudioHostParts } from './host-parts.js';
|
|
13
14
|
import { hostLevelChoice, LevelChoiceContext, useLevelChoice } from './level-choice.js';
|
|
14
15
|
import { StudioPages } from './pages.js';
|
|
16
|
+
import { withPanelCards } from './panel-cards.js';
|
|
15
17
|
import { useStudio } from './useStudio.js';
|
|
16
18
|
/** The container owns polling and local choices; drawn views still take props only. */
|
|
17
19
|
export function StudioApp(props) {
|
|
@@ -26,6 +28,7 @@ function StudioSession(props) {
|
|
|
26
28
|
const [panelOpen, setPanel] = useState(true);
|
|
27
29
|
const [workChange, setWorkChange] = useState();
|
|
28
30
|
const previewChoice = useRef(undefined);
|
|
31
|
+
const platformsWanted = useRef(undefined);
|
|
29
32
|
const selectionGeneration = useRef(0);
|
|
30
33
|
const chooseWorkChange = (change) => {
|
|
31
34
|
selectionGeneration.current++;
|
|
@@ -83,6 +86,7 @@ function StudioSession(props) {
|
|
|
83
86
|
: codingNotice
|
|
84
87
|
? undefined
|
|
85
88
|
: chatNotice);
|
|
89
|
+
frame.agent = withPanelCards(frame.agent, state, conversation.chat.id, actions, onGo, platformsWanted);
|
|
86
90
|
const rights = state.viewer?.rights;
|
|
87
91
|
frame.onLevel =
|
|
88
92
|
!state.level && (!rights || rights === 'all' || rights.includes('settings'))
|
|
@@ -97,6 +101,11 @@ function StudioSession(props) {
|
|
|
97
101
|
conversation,
|
|
98
102
|
notice: pageNotice,
|
|
99
103
|
trouble,
|
|
104
|
+
agentName: frame.agent.name,
|
|
105
|
+
onAnswer: () => {
|
|
106
|
+
setPanel(true);
|
|
107
|
+
conversation.focus();
|
|
108
|
+
},
|
|
100
109
|
onGo,
|
|
101
110
|
workChange,
|
|
102
111
|
setWorkChange: chooseWorkChange,
|
|
@@ -123,9 +132,12 @@ function turnPanel(agent, conversation, onGo, t, reason) {
|
|
|
123
132
|
},
|
|
124
133
|
};
|
|
125
134
|
}
|
|
126
|
-
function ConversationPage({ every, onLevel, state, page, actions, conversation, notice, trouble, onGo, workChange, setWorkChange, selectionGeneration, }) {
|
|
135
|
+
function ConversationPage({ every, onLevel, state, page, actions, conversation, notice, trouble, agentName, onAnswer, onGo, workChange, setWorkChange, selectionGeneration, }) {
|
|
127
136
|
const t = useT();
|
|
128
|
-
|
|
137
|
+
// Only this step's own chat, once its turn has ended: a question from another chat never shows.
|
|
138
|
+
const chat = conversation.chat;
|
|
139
|
+
const waiting = chat.page === page && chat.state !== 'running' ? chat.waiting : undefined;
|
|
140
|
+
return (_jsxs(_Fragment, { children: [trouble && trouble !== 'offline' && (_jsx(Banner, { tone: "attention", title: t(`workbench.trouble.${trouble}`) })), notice && _jsx(Banner, { tone: "attention", title: notice }), waiting && (_jsx(WaitingBanner, { agent: agentName, question: waiting.question, onAnswer: onAnswer })), _jsx(StudioPages, { every: every, onLevel: onLevel, change: workChange, onChange: (change) => {
|
|
129
141
|
conversation.controls.composer.onUnqueue?.();
|
|
130
142
|
conversation.controls.composer.onChange('');
|
|
131
143
|
setWorkChange(change);
|