Compare commits
No commits in common. "ec2475a323a78ef493ea73b1088fc97644b823f4" and "0a98af35e9a6c730ac2f6b5fb9e42716f86c0aeb" have entirely different histories.
ec2475a323
...
0a98af35e9
|
|
@ -860,15 +860,12 @@ export const PromptInputBody = ({
|
||||||
|
|
||||||
export type PromptInputTextareaProps = ComponentProps<
|
export type PromptInputTextareaProps = ComponentProps<
|
||||||
typeof InputGroupTextarea
|
typeof InputGroupTextarea
|
||||||
> & {
|
>;
|
||||||
submitOnEnter?: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const PromptInputTextarea = ({
|
export const PromptInputTextarea = ({
|
||||||
onChange,
|
onChange,
|
||||||
className,
|
className,
|
||||||
placeholder = "What would you like to know?",
|
placeholder = "What would you like to know?",
|
||||||
submitOnEnter = true,
|
|
||||||
...props
|
...props
|
||||||
}: PromptInputTextareaProps) => {
|
}: PromptInputTextareaProps) => {
|
||||||
const controller = useOptionalPromptInputController();
|
const controller = useOptionalPromptInputController();
|
||||||
|
|
@ -880,9 +877,6 @@ export const PromptInputTextarea = ({
|
||||||
if (isComposing || e.nativeEvent.isComposing) {
|
if (isComposing || e.nativeEvent.isComposing) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!submitOnEnter) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (e.shiftKey) {
|
if (e.shiftKey) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -313,9 +313,6 @@ export function IframeTestPanel() {
|
||||||
selectedSkills: [
|
selectedSkills: [
|
||||||
{ id: "5", name: "文档处理" },
|
{ id: "5", name: "文档处理" },
|
||||||
{ id: "1216", name: "市场研究报告" },
|
{ id: "1216", name: "市场研究报告" },
|
||||||
{ id: "1245", name: "市场研究报告" },
|
|
||||||
{ id: "520", name: "市场研究报告" },
|
|
||||||
{ id: "409", name: "市场研究报告" },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"*",
|
"*",
|
||||||
|
|
|
||||||
|
|
@ -342,7 +342,6 @@ export function InputBox({
|
||||||
"size-full",
|
"size-full",
|
||||||
!effectiveIsFocused && "h-[80px] py-0 leading-20",
|
!effectiveIsFocused && "h-[80px] py-0 leading-20",
|
||||||
)}
|
)}
|
||||||
submitOnEnter={false}
|
|
||||||
disabled={isInputDisabled}
|
disabled={isInputDisabled}
|
||||||
placeholder={t.inputBox.placeholder}
|
placeholder={t.inputBox.placeholder}
|
||||||
autoFocus={autoFocus}
|
autoFocus={autoFocus}
|
||||||
|
|
@ -366,7 +365,7 @@ export function InputBox({
|
||||||
"pointer-events-none invisible h-[0px] translate-y-2 p-[0px] opacity-0",
|
"pointer-events-none invisible h-[0px] translate-y-2 p-[0px] opacity-0",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<PromptInputTools className="min-w-0 flex-1">
|
<PromptInputTools>
|
||||||
{/* TODO: Add more connectors here
|
{/* TODO: Add more connectors here
|
||||||
<PromptInputActionMenu>
|
<PromptInputActionMenu>
|
||||||
<PromptInputActionMenuTrigger className="px-2!" />
|
<PromptInputActionMenuTrigger className="px-2!" />
|
||||||
|
|
@ -654,10 +653,10 @@ function IframeSkillDialogButton({
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex min-w-0 flex-1 items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Tooltip content={t.inputBox.selectSkill}>
|
<Tooltip content={t.inputBox.selectSkill}>
|
||||||
<PromptInputButton
|
<PromptInputButton
|
||||||
className={cn("group shrink-0 px-2! hover:bg-[#EAE2F5]", className)}
|
className={cn("group px-2! hover:bg-[#EAE2F5]", className)}
|
||||||
onClick={openSkillDialog}
|
onClick={openSkillDialog}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
|
|
@ -680,15 +679,9 @@ function IframeSkillDialogButton({
|
||||||
</Tag>
|
</Tag>
|
||||||
) : null}
|
) : null}
|
||||||
{!isBootstrapping && selectedSkills.length > 0 ? (
|
{!isBootstrapping && selectedSkills.length > 0 ? (
|
||||||
<div
|
<div className="flex flex-wrap items-center gap-2">
|
||||||
className="flex min-w-0 flex-1 items-center gap-2 overflow-x-auto overflow-y-hidden whitespace-nowrap [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
|
|
||||||
onWheel={(event) => {
|
|
||||||
if (event.deltaY === 0) return;
|
|
||||||
event.currentTarget.scrollLeft += event.deltaY;
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{selectedSkills.map((skill, index) => (
|
{selectedSkills.map((skill, index) => (
|
||||||
<Tag key={`${skill.skill_id}-${skill.title}-${index}`} className="shrink-0">
|
<Tag key={`${skill.skill_id}-${skill.title}-${index}`}>
|
||||||
{skill.title}
|
{skill.title}
|
||||||
{/* TODO: 因为后端接口不支持取消选择skill,所以暂时禁用取消选择按钮 */}
|
{/* TODO: 因为后端接口不支持取消选择skill,所以暂时禁用取消选择按钮 */}
|
||||||
{/* <button
|
{/* <button
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue