@meistrari/chat-nuxt 4.5.1-rc.4 → 4.5.1-rc.6

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
3
  "configKey": "chatNuxt",
4
- "version": "4.5.1-rc.4",
4
+ "version": "4.5.1-rc.6",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -14,6 +14,7 @@ const props = defineProps({
14
14
  const {
15
15
  conversationSearch,
16
16
  hasConversationContent,
17
+ showGroupCreationPrompt,
17
18
  shouldShowSkeleton,
18
19
  emptyConversationMessage,
19
20
  skeletonRows,
@@ -100,7 +101,7 @@ function handleToggleGroup(groupId) {
100
101
  onBeforeUnmount(stopFolderAnimation);
101
102
  const rows = computed(() => {
102
103
  const result = [];
103
- if (groupItems.value.length > 0)
104
+ if (groupItems.value.length > 0 || showGroupCreationPrompt.value)
104
105
  result.push({ type: "folders", key: "folders", height: HEADING_HEIGHT, groupId: null });
105
106
  for (const groupBucket of groupItems.value) {
106
107
  const groupId = groupBucket.group.id;
@@ -1,4 +1,6 @@
1
1
  import type { H3Event } from 'h3';
2
+ export declare function isEdgeHeader(name: string): boolean;
3
+ export declare const fetchWithoutEdgeHeaders: typeof fetch;
2
4
  export type ChatApiVersion = 'v1' | 'v2';
3
5
  export declare function resolveChatBasePath(basePath: string, apiVersion: ChatApiVersion): string;
4
6
  export declare function mapVaultProxyPath(path: string): string;
@@ -9,6 +9,26 @@ const CHAT_COMPAT_HEADERS = [
9
9
  "x-chat-tela-agent-branch",
10
10
  "x-chat-conversation-scope"
11
11
  ];
12
+ const EDGE_HEADER_PREFIXES = ["cf-", "x-forwarded-", "x-railway-", "x-envoy-"];
13
+ const EDGE_HEADERS = /* @__PURE__ */ new Set([
14
+ "cdn-loop",
15
+ "forwarded",
16
+ "true-client-ip",
17
+ "x-real-ip"
18
+ ]);
19
+ export function isEdgeHeader(name) {
20
+ const lowerName = name.toLowerCase();
21
+ return EDGE_HEADERS.has(lowerName) || EDGE_HEADER_PREFIXES.some((prefix) => lowerName.startsWith(prefix));
22
+ }
23
+ export const fetchWithoutEdgeHeaders = (input, init) => {
24
+ const headers = new Headers(init?.headers);
25
+ for (const name of [...headers.keys()]) {
26
+ if (isEdgeHeader(name)) {
27
+ headers.delete(name);
28
+ }
29
+ }
30
+ return fetch(input, { ...init, headers });
31
+ };
12
32
  function normalizeProxyPath(path) {
13
33
  const segments = path.split("/").map((segment) => segment.trim()).filter(Boolean);
14
34
  for (const segment of segments) {
@@ -162,6 +182,7 @@ export async function proxyChatApiRequest(event, targetPath, options = {}) {
162
182
  const headers = buildProxyHeaders(event);
163
183
  try {
164
184
  return await proxyRequest(event, targetUrl, {
185
+ fetch: fetchWithoutEdgeHeaders,
165
186
  fetchOptions: {
166
187
  redirect: "manual"
167
188
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
- "version": "4.5.1-rc.4",
3
+ "version": "4.5.1-rc.6",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {