@ray-js/t-agent-ui-ray 0.2.7-beta.8 → 0.2.7

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,8 +2,6 @@
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  height: 100%;
5
- --t-agent-safe-bottom: 0;
6
- --t-agent-safe-bottom: constant(safe-area-inset-bottom);
7
5
  --t-agent-safe-bottom: env(safe-area-inset-bottom);
8
6
 
9
7
  --t-agent-y-gap: 32rpx;
@@ -178,9 +178,8 @@ export class BlockParser {
178
178
  return result;
179
179
  }
180
180
  parseBlock(input) {
181
- const _input = input.replace(/\\n/g, '<br>').replace(/\\<br>/g, '<br>').replace(/\\"/g, '"');
182
181
  this.pendingBlocks = [];
183
- const html = md.render(_input, {
182
+ const html = md.render(input, {
184
183
  blockParser: this
185
184
  });
186
185
  if (!this.pendingBlocks.length) {
@@ -10,6 +10,7 @@ interface Props {
10
10
  className?: string;
11
11
  renderTop?: React.ReactNode;
12
12
  placeholder?: string;
13
+ placeholderStyle?: React.CSSProperties;
13
14
  style?: React.CSSProperties;
14
15
  attachment?: boolean | AttachmentOptions;
15
16
  maxTextLength?: number;
@@ -222,8 +222,12 @@ export default function MessageInputAIStream(props) {
222
222
  }]);
223
223
  }
224
224
  },
225
- maxLength: props.maxTextLength || 200,
226
- placeholderStyle: "color: var(--app-B1-N4)",
225
+ maxLength: props.maxTextLength || 200
226
+ // @ts-ignore
227
+ ,
228
+ placeholderStyle: props.placeholderStyle || {
229
+ color: 'var(--app-B1-N4)'
230
+ },
227
231
  onFocus: () => {
228
232
  setMoreOpen(false);
229
233
  emitEvent('scrollToBottom', {
@@ -34,7 +34,8 @@ const MessageList = props => {
34
34
  }
35
35
  const scrollRef = useRef(null);
36
36
  useOnEvent('scrollToBottom', payload => {
37
- if (scrollRef.current) {
37
+ var _scrollRef$current;
38
+ if ((_scrollRef$current = scrollRef.current) !== null && _scrollRef$current !== void 0 && _scrollRef$current.scrollToBottom) {
38
39
  scrollRef.current.scrollToBottom(payload);
39
40
  }
40
41
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/t-agent-ui-ray",
3
- "version": "0.2.7-beta.8",
3
+ "version": "0.2.7",
4
4
  "author": "Tuya.inc",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -40,5 +40,5 @@
40
40
  "@types/echarts": "^4.9.22",
41
41
  "@types/markdown-it": "^14.1.1"
42
42
  },
43
- "gitHead": "31a0d88f88eddae8bfd802e4861c76cd02c07692"
43
+ "gitHead": "3afabdd5b9a063d70157f69158ef8edccfdac012"
44
44
  }