Skip to content

Commit eb317e9

Browse files
authored
security: Update nanoid to 3.3.8 (#896)
* Update nanoid to 3.3.8 * Update nanoid to 3.3.8 * Fix assistants_web build * Resolve frontend build errors
1 parent cf12000 commit eb317e9

File tree

13 files changed

+5444
-7953
lines changed

13 files changed

+5444
-7953
lines changed

src/interfaces/assistants_web/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
5+
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.

src/interfaces/assistants_web/package-lock.json

Lines changed: 5416 additions & 7919 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/interfaces/assistants_web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"lodash": "^4.17.21",
5353
"match-sorter": "^6.3.1",
5454
"mdast-util-to-string": "^4.0.0",
55+
"nanoid": "^3.3.8",
5556
"next": "^14.2.12",
5657
"next-client-cookies": "^1.1.1",
5758
"next-runtime-env": "^3.2.2",

src/interfaces/assistants_web/src/components/Conversation/ConversationPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export const ConversationPanel: React.FC<Props> = () => {
141141
/> */}
142142
</div>
143143
<Transition
144-
show={!disabledAssistantKnowledge.includes(agentId) ?? false}
144+
show={!disabledAssistantKnowledge.includes(agentId)}
145145
enter="duration-300 ease-in-out transition-all"
146146
enterFrom="opacity-0 scale-90"
147147
enterTo="opacity-100 scale-100"

src/interfaces/assistants_web/src/components/Markdown/tags/Anchor.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
'use client';
22

3-
import type { Component, ExtraProps } from 'hast-util-to-jsx-runtime/lib/components';
4-
import { ComponentPropsWithoutRef } from 'react';
3+
import { ComponentPropsWithoutRef, FC } from 'react';
4+
import { ExtraProps } from 'react-markdown';
55

66
import { Icon } from '@/components/UI';
77
import { useOutputFiles } from '@/stores';
88

9-
export const Anchor: Component<ComponentPropsWithoutRef<'a'> & ExtraProps> = ({
10-
children,
11-
node,
12-
}) => {
9+
export const Anchor: FC<ComponentPropsWithoutRef<'a'> & ExtraProps> = ({ children, node }) => {
1310
const { outputFiles } = useOutputFiles();
1411
const nodeHref = node?.properties.href;
1512

src/interfaces/assistants_web/src/components/Markdown/tags/Iframe.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
'use client';
22

33
import { Tab, TabGroup, TabList, TabPanel, TabPanels } from '@headlessui/react';
4-
import type { Component } from 'hast-util-to-jsx-runtime/lib/components';
5-
import { Fragment, useEffect } from 'react';
6-
import { useRef } from 'react';
7-
import { useState } from 'react';
8-
import { ComponentPropsWithoutRef } from 'react';
4+
import { ComponentPropsWithoutRef, FC, Fragment, useEffect, useRef, useState } from 'react';
95

106
import { CodeSnippet, Text } from '@/components/UI';
117
import { cleanupCodeBlock, cn } from '@/utils';
@@ -19,9 +15,7 @@ const MIN_HEIGHT = 600;
1915
* When the iframe is loaded, the `data-src` attribute is replaced with the actual source URL.
2016
* The height of the iframe is adjusted to fit the content.
2117
*/
22-
export const Iframe: Component<ComponentPropsWithoutRef<'iframe'> & { 'data-src': string }> = (
23-
props
24-
) => {
18+
export const Iframe: FC<ComponentPropsWithoutRef<'iframe'> & { 'data-src': string }> = (props) => {
2519
const iframeRef = useRef<HTMLIFrameElement>(null);
2620
const [code, setCode] = useState('');
2721
const [codePreview, setCodePreview] = useState('');
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use client';
22

3-
import type { Component, ExtraProps } from 'hast-util-to-jsx-runtime/lib/components';
4-
import { ComponentPropsWithoutRef } from 'react';
3+
import { ComponentPropsWithoutRef, FC } from 'react';
4+
import { ExtraProps } from 'react-markdown';
55

6-
export const P: Component<ComponentPropsWithoutRef<'p'> & ExtraProps> = ({ children }) => {
6+
export const P: FC<ComponentPropsWithoutRef<'p'> & ExtraProps> = ({ children }) => {
77
return <p dir="auto">{children}</p>;
88
};

src/interfaces/assistants_web/src/components/Markdown/tags/Pre.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use client';
22

3-
import type { Component, ExtraProps } from 'hast-util-to-jsx-runtime/lib/components';
4-
import { ComponentPropsWithoutRef, useRef, useState } from 'react';
3+
import { ComponentPropsWithoutRef, FC, useRef, useState } from 'react';
4+
import { ExtraProps } from 'react-markdown';
55

66
import { Button, Icon, Text } from '@/components/UI';
77

8-
export const Pre: Component<ComponentPropsWithoutRef<'pre'> & ExtraProps> = ({ children }) => {
8+
export const Pre: FC<ComponentPropsWithoutRef<'pre'> & ExtraProps> = ({ children }) => {
99
const [copied, setCopied] = useState(false);
1010
const ref = useRef<HTMLDivElement>(null);
1111

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
'use client';
22

3-
import type { Component, ExtraProps } from 'hast-util-to-jsx-runtime/lib/components';
4-
import { ComponentPropsWithoutRef } from 'react';
3+
import { ComponentPropsWithoutRef, FC } from 'react';
4+
import { ExtraProps } from 'react-markdown';
55

66
import { Text } from '@/components/UI';
77

88
// Since we're inserting a Text component
99
// And that we're not specifyng the "as" prop
1010
// And that the default of Text is "p" styling
1111
// We get the props of p
12-
export const References: Component<ComponentPropsWithoutRef<'p'> & ExtraProps> = ({ children }) => {
12+
export const References: FC<ComponentPropsWithoutRef<'p'> & ExtraProps> = ({ children }) => {
1313
return <Text>From {children}</Text>;
1414
};

src/interfaces/assistants_web/src/components/MessageRow/DataTable.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client';
22

3-
import type { Component, ExtraProps } from 'hast-util-to-jsx-runtime/lib/components';
4-
import { ComponentPropsWithoutRef, useCallback } from 'react';
3+
import { ComponentPropsWithoutRef, FC, useCallback } from 'react';
4+
import { ExtraProps } from 'react-markdown';
55

66
import { StructuredTable } from '@/components/Markdown/directives/table-tools';
77
import { Icon, Text } from '@/components/UI';
@@ -26,7 +26,7 @@ type ElementProps = {
2626
* How to test: Every Markdown table gets converted to a DataTable. In the chat app, try the following query:
2727
* "Create a table with 2 columns: (1) Cuisine; (2) One popular dish from that cuisine"
2828
*/
29-
export const DataTable: Component<ComponentPropsWithoutRef<'table'> & ExtraProps> = ({
29+
export const DataTable: FC<ComponentPropsWithoutRef<'table'> & ExtraProps> = ({
3030
children,
3131
node,
3232
}) => {

0 commit comments

Comments
 (0)