@adminforth/agent 1.27.1 → 1.27.2

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 CHANGED
@@ -38,5 +38,5 @@ custom/skills/fetch_data/SKILL.md
38
38
  custom/skills/mutate_data/
39
39
  custom/skills/mutate_data/SKILL.md
40
40
 
41
- sent 208,061 bytes received 562 bytes 417,246.00 bytes/sec
42
- total size is 205,781 speedup is 0.99
41
+ sent 208,293 bytes received 562 bytes 417,710.00 bytes/sec
42
+ total size is 206,013 speedup is 0.99
@@ -118,6 +118,10 @@ export const useAgentStore = defineStore('agent', () => {
118
118
  if (coreStore.isMobile) {
119
119
  setChatWidth(window.innerWidth);
120
120
  }
121
+ const ativeModeNameFromLocalStorage = getLocalStorageItem('activeModeName');
122
+ if (ativeModeNameFromLocalStorage) {
123
+ setActiveMode(ativeModeNameFromLocalStorage);
124
+ }
121
125
  appRoot.value = document.getElementById('app');
122
126
  header.value = document.getElementById('af-header-nav');
123
127
  if (appRoot.value && header.value) {
@@ -183,7 +187,7 @@ export const useAgentStore = defineStore('agent', () => {
183
187
  if (!availableModes.value.some((mode: AgentMode) => mode.name === modeName)) {
184
188
  return;
185
189
  }
186
-
190
+ setLocalStorageItem('activeModeName', modeName);
187
191
  activeModeName.value = modeName;
188
192
  }
189
193
 
@@ -118,6 +118,10 @@ export const useAgentStore = defineStore('agent', () => {
118
118
  if (coreStore.isMobile) {
119
119
  setChatWidth(window.innerWidth);
120
120
  }
121
+ const ativeModeNameFromLocalStorage = getLocalStorageItem('activeModeName');
122
+ if (ativeModeNameFromLocalStorage) {
123
+ setActiveMode(ativeModeNameFromLocalStorage);
124
+ }
121
125
  appRoot.value = document.getElementById('app');
122
126
  header.value = document.getElementById('af-header-nav');
123
127
  if (appRoot.value && header.value) {
@@ -183,7 +187,7 @@ export const useAgentStore = defineStore('agent', () => {
183
187
  if (!availableModes.value.some((mode: AgentMode) => mode.name === modeName)) {
184
188
  return;
185
189
  }
186
-
190
+ setLocalStorageItem('activeModeName', modeName);
187
191
  activeModeName.value = modeName;
188
192
  }
189
193
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/agent",
3
- "version": "1.27.1",
3
+ "version": "1.27.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",