king
2025-02-26 fd7226299980c6e20b05ca42606382b944746d0f
2025-02-26
2个文件已修改
18 ■■■■■ 已修改文件
src/views/mkai/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mkai/index.scss 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mkai/index.jsx
@@ -129,7 +129,7 @@
  if (status) {
    return (
      <div className="item-title edit">
        <Input value={val} onChange={chanVal} onBlur={submit} onPressEnter={submit}/>
        <Input value={val} autoFocus onChange={chanVal} onBlur={submit} onPressEnter={submit}/>
      </div>
    )
  }
@@ -233,7 +233,7 @@
    UserID: '',
    LoginUID: '',
    textInput: '',
    type: 'deepseek-chat', // deepseek-chat deepseek-reasoner
    type: 'deepseek-reasoner', // deepseek-chat deepseek-reasoner
    currentChat: {id: '', list: [], title: ''},
    chats: []
  }
@@ -429,7 +429,7 @@
      if (!item.loading) {
        list.push({
          role: item.role,
          content: item.content
          content: item.oriText || item.content
        })
      }
    })
@@ -449,12 +449,15 @@
      delete _chat.loading
      _chat.list.pop()
      let _val = ''
      let _html = '服务器繁忙,请稍后再试。'
      let _val = '服务器繁忙,请稍后再试。'
      let _html = _val
      let tokens_count = 0
      if (res.success && res.choices && res.choices[0]) {
        _val = res.choices[0].message.content
        _html = this.getAssistVal(_val)
      } else if (!res.success && res.rawStatusCode === 400 && res.message && /This\s*model's\s*maximum\s*context\s*length/.test(res.message)) {
        _html = `当前对话已超出${type === 'deepseek-reasoner' ? '深度思考的' : ''}最大长度限制,开启一个新对话继续思考吧~`
        _val = _html
      }
      if (res.usage && res.usage.total_tokens) {
src/views/mkai/index.scss
@@ -481,10 +481,13 @@
          }
        }
        .input-wrap {
          width: 800px;
          width: 802px;
          position: sticky;
          bottom: 30px;
          z-index: 2;
          border-top-left-radius: 24px;
          border-top-right-radius: 24px;
          background-color: #ffffff;
          .c9dd4ww {
            cursor: text;
            box-sizing: border-box;