Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 82 additions & 28 deletions src/frontend/src/components/content/PlanChatBody.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import ChatInput from "@/coral/modules/ChatInput";
import { PlanChatProps } from "@/models";
import { Button } from "@fluentui/react-components";
import { SendRegular } from "@fluentui/react-icons";
import { Button, Caption1 } from "@fluentui/react-components";
import { Send } from "@/coral/imports/bundleicons";

interface SimplifiedPlanChatProps extends PlanChatProps {
waitingForPlan: boolean;
}

const PlanChatBody: React.FC<SimplifiedPlanChatProps> = ({
planData,
input,
Expand All @@ -15,38 +16,91 @@ const PlanChatBody: React.FC<SimplifiedPlanChatProps> = ({
waitingForPlan
}) => {
return (

<div
style={{
padding: '20px 24px 32px',
borderTop: '1px solid var(--colorNeutralStroke2)',
backgroundColor: 'var(--colorNeutralBackground1)',
maxWidth: '800px',
margin: '0 auto',
width: '98%'
padding: '20px 0'
}}

>
<ChatInput
value={input}
onChange={setInput}
onEnter={() => OnChatSubmit(input)}
disabledChat={submittingChatDisableInput}
placeholder={
waitingForPlan
? "Creating plan..."
: "Add more info to this plan..."
}
<div
style={{
maxWidth: '800px',
margin: '0 auto',
padding: '0 24px'
}}
>
{/* Chat Input Container */}
<div style={{
position: 'relative',
width: '100%'
}}>
<ChatInput
value={input}
onChange={setInput}
onEnter={() => OnChatSubmit(input)}
disabledChat={submittingChatDisableInput}
placeholder={
waitingForPlan
? "Creating plan..."
: "Tell us what needs planning, building, or connecting—we'll handle the rest."
}
style={{
minHeight: '56px',
fontSize: '16px',
borderRadius: '8px',
border: '2px solid var(--colorNeutralStroke2)',
backgroundColor: 'var(--colorNeutralBackground1)',
padding: '16px 60px 16px 20px',
width: '100%',
boxSizing: 'border-box',
alignItems: 'flex-start',
textAlign: 'left',
verticalAlign: 'top'
}}
>
<Button
appearance="subtle"
className="home-input-send-button"
onClick={() => OnChatSubmit(input)}
disabled={submittingChatDisableInput}
icon={<Send />}
style={{
position: 'absolute',
right: '12px',
top: '16px',
height: '32px',
width: '32px',
borderRadius: '4px',
backgroundColor: 'transparent',
border: 'none',
color: submittingChatDisableInput
? 'var(--colorNeutralForegroundDisabled)'
: 'var(--colorBrandForeground1)'
}}
/>
</ChatInput>

{/* AI disclaimer */}
<div style={{
color: 'var(--colorNeutralForeground3)',
marginTop: '8px',
paddingBottom: '8px',
textAlign: 'center'
}}>
{/* <Caption1>AI-generated content may be incorrect</Caption1> */}
</div>
</div>
</div>
<div
style={{
marginTop: '8px',
paddingBottom: '8px',
}}
>
<Button
appearance="transparent"
onClick={() => OnChatSubmit(input)}
icon={<SendRegular />}
disabled={submittingChatDisableInput}
style={{ height: '40px', width: '40px' }}
/>
</ChatInput>
</div>);

</div>
</div>
);
}

export default PlanChatBody;
Loading
Loading