{
+ if (event.target.files?.length) onPickFiles(Array.from(event.target.files));
+ event.target.value = '';
+ }}
+ />
+ {list.length > 0 && (
+
+ {list.map(file => (
+ onRemoveAttachment(file.id)}
+ >
+
+ {file.fileName}
+
+ {file.uploading ? '上传中…' : (file.error ? '上传失败' : '已上传')}
+
+
+ ))}
+
+
+
+ }
+ theme="borderless"
+ type="tertiary"
+ aria-label={t('chat.attachmentsLabel', null, '附件')}
+ disabled={blocked}
+ onClick={() => fileRef.current?.click()}
+ />
+
}
+ icon={}
theme="borderless"
- disabled={blocked}
- onClick={() => fileRef.current?.click()}
+ type="tertiary"
+ className="chat-composer-hitl"
+ aria-label={t('chat.hitlTitle', null, '人机协同')}
+ disabled={!onOpenHitl}
+ onClick={onOpenHitl}
>
- {t('chat.attachmentsLabel', null, '附件')}
+ {t('chat.hitlTitle', null, '人机协同')}
-
-
- {showProjectSelect && (
-
+
+ )}
+ >
+
+
+ {sending ? (
+
}
+ aria-label={t('chat.stop', null, '停止')}
+ onClick={onStop}
+ disabled={!canStop}
+ />
+ ) : (
+
+ }
+ aria-label={t('chat.send', null, '发送')}
+ disabled={blocked || checkingRun || uploadingCount > 0}
+ onClick={onSend}
+ />
+
+ )}
+