@solidxai/core-ui 0.1.21-beta.5 → 0.1.22-beta.0
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/components/core/card/SolidCardViewConfigure.js +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.js.map +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.tsx +1 -1
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +3 -2
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +3 -1
- package/dist/components/core/form/fields/ISolidField.d.ts +1 -0
- package/dist/components/core/form/fields/ISolidField.d.ts.map +1 -1
- package/dist/components/core/form/fields/ISolidField.js.map +1 -1
- package/dist/components/core/form/fields/ISolidField.tsx +1 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +1 -0
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +20 -17
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.tsx +3 -2
- package/dist/components/core/kanban/SolidKanbanViewConfigure.js +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.tsx +1 -1
- package/dist/components/core/solid-agent/SolidAgent.module.css +11 -0
- package/dist/components/core/solid-agent/SolidAgentChat.d.ts.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentChat.js +16 -6
- package/dist/components/core/solid-agent/SolidAgentChat.js.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentChat.tsx +20 -4
- package/dist/components/core/solid-agent/SolidAgentMarkdown.d.ts +7 -3
- package/dist/components/core/solid-agent/SolidAgentMarkdown.d.ts.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentMarkdown.js +17 -12
- package/dist/components/core/solid-agent/SolidAgentMarkdown.js.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentMarkdown.tsx +18 -11
- package/dist/components/core/solid-agent/agentMarkdown.d.ts +20 -0
- package/dist/components/core/solid-agent/agentMarkdown.d.ts.map +1 -0
- package/dist/components/core/solid-agent/agentMarkdown.js +140 -0
- package/dist/components/core/solid-agent/agentMarkdown.js.map +1 -0
- package/dist/components/core/solid-agent/agentMarkdown.ts +140 -0
- package/dist/components/core/solid-agent/client/agentRuntime.d.ts.map +1 -1
- package/dist/components/core/solid-agent/client/agentRuntime.js +22 -14
- package/dist/components/core/solid-agent/client/agentRuntime.js.map +1 -1
- package/dist/components/core/solid-agent/client/agentRuntime.ts +8 -1
- package/dist/components/core/solid-agent/client/agentSocket.d.ts.map +1 -1
- package/dist/components/core/solid-agent/client/agentSocket.js +4 -4
- package/dist/components/core/solid-agent/client/agentSocket.js.map +1 -1
- package/dist/components/core/solid-agent/client/agentSocket.ts +5 -2
- package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.js +1 -1
- package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.js.map +1 -1
- package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.tsx +1 -1
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.d.ts.map +1 -1
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.js +2 -0
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.js.map +1 -1
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.ts +1 -0
- package/dist/components/core/solid-agent/embed/agentEmbedSamples.js +7 -7
- package/dist/components/core/solid-agent/embed/agentEmbedSamples.js.map +1 -1
- package/dist/components/core/solid-agent/embed/agentEmbedSamples.ts +24 -24
- package/dist/components/core/solid-agent/thread/inlineWidget.d.ts +1 -2
- package/dist/components/core/solid-agent/thread/inlineWidget.d.ts.map +1 -1
- package/dist/components/core/solid-agent/thread/inlineWidget.js +82 -42
- package/dist/components/core/solid-agent/thread/inlineWidget.js.map +1 -1
- package/dist/components/core/solid-agent/thread/inlineWidget.ts +69 -39
- package/dist/components/core/solid-agent/types.d.ts +4 -0
- package/dist/components/core/solid-agent/types.d.ts.map +1 -1
- package/dist/components/core/solid-agent/types.js.map +1 -1
- package/dist/components/core/solid-agent/types.ts +4 -0
- package/dist/components/core/solid-agent/widgets/SolidDiffListChatWidget.d.ts.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidDiffListChatWidget.js +12 -3
- package/dist/components/core/solid-agent/widgets/SolidDiffListChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidDiffListChatWidget.tsx +13 -4
- package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.d.ts +3 -2
- package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.d.ts.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.js +7 -3
- package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.tsx +19 -3
- package/dist/components/core/solid-agent/widgets/solidChatWidgets.module.css +3 -0
- package/dist/components/shad-cn-ui/SolidDialog.js +1 -1
- package/dist/components/shad-cn-ui/SolidDialog.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidDialog.tsx +1 -1
- package/dist/redux/api/solidEntityApi.d.ts +1 -0
- package/dist/redux/api/solidEntityApi.d.ts.map +1 -1
- package/dist/redux/api/solidEntityApi.js +14 -0
- package/dist/redux/api/solidEntityApi.js.map +1 -1
- package/dist/redux/api/solidEntityApi.tsx +8 -0
- package/dist/redux/api/solidMenuApi.d.ts +11 -11
- package/dist/redux/api/solidMenuApi.d.ts.map +1 -1
- package/dist/redux/api/solidMenuApi.js +2 -0
- package/dist/redux/api/solidMenuApi.js.map +1 -1
- package/dist/redux/api/solidMenuApi.ts +2 -0
- package/dist/redux/features/agentSlice.d.ts +3 -1
- package/dist/redux/features/agentSlice.d.ts.map +1 -1
- package/dist/redux/features/agentSlice.js +7 -4
- package/dist/redux/features/agentSlice.js.map +1 -1
- package/dist/redux/features/agentSlice.ts +9 -3
- package/dist/redux/store/defaultStoreConfig.d.ts +8 -8
- package/dist/resources/stylesheets/_main.scss +41 -16
- package/dist/routes/AppEventListener.d.ts.map +1 -1
- package/dist/routes/AppEventListener.js +16 -0
- package/dist/routes/AppEventListener.js.map +1 -1
- package/dist/routes/AppEventListener.tsx +16 -0
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js +4 -4
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.tsx +4 -4
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js +3 -0
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js.map +1 -1
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.tsx +3 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solidMenuApi.js","sourceRoot":"","sources":["../../../src/redux/api/solidMenuApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,IAAM,YAAY,GAAG,oBAAoB,CAAC;AAE1C,MAAM,CAAC,IAAM,aAAa,GAAG,SAAS,CAAC;IACnC,WAAW,EAAE,cAAc;IAC3B,SAAS,EAAE,iBAAiB;IAC5B,SAAS,EAAE,UAAC,OAAO,IAAK,OAAA,CAAC;QACrB,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC;YACzB,KAAK,EAAE,UAAC,EAAE;gBACN,OAAO,WAAI,YAAY,iGAAuF,E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,EAAE,UAAC,EAAE,IAAK,OAAA,CAAC;gBACZ,GAAG,EAAE,WAAI,YAAY,cAAI,EAAE,CAAE;gBAC7B,MAAM,EAAE,QAAQ;aACnB,CAAC,EAHa,CAGb;SACL,CAAC;KACL,CAAC,EAjDsB,CAiDtB;CACL,CAAC,CAAC;AAEH,MAAM,CACF,IAAA,qBAAqB,GAUrB,aAAa,sBAVQ,EACrB,yBAAyB,GASzB,aAAa,0BATY,EACzB,4BAA4B,GAQ5B,aAAa,6BARe,EAC5B,+BAA+B,GAO/B,aAAa,gCAPkB,EAC/B,mCAAmC,GAMnC,aAAa,oCANsB,EACnC,wBAAwB,GAKxB,aAAa,yBALW,EACxB,0BAA0B,GAI1B,aAAa,2BAJa,EAC1B,0BAA0B,GAG1B,aAAa,2BAHa,EAC1B,0BAA0B,GAE1B,aAAa,2BAFa,EAC1B,mCAAmC,GACnC,aAAa,oCADsB,CACrB","sourcesContent":["import { createApi } from '@reduxjs/toolkit/query/react';\nimport { baseQueryWithAuth } from './fetchBaseQuery';\n\nconst resourceName = 'menu-item-metadata';\n\nexport const solidMenusApi = createApi({\n reducerPath: 'solidMenuApi',\n baseQuery: baseQueryWithAuth,\n tagTypes: ['SolidMenu'],\n endpoints: (builder) => ({\n getSolidMenus: builder.query({\n query: (qs) => {\n return `/${resourceName}?populate[0]=module&populate[1]=action&populate[2]=parentMenuItem&populate[3]=roles&${qs}`\n },\n transformResponse: (response: any) => {\n if (response.error) {\n throw new Error(response.error);\n }\n return {\n records: response.data.records,\n meta: response.data.meta\n }\n }\n }),\n getSolidMenuById: builder.query({\n query: (id) => `/${resourceName}/${id}?populate[0]=module&populate[1]=action&populate[2]=parentMenuItem&populate[3]=roles`,\n }),\n getSolidMenuBasedOnRole: builder.query({\n query: () => `/${resourceName}/me`,\n providesTags: ['SolidMenu'],\n }),\n createSolidMenu: builder.mutation({\n query: (solidMenu) => ({\n url: '/${resourceName}',\n method: 'POST',\n body: solidMenu\n }),\n }),\n updateSolidMenu: builder.mutation({\n query: ({ id, data }) => ({\n url: `/${resourceName}/${id}`,\n method: 'PUT',\n body: data,\n }),\n }),\n deleteMultipleSolidMenus: builder.mutation({\n query: (data) => ({\n url: `/${resourceName}/bulk/`,\n method: 'DELETE',\n body: data\n }),\n }),\n deleteSolidMenu: builder.mutation({\n query: (id) => ({\n url: `/${resourceName}/${id}`,\n method: 'DELETE',\n }),\n }),\n })\n});\n\nexport const {\n useGetSolidMenusQuery,\n useLazyGetSolidMenusQuery,\n useLazyGetSolidMenuByIdQuery,\n useGetSolidMenuBasedOnRoleQuery,\n useLazyGetSolidMenuBasedOnRoleQuery,\n useGetSolidMenuByIdQuery,\n useCreateSolidMenuMutation,\n useUpdateSolidMenuMutation,\n useDeleteSolidMenuMutation,\n useDeleteMultipleSolidMenusMutation\n} = solidMenusApi;\n"]}
|
|
@@ -6,6 +6,7 @@ const resourceName = 'menu-item-metadata';
|
|
|
6
6
|
export const solidMenusApi = createApi({
|
|
7
7
|
reducerPath: 'solidMenuApi',
|
|
8
8
|
baseQuery: baseQueryWithAuth,
|
|
9
|
+
tagTypes: ['SolidMenu'],
|
|
9
10
|
endpoints: (builder) => ({
|
|
10
11
|
getSolidMenus: builder.query({
|
|
11
12
|
query: (qs) => {
|
|
@@ -26,6 +27,7 @@ export const solidMenusApi = createApi({
|
|
|
26
27
|
}),
|
|
27
28
|
getSolidMenuBasedOnRole: builder.query({
|
|
28
29
|
query: () => `/${resourceName}/me`,
|
|
30
|
+
providesTags: ['SolidMenu'],
|
|
29
31
|
}),
|
|
30
32
|
createSolidMenu: builder.mutation({
|
|
31
33
|
query: (solidMenu) => ({
|
|
@@ -9,6 +9,7 @@ export type AgentPrefill = {
|
|
|
9
9
|
prompt: string;
|
|
10
10
|
context?: AgentContext;
|
|
11
11
|
autoSend?: boolean;
|
|
12
|
+
newSession?: boolean;
|
|
12
13
|
nonce: number;
|
|
13
14
|
};
|
|
14
15
|
export type AgentState = AgentThreadState & {
|
|
@@ -18,6 +19,7 @@ export type AgentState = AgentThreadState & {
|
|
|
18
19
|
prefill: AgentPrefill | null;
|
|
19
20
|
hasMoreHistory: boolean;
|
|
20
21
|
historyPage: number;
|
|
22
|
+
loadingHistory: boolean;
|
|
21
23
|
/** Context of the last prompt sent from outside the chat (e.g. a Test Hub button). */
|
|
22
24
|
context: AgentContext | null;
|
|
23
25
|
};
|
|
@@ -25,7 +27,7 @@ export declare const agentOpenRequested: import("@reduxjs/toolkit").ActionCreato
|
|
|
25
27
|
text: string;
|
|
26
28
|
attachments?: AgentAttachmentMeta[] | undefined;
|
|
27
29
|
messageContext?: AgentMessageContext | undefined;
|
|
28
|
-
}, "solidAgent/agentUserMessageAdded">, agentThreadReset: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"solidAgent/agentThreadReset">, agentHistoryLoaded: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
30
|
+
}, "solidAgent/agentUserMessageAdded">, agentThreadReset: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"solidAgent/agentThreadReset">, agentHistoryLoadingChanged: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "solidAgent/agentHistoryLoadingChanged">, agentHistoryLoaded: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
29
31
|
items: AgentChatItem[];
|
|
30
32
|
hasMore: boolean;
|
|
31
33
|
page: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentSlice.d.ts","sourceRoot":"","sources":["../../../src/redux/features/agentSlice.ts"],"names":[],"mappings":"AACA,OAAO,EAAkD,KAAK,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtI,OAAO,EAEH,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC7B,MAAM,yCAAyC,CAAC;AAEjD;;;;GAIG;AA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B,yFAChB,0BAA0B,yGAC1B,kBAAkB;WA5B2C,aAAa,EAAE;aAAW,OAAO;UAAQ,MAAM;;qCA6B5G,kBAAkB,sGACA,CAAC;;AAEvB,wBAAkC"}
|
|
@@ -22,7 +22,7 @@ var _a;
|
|
|
22
22
|
import { createSlice } from "@reduxjs/toolkit";
|
|
23
23
|
import { applyAgentEvent, createThreadState, nextItemId } from "../../components/core/solid-agent/agentEvents";
|
|
24
24
|
import { AgentEventTypes, } from "../../components/core/solid-agent/types";
|
|
25
|
-
var initialState = __assign(__assign({}, createThreadState()), { open: false, mode: "bubble", connection: "idle", prefill: null, hasMoreHistory: false, historyPage: 1, context: null });
|
|
25
|
+
var initialState = __assign(__assign({}, createThreadState()), { open: false, mode: "bubble", connection: "idle", prefill: null, hasMoreHistory: false, historyPage: 1, loadingHistory: false, context: null });
|
|
26
26
|
var agentSlice = createSlice({
|
|
27
27
|
name: "solidAgent",
|
|
28
28
|
initialState: initialState,
|
|
@@ -33,7 +33,7 @@ var agentSlice = createSlice({
|
|
|
33
33
|
state.open = true;
|
|
34
34
|
state.mode = (_b = options.mode) !== null && _b !== void 0 ? _b : (state.mode === "bubble" ? "compact" : state.mode);
|
|
35
35
|
if (options.prompt) {
|
|
36
|
-
state.prefill = { prompt: options.prompt, context: options.context, autoSend: options.autoSend, nonce: Date.now() };
|
|
36
|
+
state.prefill = { prompt: options.prompt, context: options.context, autoSend: options.autoSend, newSession: options.newSession, nonce: Date.now() };
|
|
37
37
|
}
|
|
38
38
|
if (options.context)
|
|
39
39
|
state.context = options.context;
|
|
@@ -73,7 +73,10 @@ var agentSlice = createSlice({
|
|
|
73
73
|
state.authError = null;
|
|
74
74
|
},
|
|
75
75
|
agentThreadReset: function (state) {
|
|
76
|
-
Object.assign(state, createThreadState(), { commands: state.commands, hasMoreHistory: false, historyPage: 1 });
|
|
76
|
+
Object.assign(state, createThreadState(), { commands: state.commands, hasMoreHistory: false, historyPage: 1, loadingHistory: false });
|
|
77
|
+
},
|
|
78
|
+
agentHistoryLoadingChanged: function (state, action) {
|
|
79
|
+
state.loadingHistory = action.payload;
|
|
77
80
|
},
|
|
78
81
|
agentHistoryLoaded: function (state, action) {
|
|
79
82
|
var _a;
|
|
@@ -91,6 +94,6 @@ var agentSlice = createSlice({
|
|
|
91
94
|
},
|
|
92
95
|
},
|
|
93
96
|
});
|
|
94
|
-
export var agentOpenRequested = (_a = agentSlice.actions, _a.agentOpenRequested), agentClosed = _a.agentClosed, agentModeChanged = _a.agentModeChanged, agentPrefillConsumed = _a.agentPrefillConsumed, agentConnectionChanged = _a.agentConnectionChanged, agentUserMessageAdded = _a.agentUserMessageAdded, agentThreadReset = _a.agentThreadReset, agentHistoryLoaded = _a.agentHistoryLoaded, agentEventReceived = _a.agentEventReceived;
|
|
97
|
+
export var agentOpenRequested = (_a = agentSlice.actions, _a.agentOpenRequested), agentClosed = _a.agentClosed, agentModeChanged = _a.agentModeChanged, agentPrefillConsumed = _a.agentPrefillConsumed, agentConnectionChanged = _a.agentConnectionChanged, agentUserMessageAdded = _a.agentUserMessageAdded, agentThreadReset = _a.agentThreadReset, agentHistoryLoadingChanged = _a.agentHistoryLoadingChanged, agentHistoryLoaded = _a.agentHistoryLoaded, agentEventReceived = _a.agentEventReceived;
|
|
95
98
|
export default agentSlice.reducer;
|
|
96
99
|
//# sourceMappingURL=agentSlice.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentSlice.js","sourceRoot":"","sources":["../../../src/redux/features/agentSlice.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAsB,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,UAAU,EAAyB,MAAM,+CAA+C,CAAC;AACtI,OAAO,EACH,eAAe,GAUlB,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"agentSlice.js","sourceRoot":"","sources":["../../../src/redux/features/agentSlice.ts"],"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rE,CAAC;aACL;QACL,CAAC;QACD,kBAAkB,YAAC,KAAK,EAAE,MAAqC;YAC3D,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC;KACJ;CACJ,CAAC,CAAC;AAEH,MAAM,CACF,IAAA,kBAAkB,IADT,KAWT,UAAU,CAAC,OAAO,wBAVA,EAClB,WAAW,iBAAA,EACX,gBAAgB,sBAAA,EAChB,oBAAoB,0BAAA,EACpB,sBAAsB,4BAAA,EACtB,qBAAqB,2BAAA,EACrB,gBAAgB,sBAAA,EAChB,0BAA0B,gCAAA,EAC1B,kBAAkB,wBAAA,EAClB,kBAAkB,wBAAA,CACC;AAEvB,eAAe,UAAU,CAAC,OAAO,CAAC","sourcesContent":["import { createSlice, type PayloadAction } from \"@reduxjs/toolkit\";\nimport { applyAgentEvent, createThreadState, nextItemId, type AgentThreadState } from \"../../components/core/solid-agent/agentEvents\";\nimport {\n AgentEventTypes,\n type AgentAttachmentMeta,\n type AgentChatEvent,\n type AgentChatItem,\n type AgentConnection,\n type AgentContext,\n type AgentMessageContext,\n type AgentMode,\n type AgentUsageStats,\n type SolidAgentOpenOptions,\n} from \"../../components/core/solid-agent/types\";\n\n/**\n * State of the SolidX Agent chat: window mode, connection, and the single global thread.\n * The socket lives outside Redux (AgentRuntime); every normalised event is dispatched as\n * `agentEventReceived` and applied by the shared reducer in solid-agent/agentEvents.ts.\n */\n\nexport type AgentPrefill = { prompt: string; context?: AgentContext; autoSend?: boolean; newSession?: boolean; nonce: number };\n\nexport type AgentState = AgentThreadState & {\n open: boolean;\n mode: AgentMode;\n connection: AgentConnection;\n prefill: AgentPrefill | null;\n hasMoreHistory: boolean;\n historyPage: number;\n loadingHistory: boolean;\n /** Context of the last prompt sent from outside the chat (e.g. a Test Hub button). */\n context: AgentContext | null;\n};\n\nconst initialState: AgentState = {\n ...createThreadState(),\n open: false,\n mode: \"bubble\",\n connection: \"idle\",\n prefill: null,\n hasMoreHistory: false,\n historyPage: 1,\n loadingHistory: false,\n context: null,\n};\n\nconst agentSlice = createSlice({\n name: \"solidAgent\",\n initialState,\n reducers: {\n agentOpenRequested(state, action: PayloadAction<SolidAgentOpenOptions | undefined>) {\n const options = action.payload ?? {};\n state.open = true;\n state.mode = options.mode ?? (state.mode === \"bubble\" ? \"compact\" : state.mode);\n if (options.prompt) {\n state.prefill = { prompt: options.prompt, context: options.context, autoSend: options.autoSend, newSession: options.newSession, nonce: Date.now() };\n }\n if (options.context) state.context = options.context;\n },\n agentClosed(state) {\n state.open = false;\n state.mode = \"bubble\";\n },\n agentModeChanged(state, action: PayloadAction<AgentMode>) {\n state.mode = action.payload;\n state.open = action.payload !== \"bubble\";\n },\n agentPrefillConsumed(state) {\n state.prefill = null;\n },\n agentConnectionChanged(state, action: PayloadAction<AgentConnection>) {\n state.connection = action.payload;\n if (action.payload !== \"open\" && state.working) {\n // A turn cannot finish on a dropped socket; unblock the composer.\n state.working = false;\n state.thinking = false;\n }\n },\n agentUserMessageAdded(state, action: PayloadAction<{ text: string; attachments?: AgentAttachmentMeta[]; messageContext?: AgentMessageContext }>) {\n const { text, attachments, messageContext } = action.payload;\n state.items.push({\n id: nextItemId(\"u\"),\n at: Date.now(),\n eventType: AgentEventTypes.userMessage,\n eventData: {\n content: text,\n ...(attachments?.length ? { attachments } : {}),\n ...(messageContext ? { message_context: messageContext } : {}),\n },\n });\n state.working = true;\n state.thinking = true;\n state.turnStreamed = false;\n state.streamingId = null;\n state.liveToolId = null;\n state.authError = null;\n },\n agentThreadReset(state) {\n Object.assign(state, createThreadState(), { commands: state.commands, hasMoreHistory: false, historyPage: 1, loadingHistory: false });\n },\n agentHistoryLoadingChanged(state, action: PayloadAction<boolean>) {\n state.loadingHistory = action.payload;\n },\n agentHistoryLoaded(state, action: PayloadAction<{ items: AgentChatItem[]; hasMore: boolean; page: number; usage?: AgentUsageStats | null }>) {\n const { items, hasMore, page, usage } = action.payload;\n // History is always older than anything already in the thread.\n state.items = [...items, ...state.items];\n state.hasMoreHistory = hasMore;\n state.historyPage = page;\n if (usage && (!state.usage || state.usage.totalTokens === 0)) {\n state.usage = {\n ...usage,\n contextLimit: state.usage?.contextLimit || usage.contextLimit || 0,\n };\n }\n },\n agentEventReceived(state, action: PayloadAction<AgentChatEvent>) {\n applyAgentEvent(state, action.payload);\n },\n },\n});\n\nexport const {\n agentOpenRequested,\n agentClosed,\n agentModeChanged,\n agentPrefillConsumed,\n agentConnectionChanged,\n agentUserMessageAdded,\n agentThreadReset,\n agentHistoryLoadingChanged,\n agentHistoryLoaded,\n agentEventReceived,\n} = agentSlice.actions;\n\nexport default agentSlice.reducer;\n"]}
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
* `agentEventReceived` and applied by the shared reducer in solid-agent/agentEvents.ts.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
export type AgentPrefill = { prompt: string; context?: AgentContext; autoSend?: boolean; nonce: number };
|
|
22
|
+
export type AgentPrefill = { prompt: string; context?: AgentContext; autoSend?: boolean; newSession?: boolean; nonce: number };
|
|
23
23
|
|
|
24
24
|
export type AgentState = AgentThreadState & {
|
|
25
25
|
open: boolean;
|
|
@@ -28,6 +28,7 @@ export type AgentState = AgentThreadState & {
|
|
|
28
28
|
prefill: AgentPrefill | null;
|
|
29
29
|
hasMoreHistory: boolean;
|
|
30
30
|
historyPage: number;
|
|
31
|
+
loadingHistory: boolean;
|
|
31
32
|
/** Context of the last prompt sent from outside the chat (e.g. a Test Hub button). */
|
|
32
33
|
context: AgentContext | null;
|
|
33
34
|
};
|
|
@@ -40,6 +41,7 @@ const initialState: AgentState = {
|
|
|
40
41
|
prefill: null,
|
|
41
42
|
hasMoreHistory: false,
|
|
42
43
|
historyPage: 1,
|
|
44
|
+
loadingHistory: false,
|
|
43
45
|
context: null,
|
|
44
46
|
};
|
|
45
47
|
|
|
@@ -52,7 +54,7 @@ const agentSlice = createSlice({
|
|
|
52
54
|
state.open = true;
|
|
53
55
|
state.mode = options.mode ?? (state.mode === "bubble" ? "compact" : state.mode);
|
|
54
56
|
if (options.prompt) {
|
|
55
|
-
state.prefill = { prompt: options.prompt, context: options.context, autoSend: options.autoSend, nonce: Date.now() };
|
|
57
|
+
state.prefill = { prompt: options.prompt, context: options.context, autoSend: options.autoSend, newSession: options.newSession, nonce: Date.now() };
|
|
56
58
|
}
|
|
57
59
|
if (options.context) state.context = options.context;
|
|
58
60
|
},
|
|
@@ -95,7 +97,10 @@ const agentSlice = createSlice({
|
|
|
95
97
|
state.authError = null;
|
|
96
98
|
},
|
|
97
99
|
agentThreadReset(state) {
|
|
98
|
-
Object.assign(state, createThreadState(), { commands: state.commands, hasMoreHistory: false, historyPage: 1 });
|
|
100
|
+
Object.assign(state, createThreadState(), { commands: state.commands, hasMoreHistory: false, historyPage: 1, loadingHistory: false });
|
|
101
|
+
},
|
|
102
|
+
agentHistoryLoadingChanged(state, action: PayloadAction<boolean>) {
|
|
103
|
+
state.loadingHistory = action.payload;
|
|
99
104
|
},
|
|
100
105
|
agentHistoryLoaded(state, action: PayloadAction<{ items: AgentChatItem[]; hasMore: boolean; page: number; usage?: AgentUsageStats | null }>) {
|
|
101
106
|
const { items, hasMore, page, usage } = action.payload;
|
|
@@ -124,6 +129,7 @@ export const {
|
|
|
124
129
|
agentConnectionChanged,
|
|
125
130
|
agentUserMessageAdded,
|
|
126
131
|
agentThreadReset,
|
|
132
|
+
agentHistoryLoadingChanged,
|
|
127
133
|
agentHistoryLoaded,
|
|
128
134
|
agentEventReceived,
|
|
129
135
|
} = agentSlice.actions;
|
|
@@ -163,17 +163,17 @@ export declare const solidApiSlices: (import("@reduxjs/toolkit/query").Api<impor
|
|
|
163
163
|
confirmForgotPassword: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, any, "authApi">;
|
|
164
164
|
changePassword: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, any, "authApi">;
|
|
165
165
|
}, "authApi", never, typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName> | import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, {
|
|
166
|
-
getSolidMenus: import("@reduxjs/toolkit/query").QueryDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>,
|
|
166
|
+
getSolidMenus: import("@reduxjs/toolkit/query").QueryDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "SolidMenu", {
|
|
167
167
|
records: any;
|
|
168
168
|
meta: any;
|
|
169
169
|
}, "solidMenuApi">;
|
|
170
|
-
getSolidMenuById: import("@reduxjs/toolkit/query").QueryDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>,
|
|
171
|
-
getSolidMenuBasedOnRole: import("@reduxjs/toolkit/query").QueryDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>,
|
|
172
|
-
createSolidMenu: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>,
|
|
173
|
-
updateSolidMenu: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>,
|
|
174
|
-
deleteMultipleSolidMenus: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>,
|
|
175
|
-
deleteSolidMenu: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>,
|
|
176
|
-
}, "solidMenuApi",
|
|
170
|
+
getSolidMenuById: import("@reduxjs/toolkit/query").QueryDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">;
|
|
171
|
+
getSolidMenuBasedOnRole: import("@reduxjs/toolkit/query").QueryDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">;
|
|
172
|
+
createSolidMenu: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">;
|
|
173
|
+
updateSolidMenu: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">;
|
|
174
|
+
deleteMultipleSolidMenus: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">;
|
|
175
|
+
deleteSolidMenu: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "SolidMenu", any, "solidMenuApi">;
|
|
176
|
+
}, "solidMenuApi", "SolidMenu", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName> | import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, {
|
|
177
177
|
getSolidActions: import("@reduxjs/toolkit/query").QueryDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, {
|
|
178
178
|
records: any;
|
|
179
179
|
meta: any;
|
|
@@ -19,28 +19,53 @@ body {
|
|
|
19
19
|
overflow: hidden;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
/*
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
/*
|
|
23
|
+
* Auto-hiding scrollbars: invisible by default, shown only while an element is
|
|
24
|
+
* actively scrolling. AppEventListener toggles `data-scrolling` on the scrolling
|
|
25
|
+
* element and clears it after a short idle period. The thumb is made transparent
|
|
26
|
+
* (not removed) so layout doesn't shift; `scrollbar-color` is !important so it
|
|
27
|
+
* wins over per-component colours. `scrollbar-width: none` opt-outs stay hidden.
|
|
28
|
+
*/
|
|
29
|
+
:root {
|
|
30
|
+
--solid-scrollbar-thumb: rgba(0, 0, 0, 0.38);
|
|
27
31
|
}
|
|
28
32
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
border-radius: 10px;
|
|
33
|
+
html.dark,
|
|
34
|
+
[data-theme="dark"] {
|
|
35
|
+
--solid-scrollbar-thumb: rgba(255, 255, 255, 0.34);
|
|
33
36
|
}
|
|
34
37
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
* {
|
|
39
|
+
scrollbar-width: thin;
|
|
40
|
+
scrollbar-color: transparent transparent !important;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[data-scrolling] {
|
|
44
|
+
scrollbar-color: var(--solid-scrollbar-thumb) transparent !important;
|
|
39
45
|
}
|
|
40
46
|
|
|
41
|
-
/*
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
/* Older Safari (no standard scrollbar-color) falls back to WebKit pseudo-elements. */
|
|
48
|
+
@supports not (scrollbar-color: auto) {
|
|
49
|
+
::-webkit-scrollbar {
|
|
50
|
+
width: 8px;
|
|
51
|
+
height: 8px;
|
|
52
|
+
background: transparent;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
::-webkit-scrollbar-track,
|
|
56
|
+
::-webkit-scrollbar-corner {
|
|
57
|
+
background: transparent;
|
|
58
|
+
box-shadow: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
::-webkit-scrollbar-thumb {
|
|
62
|
+
background: transparent;
|
|
63
|
+
border-radius: 999px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
[data-scrolling]::-webkit-scrollbar-thumb {
|
|
67
|
+
background: var(--solid-scrollbar-thumb);
|
|
68
|
+
}
|
|
44
69
|
}
|
|
45
70
|
|
|
46
71
|
// .layout-wrapper {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppEventListener.d.ts","sourceRoot":"","sources":["../../src/routes/AppEventListener.tsx"],"names":[],"mappings":"AAkEA,wBAAgB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"AppEventListener.d.ts","sourceRoot":"","sources":["../../src/routes/AppEventListener.tsx"],"names":[],"mappings":"AAkEA,wBAAgB,gBAAgB,4CAwE/B"}
|
|
@@ -54,6 +54,22 @@ function buildDevErrorDetail(payload) {
|
|
|
54
54
|
export function AppEventListener() {
|
|
55
55
|
var pathname = usePathname();
|
|
56
56
|
var dispatch = useDispatch();
|
|
57
|
+
// Reveal scrollbars only while scrolling (see auto-hiding scrollbars in _main.scss).
|
|
58
|
+
// `scroll` doesn't bubble, so one capturing listener covers every scrollable element.
|
|
59
|
+
useEffect(function () {
|
|
60
|
+
var timers = new WeakMap();
|
|
61
|
+
var onScroll = function (event) {
|
|
62
|
+
var target = event.target;
|
|
63
|
+
var element = target instanceof Element ? target : target === document ? document.documentElement : null;
|
|
64
|
+
if (!element)
|
|
65
|
+
return;
|
|
66
|
+
element.setAttribute("data-scrolling", "");
|
|
67
|
+
window.clearTimeout(timers.get(element));
|
|
68
|
+
timers.set(element, window.setTimeout(function () { return element.removeAttribute("data-scrolling"); }, 900));
|
|
69
|
+
};
|
|
70
|
+
document.addEventListener("scroll", onScroll, { capture: true, passive: true });
|
|
71
|
+
return function () { return document.removeEventListener("scroll", onScroll, { capture: true }); };
|
|
72
|
+
}, []);
|
|
57
73
|
useEffect(function () {
|
|
58
74
|
var off = eventBus.on(AppEvents.GlobalError, function (payload) {
|
|
59
75
|
if (!pathname.startsWith("/admin") && !pathname.startsWith("/auth")) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppEventListener.js","sourceRoot":"","sources":["../../src/routes/AppEventListener.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAA2B,MAAM,iCAAiC,CAAC;AAQhG,SAAS,SAAS;IAChB,IAAM,OAAO,GAAG,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7D,OAAO,OAAO,KAAK,KAAK,IAAI,OAAO,KAAK,aAAa,CAAC;AACxD,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAc;IACxC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,KAAK,KAAK,IAAI,IAAI,KAA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,SAAS,CAAC,UAAC,KAAK;YAC1C,IAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC;YAChC,IAAM,gBAAgB,GAAG,cAAc,KAAK,SAAS,IAAI,UAAU,KAAK,SAAS,CAAC;YAClF,cAAc,GAAG,UAAU,CAAC;YAE5B,IAAI,CAAC,gBAAgB,EAAE;gBACrB,OAAO;aACR;YAED,QAAQ,CACN,SAAS,CAAC;gBACR,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,oBAAoB;gBAC7B,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC;oBACxC,MAAM,EAAE,KAAK,CAAC,UAAU;oBACxB,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,qDAAqD;oBAC/E,KAAK,EAAE,KAAK,CAAC,KAAK;iBACnB,CAAC,CAAC,CAAC,CAAC,kEAA2D,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC,cAAW;gBACxI,MAAM,EAAE,SAAS,EAAE;gBACnB,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;aACjC,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,4BACG,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,eAAe,CAAC,IAAI,KAAC,WAAW,KAAG,GACtF,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect } from \"react\";\nimport { eventBus, AppEvents } from \"../helpers/eventBus\";\nimport { usePathname } from \"../hooks/usePathname\";\nimport { SolidStudio } from \"../components/layout/SolidAiStudioLayout\";\nimport { useDispatch } from \"react-redux\";\nimport { showToast } from \"../redux/features/toastSlice\";\nimport { env } from \"../adapters/env\";\nimport { backendHealthMonitor, type BackendHealthState } from \"../helpers/backendHealthMonitor\";\n\ntype GlobalErrorPayload = {\n status?: number | string;\n message?: string;\n error?: unknown;\n};\n\nfunction isDevMode() {\n const envName = (env(\"VITE_SOLIDX_ENV\") || \"\").toLowerCase();\n return envName === \"dev\" || envName === \"development\";\n}\n\nfunction formatUnknownValue(value: unknown) {\n if (typeof value === \"string\") return value;\n if (value === null || value === undefined) return \"\";\n\n try {\n return JSON.stringify(value, null, 2);\n } catch {\n return String(value);\n }\n}\n\nfunction buildDevErrorDetail(payload?: GlobalErrorPayload) {\n if (!payload) return undefined;\n\n const error = payload.error as any;\n const lines: string[] = [];\n\n if (payload.status !== undefined) {\n lines.push(`Status: ${String(payload.status)}`);\n }\n\n if (payload.message) {\n lines.push(`Summary: ${payload.message}`);\n }\n\n if (error?.message) {\n lines.push(`Error: ${error.message}`);\n }\n\n if (error?.code) {\n lines.push(`Code: ${error.code}`);\n }\n\n const responseData = error?.response?.data ?? error?.data;\n const responseText = formatUnknownValue(responseData);\n if (responseText) {\n lines.push(`Response:\\n${responseText}`);\n }\n\n if (error?.stack) {\n lines.push(`Stack:\\n${error.stack}`);\n }\n\n return lines.length > 0 ? lines.join(\"\\n\\n\") : undefined;\n}\n\nexport function AppEventListener() {\n const pathname = usePathname();\n const dispatch = useDispatch();\n\n useEffect(() => {\n const off = eventBus.on<GlobalErrorPayload>(AppEvents.GlobalError, (payload) => {\n if (!pathname.startsWith(\"/admin\") && !pathname.startsWith(\"/auth\")) {\n return;\n }\n\n dispatch(\n showToast({\n severity: \"error\",\n summary: payload?.message || \"Something went wrong\",\n detail: isDevMode() ? buildDevErrorDetail(payload) : undefined,\n sticky: isDevMode(),\n life: isDevMode() ? 10000 : 4000,\n })\n );\n });\n return () => off();\n }, [dispatch, pathname]);\n\n useEffect(() => {\n let previousStatus: BackendHealthState[\"status\"] = backendHealthMonitor.getState().status;\n\n return backendHealthMonitor.subscribe((state) => {\n const nextStatus = state.status;\n const didBecomeOffline = previousStatus !== \"offline\" && nextStatus === \"offline\";\n previousStatus = nextStatus;\n\n if (!didBecomeOffline) {\n return;\n }\n\n dispatch(\n showToast({\n severity: \"error\",\n summary: \"Server unreachable\",\n detail: isDevMode() ? buildDevErrorDetail({\n status: state.statusCode,\n message: state.message || \"Unable to reach the server. Please try again later.\",\n error: state.error,\n }) : `We have been trying to reconnect to the server for over ${Math.max(1, Math.round(state.unavailableToastDelayMs / 1000))} seconds.`,\n sticky: isDevMode(),\n life: isDevMode() ? 10000 : 5000,\n })\n );\n });\n }, [dispatch]);\n\n return (\n <>\n {window.self === window.top && !pathname.startsWith(\"/embed/agent/\") && <SolidStudio />}\n </>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AppEventListener.js","sourceRoot":"","sources":["../../src/routes/AppEventListener.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAA2B,MAAM,iCAAiC,CAAC;AAQhG,SAAS,SAAS;IAChB,IAAM,OAAO,GAAG,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7D,OAAO,OAAO,KAAK,KAAK,IAAI,OAAO,KAAK,aAAa,CAAC;AACxD,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAc;IACxC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5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B,IAAI,CAAC,gBAAgB,EAAE;gBACrB,OAAO;aACR;YAED,QAAQ,CACN,SAAS,CAAC;gBACR,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,oBAAoB;gBAC7B,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC;oBACxC,MAAM,EAAE,KAAK,CAAC,UAAU;oBACxB,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,qDAAqD;oBAC/E,KAAK,EAAE,KAAK,CAAC,KAAK;iBACnB,CAAC,CAAC,CAAC,CAAC,kEAA2D,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC,cAAW;gBACxI,MAAM,EAAE,SAAS,EAAE;gBACnB,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;aACjC,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,4BACG,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,eAAe,CAAC,IAAI,KAAC,WAAW,KAAG,GACtF,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect } from \"react\";\nimport { eventBus, AppEvents } from \"../helpers/eventBus\";\nimport { usePathname } from \"../hooks/usePathname\";\nimport { SolidStudio } from \"../components/layout/SolidAiStudioLayout\";\nimport { useDispatch } from \"react-redux\";\nimport { showToast } from \"../redux/features/toastSlice\";\nimport { env } from \"../adapters/env\";\nimport { backendHealthMonitor, type BackendHealthState } from \"../helpers/backendHealthMonitor\";\n\ntype GlobalErrorPayload = {\n status?: number | string;\n message?: string;\n error?: unknown;\n};\n\nfunction isDevMode() {\n const envName = (env(\"VITE_SOLIDX_ENV\") || \"\").toLowerCase();\n return envName === \"dev\" || envName === \"development\";\n}\n\nfunction formatUnknownValue(value: unknown) {\n if (typeof value === \"string\") return value;\n if (value === null || value === undefined) return \"\";\n\n try {\n return JSON.stringify(value, null, 2);\n } catch {\n return String(value);\n }\n}\n\nfunction buildDevErrorDetail(payload?: GlobalErrorPayload) {\n if (!payload) return undefined;\n\n const error = payload.error as any;\n const lines: string[] = [];\n\n if (payload.status !== undefined) {\n lines.push(`Status: ${String(payload.status)}`);\n }\n\n if (payload.message) {\n lines.push(`Summary: ${payload.message}`);\n }\n\n if (error?.message) {\n lines.push(`Error: ${error.message}`);\n }\n\n if (error?.code) {\n lines.push(`Code: ${error.code}`);\n }\n\n const responseData = error?.response?.data ?? error?.data;\n const responseText = formatUnknownValue(responseData);\n if (responseText) {\n lines.push(`Response:\\n${responseText}`);\n }\n\n if (error?.stack) {\n lines.push(`Stack:\\n${error.stack}`);\n }\n\n return lines.length > 0 ? lines.join(\"\\n\\n\") : undefined;\n}\n\nexport function AppEventListener() {\n const pathname = usePathname();\n const dispatch = useDispatch();\n\n // Reveal scrollbars only while scrolling (see auto-hiding scrollbars in _main.scss).\n // `scroll` doesn't bubble, so one capturing listener covers every scrollable element.\n useEffect(() => {\n const timers = new WeakMap<Element, number>();\n const onScroll = (event: Event) => {\n const target = event.target;\n const element = target instanceof Element ? target : target === document ? document.documentElement : null;\n if (!element) return;\n element.setAttribute(\"data-scrolling\", \"\");\n window.clearTimeout(timers.get(element));\n timers.set(element, window.setTimeout(() => element.removeAttribute(\"data-scrolling\"), 900));\n };\n document.addEventListener(\"scroll\", onScroll, { capture: true, passive: true });\n return () => document.removeEventListener(\"scroll\", onScroll, { capture: true });\n }, []);\n\n useEffect(() => {\n const off = eventBus.on<GlobalErrorPayload>(AppEvents.GlobalError, (payload) => {\n if (!pathname.startsWith(\"/admin\") && !pathname.startsWith(\"/auth\")) {\n return;\n }\n\n dispatch(\n showToast({\n severity: \"error\",\n summary: payload?.message || \"Something went wrong\",\n detail: isDevMode() ? buildDevErrorDetail(payload) : undefined,\n sticky: isDevMode(),\n life: isDevMode() ? 10000 : 4000,\n })\n );\n });\n return () => off();\n }, [dispatch, pathname]);\n\n useEffect(() => {\n let previousStatus: BackendHealthState[\"status\"] = backendHealthMonitor.getState().status;\n\n return backendHealthMonitor.subscribe((state) => {\n const nextStatus = state.status;\n const didBecomeOffline = previousStatus !== \"offline\" && nextStatus === \"offline\";\n previousStatus = nextStatus;\n\n if (!didBecomeOffline) {\n return;\n }\n\n dispatch(\n showToast({\n severity: \"error\",\n summary: \"Server unreachable\",\n detail: isDevMode() ? buildDevErrorDetail({\n status: state.statusCode,\n message: state.message || \"Unable to reach the server. Please try again later.\",\n error: state.error,\n }) : `We have been trying to reconnect to the server for over ${Math.max(1, Math.round(state.unavailableToastDelayMs / 1000))} seconds.`,\n sticky: isDevMode(),\n life: isDevMode() ? 10000 : 5000,\n })\n );\n });\n }, [dispatch]);\n\n return (\n <>\n {window.self === window.top && !pathname.startsWith(\"/embed/agent/\") && <SolidStudio />}\n </>\n );\n}\n"]}
|
|
@@ -68,6 +68,22 @@ export function AppEventListener() {
|
|
|
68
68
|
const pathname = usePathname();
|
|
69
69
|
const dispatch = useDispatch();
|
|
70
70
|
|
|
71
|
+
// Reveal scrollbars only while scrolling (see auto-hiding scrollbars in _main.scss).
|
|
72
|
+
// `scroll` doesn't bubble, so one capturing listener covers every scrollable element.
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
const timers = new WeakMap<Element, number>();
|
|
75
|
+
const onScroll = (event: Event) => {
|
|
76
|
+
const target = event.target;
|
|
77
|
+
const element = target instanceof Element ? target : target === document ? document.documentElement : null;
|
|
78
|
+
if (!element) return;
|
|
79
|
+
element.setAttribute("data-scrolling", "");
|
|
80
|
+
window.clearTimeout(timers.get(element));
|
|
81
|
+
timers.set(element, window.setTimeout(() => element.removeAttribute("data-scrolling"), 900));
|
|
82
|
+
};
|
|
83
|
+
document.addEventListener("scroll", onScroll, { capture: true, passive: true });
|
|
84
|
+
return () => document.removeEventListener("scroll", onScroll, { capture: true });
|
|
85
|
+
}, []);
|
|
86
|
+
|
|
71
87
|
useEffect(() => {
|
|
72
88
|
const off = eventBus.on<GlobalErrorPayload>(AppEvents.GlobalError, (payload) => {
|
|
73
89
|
if (!pathname.startsWith("/admin") && !pathname.startsWith("/auth")) {
|
|
@@ -169,8 +169,8 @@ var agentToolApi = createSolidEntityApi("agentTool");
|
|
|
169
169
|
var agentRoleApi = createSolidEntityApi("agentRole");
|
|
170
170
|
var agentSecretApi = createSolidEntityApi("agentSecret");
|
|
171
171
|
var jobApi = createSolidEntityApi("agentJob");
|
|
172
|
-
var skillFields = ["id", "name", "iconName", "description"];
|
|
173
|
-
var toolFields = __spreadArray(__spreadArray([], skillFields, true), ["
|
|
172
|
+
var skillFields = ["id", "name", "iconName", "description", "type"];
|
|
173
|
+
var toolFields = __spreadArray(__spreadArray([], skillFields, true), ["status", "lastLoadError"], false);
|
|
174
174
|
function fieldsQuery(fields) {
|
|
175
175
|
return fields.map(function (name) { return "fields=".concat(encodeURIComponent(name)); }).join("&");
|
|
176
176
|
}
|
|
@@ -331,7 +331,7 @@ function LinkPicker(_a) {
|
|
|
331
331
|
return _jsxs("button", { type: "button", onClick: function () { onAdd(item.id); setSearch(""); setOpen(false); }, children: [_jsx("strong", { children: (_b = (_a = item.name) !== null && _a !== void 0 ? _a : item.displayName) !== null && _b !== void 0 ? _b : item.key }), _jsx("span", { children: item.description })] }, item.id);
|
|
332
332
|
}) : _jsxs("p", { children: ["No available ", label.toLowerCase(), " found."] }) })] }), selected.length ? _jsx("div", { className: "agent-editor__cards", children: selected.map(function (item) {
|
|
333
333
|
var _a, _b, _c, _d;
|
|
334
|
-
return _jsxs("div", { className: "agent-editor__linked-card", children: [_jsx("div", { className: "agent-editor__card-content", children: render(item, linkFor === null || linkFor === void 0 ? void 0 : linkFor(item.id)) }), renderSettings === null || renderSettings === void 0 ? void 0 : renderSettings(item, linkFor === null || linkFor === void 0 ? void 0 : linkFor(item.id)), onView && editUrlFor ? _jsxs(SolidDropdownMenu, { children: [_jsx(SolidDropdownMenuTrigger, { asChild: true, children: _jsx("button", { type: "button", className: "agent-editor__resource-menu-trigger", "aria-label": "Actions for ".concat((_b = (_a = item.name) !== null && _a !== void 0 ? _a : item.displayName) !== null && _b !== void 0 ? _b : item.key), children: _jsx(Ellipsis, { size: 18 }) }) }), _jsxs(SolidDropdownMenuContent, { className: "agent-editor__resource-menu", children: [_jsxs(SolidDropdownMenuItem, { onSelect: function () { return onView(item); }, children: [_jsx(Eye, { size: 16 }), " View"] }), _jsx(SolidDropdownMenuItem, { asChild: true, children: _jsxs("a", { href: editUrlFor(item), target: "_blank", rel: "noopener noreferrer", children: [_jsx(Pencil, { size: 16 }), " Edit"] }) }), _jsxs(SolidDropdownMenuItem, { className: "agent-editor__resource-delete", onSelect: function () { return onRemove(item.id); }, children: [_jsx(Trash2, { size: 16 }), " Delete"] })] })] }) : _jsx("button", { type: "button", "aria-label": "Remove ".concat((_d = (_c = item.name) !== null && _c !== void 0 ? _c : item.displayName) !== null && _d !== void 0 ? _d : item.key), onClick: function () { return onRemove(item.id); }, children: _jsx(Trash2, { size: 16 }) })] }, item.id);
|
|
334
|
+
return _jsxs("div", { className: "agent-editor__linked-card", children: [_jsx("div", { className: "agent-editor__card-content", children: render(item, linkFor === null || linkFor === void 0 ? void 0 : linkFor(item.id)) }), renderSettings === null || renderSettings === void 0 ? void 0 : renderSettings(item, linkFor === null || linkFor === void 0 ? void 0 : linkFor(item.id)), onView && editUrlFor ? _jsxs(SolidDropdownMenu, { children: [_jsx(SolidDropdownMenuTrigger, { asChild: true, children: _jsx("button", { type: "button", className: "agent-editor__resource-menu-trigger", "aria-label": "Actions for ".concat((_b = (_a = item.name) !== null && _a !== void 0 ? _a : item.displayName) !== null && _b !== void 0 ? _b : item.key), children: _jsx(Ellipsis, { size: 18 }) }) }), _jsxs(SolidDropdownMenuContent, { className: "agent-editor__resource-menu", children: [_jsxs(SolidDropdownMenuItem, { onSelect: function () { return onView(item); }, children: [_jsx(Eye, { size: 16 }), " View"] }), item.type !== "solidx" && _jsx(SolidDropdownMenuItem, { asChild: true, children: _jsxs("a", { href: editUrlFor(item), target: "_blank", rel: "noopener noreferrer", children: [_jsx(Pencil, { size: 16 }), " Edit"] }) }), _jsxs(SolidDropdownMenuItem, { className: "agent-editor__resource-delete", onSelect: function () { return onRemove(item.id); }, children: [_jsx(Trash2, { size: 16 }), " Delete"] })] })] }) : _jsx("button", { type: "button", "aria-label": "Remove ".concat((_d = (_c = item.name) !== null && _c !== void 0 ? _c : item.displayName) !== null && _d !== void 0 ? _d : item.key), onClick: function () { return onRemove(item.id); }, children: _jsx(Trash2, { size: 16 }) })] }, item.id);
|
|
335
335
|
}) }) : _jsxs("div", { className: "agent-editor__empty", children: ["No ", label.toLowerCase(), " linked yet."] })] });
|
|
336
336
|
}
|
|
337
337
|
export function AgentRegistryEditorPage() {
|
|
@@ -777,7 +777,7 @@ export function AgentRegistryEditorPage() {
|
|
|
777
777
|
setSecretEnvVarError("Use a valid environment variable name (letters, numbers, and underscores; it cannot start with a number).");
|
|
778
778
|
return;
|
|
779
779
|
}
|
|
780
|
-
if (["APP_ENCRYPTION_KEY", "DATABASE_URL", "
|
|
780
|
+
if (["APP_ENCRYPTION_KEY", "DATABASE_URL", "AGENT_HUB_MANAGER_INTERNAL_TOKEN", "AGENT_HUB_BRIDGE_PROCESS_KEY"].includes(value)) {
|
|
781
781
|
setSecretEnvVarError("This environment variable name is reserved by AgentHub.");
|
|
782
782
|
return;
|
|
783
783
|
}
|