@adminforth/agent 1.26.3 → 1.26.4

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 206,143 bytes received 562 bytes 413,410.00 bytes/sec
42
- total size is 203,829 speedup is 0.99
41
+ sent 207,056 bytes received 546 bytes 415,204.00 bytes/sec
42
+ total size is 204,758 speedup is 0.99
@@ -106,13 +106,13 @@
106
106
  transition: `transform ${agentTransitions.TRANSITION_DURATION}ms ease-in-out`
107
107
  }"
108
108
  >
109
- <div class="w-full border rounded-lg pb-8">
109
+ <div class="w-full border rounded-lg pb-8 dark:bg-gray-700">
110
110
  <textarea
111
111
  v-model="agentStore.userMessageInput"
112
112
  ref="textInput"
113
113
  @input="autoResize"
114
114
  :class="[
115
- 'min-h-12 px-4 pt-4 w-full resize-none overflow-hidden text-lightInputText dark:text-darkInputText rounded-md bg-transparent text-sm bg-gray-50 dark:bg-gray-700 dark:border-gray-600 focus:outline-none',
115
+ 'min-h-12 px-4 pt-4 rounded-xl w-full resize-none overflow-hidden text-lightInputText dark:text-darkInputText rounded-md bg-transparent text-sm bg-gray-50 dark:bg-gray-700 dark:border-gray-600 focus:outline-none',
116
116
  ]"
117
117
  :placeholder="agentStore.userMessagePlaceholder"
118
118
  @keydown.enter.exact.prevent="sendMessage"
@@ -91,6 +91,23 @@ const showScrollContainer = ref(true);
91
91
  const chatContainerRef = ref<HTMLElement | null>(null);
92
92
 
93
93
  const messagesRefs = ref<Array<HTMLElement | null>>([]);
94
+
95
+
96
+ /*
97
+ * Whenever user sends a message, it adds a bottom spacer, that takes the remaining height
98
+ * without last user and last agent message.
99
+ *
100
+ * On send message, happens the following logic:
101
+ * 1) showBottomSpacer is set to true
102
+ * 2) useWaitingForHeight is set to true and in 1000s set back to false
103
+ * Why do we do this?
104
+ * - When we want to read height of last user message, incremark shows text with some small delay
105
+ * - so when we read height of last user message, we actully getting height of the box without text ~18px
106
+ * - so for the initial period while useWaitingForHeight is true, we are waiting for real height to be bigger than 18px
107
+ * - and then we can read in normally, until new message is sent, then we need to wait again
108
+ * 3) updateSpacerHeight is called, which calculates the height for spacer based on scroll container height and messages height
109
+ * 4) Spacer moves text up
110
+ */
94
111
  const showBottomSpacer = ref(false);
95
112
  const spacerHeight = ref(0);
96
113
  const MASK_HEIGHT = 20;
@@ -106,13 +106,13 @@
106
106
  transition: `transform ${agentTransitions.TRANSITION_DURATION}ms ease-in-out`
107
107
  }"
108
108
  >
109
- <div class="w-full border rounded-lg pb-8">
109
+ <div class="w-full border rounded-lg pb-8 dark:bg-gray-700">
110
110
  <textarea
111
111
  v-model="agentStore.userMessageInput"
112
112
  ref="textInput"
113
113
  @input="autoResize"
114
114
  :class="[
115
- 'min-h-12 px-4 pt-4 w-full resize-none overflow-hidden text-lightInputText dark:text-darkInputText rounded-md bg-transparent text-sm bg-gray-50 dark:bg-gray-700 dark:border-gray-600 focus:outline-none',
115
+ 'min-h-12 px-4 pt-4 rounded-xl w-full resize-none overflow-hidden text-lightInputText dark:text-darkInputText rounded-md bg-transparent text-sm bg-gray-50 dark:bg-gray-700 dark:border-gray-600 focus:outline-none',
116
116
  ]"
117
117
  :placeholder="agentStore.userMessagePlaceholder"
118
118
  @keydown.enter.exact.prevent="sendMessage"
@@ -91,6 +91,23 @@ const showScrollContainer = ref(true);
91
91
  const chatContainerRef = ref<HTMLElement | null>(null);
92
92
 
93
93
  const messagesRefs = ref<Array<HTMLElement | null>>([]);
94
+
95
+
96
+ /*
97
+ * Whenever user sends a message, it adds a bottom spacer, that takes the remaining height
98
+ * without last user and last agent message.
99
+ *
100
+ * On send message, happens the following logic:
101
+ * 1) showBottomSpacer is set to true
102
+ * 2) useWaitingForHeight is set to true and in 1000s set back to false
103
+ * Why do we do this?
104
+ * - When we want to read height of last user message, incremark shows text with some small delay
105
+ * - so when we read height of last user message, we actully getting height of the box without text ~18px
106
+ * - so for the initial period while useWaitingForHeight is true, we are waiting for real height to be bigger than 18px
107
+ * - and then we can read in normally, until new message is sent, then we need to wait again
108
+ * 3) updateSpacerHeight is called, which calculates the height for spacer based on scroll container height and messages height
109
+ * 4) Spacer moves text up
110
+ */
94
111
  const showBottomSpacer = ref(false);
95
112
  const spacerHeight = ref(0);
96
113
  const MASK_HEIGHT = 20;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/agent",
3
- "version": "1.26.3",
3
+ "version": "1.26.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",