@adminforth/agent 1.18.3 → 1.18.5
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/build.log +2 -2
- package/custom/ChatSurface.vue +5 -3
- package/custom/Message.vue +6 -1
- package/custom/SessionsHistory.vue +0 -1
- package/custom/composables/useAgentStore.ts +11 -0
- package/dist/custom/ChatSurface.vue +5 -3
- package/dist/custom/Message.vue +6 -1
- package/dist/custom/SessionsHistory.vue +0 -1
- package/dist/custom/composables/useAgentStore.ts +11 -0
- package/package.json +1 -1
package/build.log
CHANGED
|
@@ -32,5 +32,5 @@ custom/skills/fetch_data/SKILL.md
|
|
|
32
32
|
custom/skills/mutate_data/
|
|
33
33
|
custom/skills/mutate_data/SKILL.md
|
|
34
34
|
|
|
35
|
-
sent 187,
|
|
36
|
-
total size is 185,
|
|
35
|
+
sent 187,489 bytes received 447 bytes 375,872.00 bytes/sec
|
|
36
|
+
total size is 185,645 speedup is 0.99
|
package/custom/ChatSurface.vue
CHANGED
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
>
|
|
37
37
|
<div
|
|
38
38
|
class="flex items-center justify-between h-14 border-b border-gray-200 dark:border-gray-700"
|
|
39
|
-
:class="{ 'pl-4': agentStore.isFullScreen }"
|
|
40
39
|
>
|
|
41
40
|
<div
|
|
42
41
|
class="flex items-center"
|
|
@@ -248,8 +247,11 @@ onMounted(async () => {
|
|
|
248
247
|
agentStore.regisrerTextInput(textInput.value);
|
|
249
248
|
textInput.value?.focus();
|
|
250
249
|
const isTeleportedToBodyFromLocalStorage = agentStore.getLocalStorageItem('isTeleportedToBody') === 'true';
|
|
251
|
-
|
|
252
|
-
|
|
250
|
+
if( coreStore.isMobile ) {
|
|
251
|
+
agentStore.setIsTeleportedToBody(false);
|
|
252
|
+
} else {
|
|
253
|
+
agentStore.setIsTeleportedToBody(isTeleportedToBodyFromLocalStorage || props.meta.stickByDefault);
|
|
254
|
+
}
|
|
253
255
|
await agentStore.fetchSessionsList();
|
|
254
256
|
});
|
|
255
257
|
|
package/custom/Message.vue
CHANGED
|
@@ -58,10 +58,13 @@
|
|
|
58
58
|
import { useRouter } from 'vue-router';
|
|
59
59
|
import { IconAngleDownOutline } from '@iconify-prerendered/vue-flowbite';
|
|
60
60
|
import { useAgentStore } from './composables/useAgentStore';
|
|
61
|
+
import { useCoreStore } from '@/stores/core';
|
|
62
|
+
|
|
61
63
|
const IncremarkContent = defineAsyncComponent(() => import('@incremark/vue').then(module => module.IncremarkContent))
|
|
62
64
|
const ShikiCodeBlock = defineAsyncComponent(() => import('./incremark_code_renderers/IncremarkShikiCodeBlock.vue'))
|
|
63
65
|
|
|
64
66
|
const agentStore = useAgentStore();
|
|
67
|
+
const coreStore = useCoreStore();
|
|
65
68
|
|
|
66
69
|
const incremarkComponents = {
|
|
67
70
|
code: ShikiCodeBlock,
|
|
@@ -134,8 +137,10 @@
|
|
|
134
137
|
|
|
135
138
|
const internalRoute = resolveInternalRoute(href);
|
|
136
139
|
if (internalRoute !== null) {
|
|
137
|
-
if (agentStore.isFullScreen) {
|
|
140
|
+
if (agentStore.isFullScreen && !coreStore.isMobile) {
|
|
138
141
|
agentStore.setFullScreen(false);
|
|
142
|
+
} else if (coreStore.isMobile) {
|
|
143
|
+
agentStore.setIsChatOpen(false);
|
|
139
144
|
}
|
|
140
145
|
void router.push(internalRoute);
|
|
141
146
|
return;
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
:class="{
|
|
34
34
|
'bg-lightPrimary/20 hover:bg-lightPrimary/20 dark:bg-darkPrimary/20 dark:hover:bg-darkPrimary/20': agentStore.activeSessionId === session.sessionId,
|
|
35
35
|
'cursor-default opacity-50 pointer-events-none': agentStore.isResponseInProgress,
|
|
36
|
-
'pl-8': agentStore.isFullScreen
|
|
37
36
|
}"
|
|
38
37
|
@click="agentStore.setActiveSession(session.sessionId); agentStore.setSessionHistoryOpen(false);"
|
|
39
38
|
:disabled="agentStore.isResponseInProgress"
|
|
@@ -129,12 +129,14 @@ export const useAgentStore = defineStore('agent', () => {
|
|
|
129
129
|
function setFullScreen(fullScreen: boolean) {
|
|
130
130
|
isFullScreen.value = fullScreen;
|
|
131
131
|
if (fullScreen) {
|
|
132
|
+
document.body.style.overflow = 'hidden';
|
|
132
133
|
setLocalStorageItem('chatWidthBeforeFullScreen', chatWidth.value.toString());
|
|
133
134
|
setLocalStorageItem('isTeleportedToBodyBeforeFullScreen', isTeleportedToBody.value ? 'true' : 'false');
|
|
134
135
|
setIsTeleportedToBody(false);
|
|
135
136
|
useAgentTransitions().setChatSurfaceTransition(false);
|
|
136
137
|
setChatWidth(window.innerWidth, false);
|
|
137
138
|
} else {
|
|
139
|
+
document.body.style.overflow = '';
|
|
138
140
|
const lastChatWidth = parseInt(getLocalStorageItem('chatWidthBeforeFullScreen') || DEFAULT_CHAT_WIDTH.toString(), 10);
|
|
139
141
|
const isTeleportedBeforeFullScreen = getLocalStorageItem('isTeleportedToBodyBeforeFullScreen') === 'true';
|
|
140
142
|
agentTransitions.setAppRootTransition(true);
|
|
@@ -315,6 +317,9 @@ export const useAgentStore = defineStore('agent', () => {
|
|
|
315
317
|
}
|
|
316
318
|
|
|
317
319
|
function closeChat() {
|
|
320
|
+
if(isFullScreen.value) {
|
|
321
|
+
document.body.style.overflow = '';
|
|
322
|
+
}
|
|
318
323
|
if (blockCloseOfChat.value) {
|
|
319
324
|
return;
|
|
320
325
|
}
|
|
@@ -323,6 +328,12 @@ export const useAgentStore = defineStore('agent', () => {
|
|
|
323
328
|
}
|
|
324
329
|
|
|
325
330
|
function openChat() {
|
|
331
|
+
if (isFullScreen.value) {
|
|
332
|
+
document.body.style.overflow = 'hidden';
|
|
333
|
+
}
|
|
334
|
+
if (coreStore.isMobile) {
|
|
335
|
+
setFullScreen(true);
|
|
336
|
+
}
|
|
326
337
|
isChatOpen.value = true;
|
|
327
338
|
nextTick(() => {
|
|
328
339
|
focusTextInput();
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
>
|
|
37
37
|
<div
|
|
38
38
|
class="flex items-center justify-between h-14 border-b border-gray-200 dark:border-gray-700"
|
|
39
|
-
:class="{ 'pl-4': agentStore.isFullScreen }"
|
|
40
39
|
>
|
|
41
40
|
<div
|
|
42
41
|
class="flex items-center"
|
|
@@ -248,8 +247,11 @@ onMounted(async () => {
|
|
|
248
247
|
agentStore.regisrerTextInput(textInput.value);
|
|
249
248
|
textInput.value?.focus();
|
|
250
249
|
const isTeleportedToBodyFromLocalStorage = agentStore.getLocalStorageItem('isTeleportedToBody') === 'true';
|
|
251
|
-
|
|
252
|
-
|
|
250
|
+
if( coreStore.isMobile ) {
|
|
251
|
+
agentStore.setIsTeleportedToBody(false);
|
|
252
|
+
} else {
|
|
253
|
+
agentStore.setIsTeleportedToBody(isTeleportedToBodyFromLocalStorage || props.meta.stickByDefault);
|
|
254
|
+
}
|
|
253
255
|
await agentStore.fetchSessionsList();
|
|
254
256
|
});
|
|
255
257
|
|
package/dist/custom/Message.vue
CHANGED
|
@@ -58,10 +58,13 @@
|
|
|
58
58
|
import { useRouter } from 'vue-router';
|
|
59
59
|
import { IconAngleDownOutline } from '@iconify-prerendered/vue-flowbite';
|
|
60
60
|
import { useAgentStore } from './composables/useAgentStore';
|
|
61
|
+
import { useCoreStore } from '@/stores/core';
|
|
62
|
+
|
|
61
63
|
const IncremarkContent = defineAsyncComponent(() => import('@incremark/vue').then(module => module.IncremarkContent))
|
|
62
64
|
const ShikiCodeBlock = defineAsyncComponent(() => import('./incremark_code_renderers/IncremarkShikiCodeBlock.vue'))
|
|
63
65
|
|
|
64
66
|
const agentStore = useAgentStore();
|
|
67
|
+
const coreStore = useCoreStore();
|
|
65
68
|
|
|
66
69
|
const incremarkComponents = {
|
|
67
70
|
code: ShikiCodeBlock,
|
|
@@ -134,8 +137,10 @@
|
|
|
134
137
|
|
|
135
138
|
const internalRoute = resolveInternalRoute(href);
|
|
136
139
|
if (internalRoute !== null) {
|
|
137
|
-
if (agentStore.isFullScreen) {
|
|
140
|
+
if (agentStore.isFullScreen && !coreStore.isMobile) {
|
|
138
141
|
agentStore.setFullScreen(false);
|
|
142
|
+
} else if (coreStore.isMobile) {
|
|
143
|
+
agentStore.setIsChatOpen(false);
|
|
139
144
|
}
|
|
140
145
|
void router.push(internalRoute);
|
|
141
146
|
return;
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
:class="{
|
|
34
34
|
'bg-lightPrimary/20 hover:bg-lightPrimary/20 dark:bg-darkPrimary/20 dark:hover:bg-darkPrimary/20': agentStore.activeSessionId === session.sessionId,
|
|
35
35
|
'cursor-default opacity-50 pointer-events-none': agentStore.isResponseInProgress,
|
|
36
|
-
'pl-8': agentStore.isFullScreen
|
|
37
36
|
}"
|
|
38
37
|
@click="agentStore.setActiveSession(session.sessionId); agentStore.setSessionHistoryOpen(false);"
|
|
39
38
|
:disabled="agentStore.isResponseInProgress"
|
|
@@ -129,12 +129,14 @@ export const useAgentStore = defineStore('agent', () => {
|
|
|
129
129
|
function setFullScreen(fullScreen: boolean) {
|
|
130
130
|
isFullScreen.value = fullScreen;
|
|
131
131
|
if (fullScreen) {
|
|
132
|
+
document.body.style.overflow = 'hidden';
|
|
132
133
|
setLocalStorageItem('chatWidthBeforeFullScreen', chatWidth.value.toString());
|
|
133
134
|
setLocalStorageItem('isTeleportedToBodyBeforeFullScreen', isTeleportedToBody.value ? 'true' : 'false');
|
|
134
135
|
setIsTeleportedToBody(false);
|
|
135
136
|
useAgentTransitions().setChatSurfaceTransition(false);
|
|
136
137
|
setChatWidth(window.innerWidth, false);
|
|
137
138
|
} else {
|
|
139
|
+
document.body.style.overflow = '';
|
|
138
140
|
const lastChatWidth = parseInt(getLocalStorageItem('chatWidthBeforeFullScreen') || DEFAULT_CHAT_WIDTH.toString(), 10);
|
|
139
141
|
const isTeleportedBeforeFullScreen = getLocalStorageItem('isTeleportedToBodyBeforeFullScreen') === 'true';
|
|
140
142
|
agentTransitions.setAppRootTransition(true);
|
|
@@ -315,6 +317,9 @@ export const useAgentStore = defineStore('agent', () => {
|
|
|
315
317
|
}
|
|
316
318
|
|
|
317
319
|
function closeChat() {
|
|
320
|
+
if(isFullScreen.value) {
|
|
321
|
+
document.body.style.overflow = '';
|
|
322
|
+
}
|
|
318
323
|
if (blockCloseOfChat.value) {
|
|
319
324
|
return;
|
|
320
325
|
}
|
|
@@ -323,6 +328,12 @@ export const useAgentStore = defineStore('agent', () => {
|
|
|
323
328
|
}
|
|
324
329
|
|
|
325
330
|
function openChat() {
|
|
331
|
+
if (isFullScreen.value) {
|
|
332
|
+
document.body.style.overflow = 'hidden';
|
|
333
|
+
}
|
|
334
|
+
if (coreStore.isMobile) {
|
|
335
|
+
setFullScreen(true);
|
|
336
|
+
}
|
|
326
337
|
isChatOpen.value = true;
|
|
327
338
|
nextTick(() => {
|
|
328
339
|
focusTextInput();
|