@lobehub/ui 1.50.1 → 1.52.0

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.
@@ -2,7 +2,7 @@
2
2
  import { LucideIcon } from 'lucide-react';
3
3
  import { type TooltipProps } from "../Tooltip";
4
4
  import { DivProps } from "../types";
5
- export declare type ActionIconSize = 'large' | 'normal' | 'small' | 'site' | {
5
+ export type ActionIconSize = 'large' | 'normal' | 'small' | 'site' | {
6
6
  blockSize?: number;
7
7
  borderRadius?: number;
8
8
  fontSize?: number;
@@ -1,5 +1,5 @@
1
1
  import { ChatMessage, ChatMessageError, MessageRoleType } from '../types';
2
- export declare type MessageDispatch = {
2
+ export type MessageDispatch = {
3
3
  message: ChatMessage;
4
4
  type: 'addMessage';
5
5
  } | {
@@ -29,6 +29,6 @@ interface ChatAction {
29
29
  */
30
30
  sendMessage: () => Promise<void>;
31
31
  }
32
- export declare type ChatStore = ChatAction & ChatState;
32
+ export type ChatStore = ChatAction & ChatState;
33
33
  export declare const createStore: StateCreator<ChatStore, [['zustand/devtools', never]]>;
34
34
  export {};
@@ -1,5 +1,5 @@
1
- export declare type InternalChatContext = Omit<ChatContext, 'id'>;
2
- export declare type MessageRoleType = 'user' | 'system' | 'assistant';
1
+ export type InternalChatContext = Omit<ChatContext, 'id'>;
2
+ export type MessageRoleType = 'user' | 'system' | 'assistant' | 'function';
3
3
  /**
4
4
  * 聊天消息错误对象
5
5
  */
@@ -65,7 +65,7 @@ export interface ChatContext {
65
65
  title?: string;
66
66
  updateAt: number;
67
67
  }
68
- export declare type ChatContextMap = Record<string, Omit<ChatContext, 'systemRole'>>;
68
+ export type ChatContextMap = Record<string, Omit<ChatContext, 'systemRole'>>;
69
69
  /**
70
70
  * 请求数据类型
71
71
  */
@@ -33,7 +33,7 @@ export interface ChatItemProps {
33
33
  /**
34
34
  * @description The message content of the chat item
35
35
  */
36
- message?: string;
36
+ message?: ReactNode;
37
37
  messageExtra?: ReactNode;
38
38
  /**
39
39
  * @description Callback when the message content changes
@@ -54,6 +54,7 @@ export interface ChatItemProps {
54
54
  * @description Whether the chat item is primary
55
55
  */
56
56
  primary?: boolean;
57
+ renderMessage?: (content: ReactNode) => ReactNode;
57
58
  /**
58
59
  * @description Whether to show the title of the chat item
59
60
  */
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["actions", "className", "primary", "borderSpacing", "loading", "message", "placement", "type", "avatar", "alert", "showTitle", "time", "editing", "onChange", "onEditingChange", "messageExtra"];
3
+ var _excluded = ["actions", "className", "primary", "borderSpacing", "loading", "message", "placement", "type", "avatar", "alert", "showTitle", "time", "editing", "onChange", "onEditingChange", "messageExtra", "renderMessage"];
4
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
  import { Alert } from 'antd';
@@ -34,6 +34,7 @@ var ChatItem = /*#__PURE__*/memo(function (_ref) {
34
34
  onChange = _ref.onChange,
35
35
  onEditingChange = _ref.onEditingChange,
36
36
  messageExtra = _ref.messageExtra,
37
+ renderMessage = _ref.renderMessage,
37
38
  properties = _objectWithoutProperties(_ref, _excluded);
38
39
  var _useStyles = useStyles({
39
40
  avatarSize: AVATAR_SIZE,
@@ -45,6 +46,17 @@ var ChatItem = /*#__PURE__*/memo(function (_ref) {
45
46
  }),
46
47
  cx = _useStyles.cx,
47
48
  styles = _useStyles.styles;
49
+ var content = /*#__PURE__*/_jsx(EditableMessage, {
50
+ classNames: {
51
+ input: styles.editingInput
52
+ },
53
+ editButtonSize: 'small',
54
+ editing: editing,
55
+ onChange: onChange,
56
+ onEditingChange: onEditingChange,
57
+ value: String(message || '...')
58
+ });
59
+ var messageContent = renderMessage ? renderMessage(content) : content;
48
60
  return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
49
61
  className: cx(styles.container, className)
50
62
  }, properties), {}, {
@@ -80,16 +92,7 @@ var ChatItem = /*#__PURE__*/memo(function (_ref) {
80
92
  showIcon: true
81
93
  }, alert)) : /*#__PURE__*/_jsxs(Flexbox, {
82
94
  className: cx(styles.message, editing && styles.editingContainer),
83
- children: [/*#__PURE__*/_jsx(EditableMessage, {
84
- classNames: {
85
- input: styles.editingInput
86
- },
87
- editButtonSize: 'small',
88
- editing: editing,
89
- onChange: onChange,
90
- onEditingChange: onEditingChange,
91
- value: String(message || '...')
92
- }), messageExtra && !editing ? /*#__PURE__*/_jsx("div", {
95
+ children: [messageContent, messageExtra && !editing ? /*#__PURE__*/_jsx("div", {
93
96
  className: styles.messageExtra,
94
97
  children: messageExtra
95
98
  }) : null]
@@ -2,7 +2,8 @@ import { ReactNode } from 'react';
2
2
  import { ChatItemProps } from "../ChatItem";
3
3
  import type { DivProps } from "../types";
4
4
  import { ChatMessage } from "../types/chatMessage";
5
- declare type MessageExtra = (props: ChatMessage) => ReactNode;
5
+ export type MessageExtra = (props: ChatMessage) => ReactNode;
6
+ export type RenderMessage = (content: ReactNode, message: ChatMessage) => ReactNode;
6
7
  export interface ChatListProps extends DivProps {
7
8
  /**
8
9
  * @description Data of chat messages to be displayed
@@ -15,6 +16,7 @@ export interface ChatListProps extends DivProps {
15
16
  */
16
17
  onActionClick?: (actionKey: string, messageId: string) => void;
17
18
  onMessageChange?: (id: string, content: string) => void;
19
+ renderMessage?: RenderMessage;
18
20
  renderMessageExtra?: MessageExtra;
19
21
  /**
20
22
  * @description Whether to show name of the chat item
@@ -31,6 +33,7 @@ export interface ItemProps extends ChatMessage {
31
33
  MessageExtra?: MessageExtra;
32
34
  onActionClick?: (actionKey: string, messageId: string) => void;
33
35
  onMessageChange?: (id: string, content: string) => void;
36
+ renderMessage?: RenderMessage;
34
37
  showTitle?: boolean;
35
38
  type: 'docs' | 'chat';
36
39
  }
@@ -1,13 +1,13 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- var _excluded = ["MessageExtra", "showTitle", "onActionClick", "onMessageChange", "type"],
5
- _excluded2 = ["onActionClick", "renderMessageExtra", "className", "data", "type", "showTitle", "onMessageChange"];
4
+ var _excluded = ["MessageExtra", "showTitle", "onActionClick", "onMessageChange", "type", "renderMessage"],
5
+ _excluded2 = ["onActionClick", "renderMessageExtra", "className", "data", "type", "showTitle", "onMessageChange", "renderMessage"];
6
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
8
  import { App } from 'antd';
9
9
  import copy from 'copy-to-clipboard';
10
- import { memo, useState } from 'react';
10
+ import { memo, useCallback, useState } from 'react';
11
11
  import ChatItem from "../ChatItem";
12
12
  import ActionsBar from "./ActionsBar";
13
13
  import { useStyles } from "./style";
@@ -18,6 +18,7 @@ var Item = function Item(_ref) {
18
18
  _onActionClick = _ref.onActionClick,
19
19
  onMessageChange = _ref.onMessageChange,
20
20
  type = _ref.type,
21
+ renderMessage = _ref.renderMessage,
21
22
  item = _objectWithoutProperties(_ref, _excluded);
22
23
  var renderMessageExtra = MessageExtra ? /*#__PURE__*/_jsx(MessageExtra, _objectSpread({}, item)) : undefined;
23
24
  var _useState = useState(false),
@@ -26,6 +27,9 @@ var Item = function Item(_ref) {
26
27
  setEditing = _useState2[1];
27
28
  var _App$useApp = App.useApp(),
28
29
  message = _App$useApp.message;
30
+ var innerRenderMessage = useCallback(function (content) {
31
+ return renderMessage === null || renderMessage === void 0 ? void 0 : renderMessage(content, item);
32
+ }, [renderMessage]);
29
33
  return /*#__PURE__*/_jsx(ChatItem, {
30
34
  actions: /*#__PURE__*/_jsx(ActionsBar, {
31
35
  onActionClick: function onActionClick(actionKey) {
@@ -56,6 +60,7 @@ var Item = function Item(_ref) {
56
60
  onEditingChange: setEditing,
57
61
  placement: type === 'chat' ? item.role === 'user' ? 'right' : 'left' : 'left',
58
62
  primary: item.role === 'user',
63
+ renderMessage: renderMessage ? innerRenderMessage : undefined,
59
64
  showTitle: showTitle,
60
65
  time: item.updateAt || item.createAt,
61
66
  type: type === 'chat' ? 'block' : 'pure'
@@ -70,6 +75,7 @@ var ChatList = /*#__PURE__*/memo(function (_ref2) {
70
75
  type = _ref2$type === void 0 ? 'chat' : _ref2$type,
71
76
  showTitle = _ref2.showTitle,
72
77
  onMessageChange = _ref2.onMessageChange,
78
+ renderMessage = _ref2.renderMessage,
73
79
  props = _objectWithoutProperties(_ref2, _excluded2);
74
80
  var _useStyles = useStyles(),
75
81
  cx = _useStyles.cx,
@@ -82,6 +88,7 @@ var ChatList = /*#__PURE__*/memo(function (_ref2) {
82
88
  MessageExtra: MessageExtra,
83
89
  onActionClick: onActionClick,
84
90
  onMessageChange: onMessageChange,
91
+ renderMessage: renderMessage,
85
92
  showTitle: showTitle,
86
93
  type: type
87
94
  }, item), item.id);
@@ -17,5 +17,5 @@ export interface MenuDividerType {
17
17
  dashed?: boolean;
18
18
  type: 'divider';
19
19
  }
20
- export declare type MenuItemType = GeneralItemType | SubMenuType | MenuDividerType;
20
+ export type MenuItemType = GeneralItemType | SubMenuType | MenuDividerType;
21
21
  export {};
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { type DivProps } from "../../types";
3
- export declare type DraggablePanelBodyProps = DivProps;
3
+ export type DraggablePanelBodyProps = DivProps;
4
4
  declare const DraggablePanelBody: import("react").NamedExoticComponent<DivProps>;
5
5
  export default DraggablePanelBody;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { type DivProps } from "../../types";
3
- export declare type DraggablePanelContainerProps = DivProps;
3
+ export type DraggablePanelContainerProps = DivProps;
4
4
  declare const DraggablePanelContainer: import("react").NamedExoticComponent<DivProps>;
5
5
  export default DraggablePanelContainer;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { type DivProps } from "../../types";
3
- export declare type DraggablePanelFooterProps = DivProps;
3
+ export type DraggablePanelFooterProps = DivProps;
4
4
  declare const DraggablePanelFooter: import("react").NamedExoticComponent<DivProps>;
5
5
  export default DraggablePanelFooter;
@@ -2,7 +2,7 @@ import type { NumberSize, Size } from 're-resizable';
2
2
  import { type CSSProperties } from 'react';
3
3
  import type { Props as RndProps } from 'react-rnd';
4
4
  import { DivProps } from "../types";
5
- export declare type placementType = 'right' | 'left' | 'top' | 'bottom';
5
+ export type placementType = 'right' | 'left' | 'top' | 'bottom';
6
6
  export interface DraggablePanelProps extends DivProps {
7
7
  /**
8
8
  * @title The class name for the content and handle component
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { ControlInputProps } from "../components/ControlInput";
3
- export declare type EditableTextProps = ControlInputProps;
3
+ export type EditableTextProps = ControlInputProps;
4
4
  declare const EditableText: import("react").NamedExoticComponent<ControlInputProps>;
5
5
  export default EditableText;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { DividerProps } from 'antd';
3
- export declare type FormDividerProps = DividerProps;
3
+ export type FormDividerProps = DividerProps;
4
4
  declare const Divider: import("react").NamedExoticComponent<DividerProps>;
5
5
  export default Divider;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { DivProps } from "../../types";
3
- export declare type FormFooterProps = DivProps;
3
+ export type FormFooterProps = DivProps;
4
4
  declare const FormFooter: import("react").NamedExoticComponent<DivProps>;
5
5
  export default FormFooter;
@@ -3,6 +3,7 @@ import { type CollapseProps } from 'antd';
3
3
  import { type ReactNode } from 'react';
4
4
  export interface FormGroupProps extends CollapseProps {
5
5
  children: ReactNode;
6
+ extra?: ReactNode;
6
7
  icon?: IconProps['icon'];
7
8
  title: string;
8
9
  }
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["className", "icon", "title", "children"];
3
+ var _excluded = ["className", "icon", "title", "children", "extra"];
4
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
  import { Icon } from "../..";
@@ -14,6 +14,7 @@ var FormGroup = /*#__PURE__*/memo(function (_ref) {
14
14
  icon = _ref.icon,
15
15
  title = _ref.title,
16
16
  children = _ref.children,
17
+ extra = _ref.extra,
17
18
  props = _objectWithoutProperties(_ref, _excluded);
18
19
  var _useStyles = useStyles(),
19
20
  cx = _useStyles.cx,
@@ -23,6 +24,7 @@ var FormGroup = /*#__PURE__*/memo(function (_ref) {
23
24
  defaultActiveKey: [1],
24
25
  items: [{
25
26
  children: children,
27
+ extra: extra,
26
28
  key: 1,
27
29
  label: /*#__PURE__*/_jsxs("div", {
28
30
  className: styles.title,
@@ -4,6 +4,7 @@ import { type ReactNode } from 'react';
4
4
  import { FormItemProps } from './components/FormItem';
5
5
  export interface ItemGroup {
6
6
  children: FormItemProps[];
7
+ extra?: ReactNode;
7
8
  icon?: LucideIcon;
8
9
  title: string;
9
10
  }
package/es/Form/index.js CHANGED
@@ -29,6 +29,7 @@ var Form = /*#__PURE__*/forwardRef(function (_ref, ref) {
29
29
  }, props), {}, {
30
30
  children: [items === null || items === void 0 ? void 0 : items.map(function (group, groupIndex) {
31
31
  return /*#__PURE__*/_jsx(FormGroup, {
32
+ extra: group === null || group === void 0 ? void 0 : group.extra,
32
33
  icon: group === null || group === void 0 ? void 0 : group.icon,
33
34
  title: group.title,
34
35
  children: group.children.filter(function (item) {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { type ButtonProps } from 'antd';
3
- export declare type GradientButtonProps = ButtonProps;
3
+ export type GradientButtonProps = ButtonProps;
4
4
  declare const GradientButton: import("react").NamedExoticComponent<ButtonProps>;
5
5
  export default GradientButton;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { LucideIcon } from 'lucide-react';
3
3
  import { DivProps } from "../types";
4
- export declare type IconSize = 'large' | 'normal' | 'small' | {
4
+ export type IconSize = 'large' | 'normal' | 'small' | {
5
5
  fontSize?: number;
6
6
  strokeWidth?: number;
7
7
  };
@@ -4,7 +4,7 @@ export interface LayoutHeaderProps extends DivProps {
4
4
  headerHeight?: number;
5
5
  }
6
6
  export declare const LayoutHeader: import("react").NamedExoticComponent<LayoutHeaderProps>;
7
- export declare type LayoutMainProps = DivProps;
7
+ export type LayoutMainProps = DivProps;
8
8
  export declare const LayoutMain: import("react").NamedExoticComponent<DivProps>;
9
9
  export interface LayoutSidebarProps extends DivProps {
10
10
  headerHeight?: number;
@@ -18,7 +18,7 @@ export interface LayoutTocProps extends DivProps {
18
18
  tocWidth?: number;
19
19
  }
20
20
  export declare const LayoutToc: import("react").NamedExoticComponent<LayoutTocProps>;
21
- export declare type LayoutFooterProps = DivProps;
21
+ export type LayoutFooterProps = DivProps;
22
22
  export declare const LayoutFooter: import("react").NamedExoticComponent<DivProps>;
23
23
  export interface LayoutProps {
24
24
  /**
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { TooltipProps as AntdTooltipProps } from 'antd';
3
- export declare type TooltipProps = AntdTooltipProps;
3
+ export type TooltipProps = AntdTooltipProps;
4
4
  declare const Tooltip: import("react").NamedExoticComponent<AntdTooltipProps>;
5
5
  export default Tooltip;
@@ -1,4 +1,4 @@
1
- declare type colorStep = [
1
+ type colorStep = [
2
2
  string,
3
3
  string,
4
4
  string,
@@ -12,8 +12,8 @@ export declare const primaryColors: {
12
12
  volcano: string;
13
13
  yellow: string;
14
14
  };
15
- export declare type PrimaryColorsObj = typeof primaryColors;
16
- export declare type PrimaryColors = keyof PrimaryColorsObj;
15
+ export type PrimaryColorsObj = typeof primaryColors;
16
+ export type PrimaryColors = keyof PrimaryColorsObj;
17
17
  export declare const primaryColorsSwatches: string[];
18
18
  export declare const neutralColors: {
19
19
  mauve: string;
@@ -23,6 +23,6 @@ export declare const neutralColors: {
23
23
  slate: string;
24
24
  };
25
25
  export declare const neutralColorsSwatches: string[];
26
- export declare type NeutralColorsObj = typeof neutralColors;
27
- export declare type NeutralColors = keyof NeutralColorsObj;
26
+ export type NeutralColorsObj = typeof neutralColors;
27
+ export type NeutralColors = keyof NeutralColorsObj;
28
28
  export declare const findCustomThemeName: (type: 'primary' | 'neutral', value: string) => string | undefined;
@@ -1,15 +1,15 @@
1
1
  declare const PresetColors: readonly ["red", "volcano", "orange", "gold", "yellow", "lime", "green", "cyan", "blue", "geekblue", "purple", "magenta", "gray"];
2
- export declare type PresetColorKey = (typeof PresetColors)[number];
3
- export declare type PresetColorType = Record<PresetColorKey, string>;
4
- declare type ColorPaletteKeyIndex = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
5
- declare type ColorTokenKey = 'Bg' | 'BgHover' | 'Border' | 'BorderSecondary' | 'BorderHover' | 'Hover' | '' | 'Active' | 'TextHover' | 'Text' | 'TextActive';
6
- export declare type ColorToken = {
2
+ export type PresetColorKey = (typeof PresetColors)[number];
3
+ export type PresetColorType = Record<PresetColorKey, string>;
4
+ type ColorPaletteKeyIndex = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
5
+ type ColorTokenKey = 'Bg' | 'BgHover' | 'Border' | 'BorderSecondary' | 'BorderHover' | 'Hover' | '' | 'Active' | 'TextHover' | 'Text' | 'TextActive';
6
+ export type ColorToken = {
7
7
  [key in `${keyof PresetColorType}${ColorTokenKey}`]: string;
8
8
  };
9
- export declare type ColorPalettes = {
9
+ export type ColorPalettes = {
10
10
  [key in `${keyof PresetColorType}${ColorPaletteKeyIndex}`]: string;
11
11
  };
12
- export declare type ColorPalettesAlpha = {
12
+ export type ColorPalettesAlpha = {
13
13
  [key in `${keyof PresetColorType}${ColorPaletteKeyIndex}A`]: string;
14
14
  };
15
15
  export interface LobeCustomToken extends ColorToken, ColorPalettes, ColorPalettesAlpha {
@@ -4,8 +4,8 @@ export * from './customStylish';
4
4
  export * from './customToken';
5
5
  export * from './llm';
6
6
  export * from './meta';
7
- export declare type DivProps = HTMLAttributes<HTMLDivElement>;
8
- export declare type SvgProps = HTMLAttributes<SVGSVGElement>;
9
- export declare type ImgProps = HTMLAttributes<HTMLImageElement>;
10
- export declare type InputProps = HTMLAttributes<HTMLInputElement>;
11
- export declare type TextAreaProps = HTMLAttributes<HTMLTextAreaElement>;
7
+ export type DivProps = HTMLAttributes<HTMLDivElement>;
8
+ export type SvgProps = HTMLAttributes<SVGSVGElement>;
9
+ export type ImgProps = HTMLAttributes<HTMLImageElement>;
10
+ export type InputProps = HTMLAttributes<HTMLInputElement>;
11
+ export type TextAreaProps = HTMLAttributes<HTMLTextAreaElement>;
package/es/types/llm.d.ts CHANGED
@@ -34,9 +34,9 @@ export interface LMParameters {
34
34
  */
35
35
  top_p?: number;
36
36
  }
37
- export declare type LLMRoleType = 'user' | 'system' | 'assistant';
37
+ export type LLMRoleType = 'user' | 'system' | 'assistant' | 'function';
38
38
  export interface LLMMessage {
39
39
  content: string;
40
40
  role: LLMRoleType;
41
41
  }
42
- export declare type LLMExample = LLMMessage[];
42
+ export type LLMExample = LLMMessage[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.50.1",
3
+ "version": "1.52.0",
4
4
  "description": "Lobe UI is an open-source UI component library for building chatbot web apps",
5
5
  "keywords": [
6
6
  "lobehub",