From c8d1e6646550fb4954bd8c7d9145272863df3cc2 Mon Sep 17 00:00:00 2001 From: tomsmith8 Date: Wed, 2 Jul 2025 11:03:25 +0000 Subject: [PATCH] Add dropdown for simultaneous attempts to hive chat --- src/people/hiveChat/index.tsx | 61 +++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git a/src/people/hiveChat/index.tsx b/src/people/hiveChat/index.tsx index 24a738948..84e74999d 100644 --- a/src/people/hiveChat/index.tsx +++ b/src/people/hiveChat/index.tsx @@ -308,6 +308,47 @@ const AttachIcon = styled(MaterialIcon)` margin-right: 2px; `; +const SimultaneousAttemptsContainer = styled.div` + display: flex; + align-items: center; + gap: 8px; + margin-right: 12px; +`; + +const SimultaneousAttemptsDropdown = styled.select` + padding: 8px 12px; + border: 2px solid #848484; + border-radius: 8px; + background: white; + font-size: 14px; + font-weight: 500; + color: #5f6368; + cursor: pointer; + transition: border-color 0.2s ease; + min-width: 60px; + + &:hover { + border-color: #4285f4; + } + + &:focus { + outline: none; + border-color: #4285f4; + } + + &:disabled { + opacity: 0.6; + cursor: not-allowed; + border-color: #e4e7eb; + color: #9aa0a6; + } +`; + +const SimultaneousAttemptsIcon = styled(MaterialIcon)` + font-size: 18px; + color: #5f6368; +`; + const TabContainer = styled.div` display: flex; margin-left: 10px; @@ -593,6 +634,7 @@ export const HiveChatView: React.FC = observer(() => { label: 'Open AI - 4o', value: 'gpt-4o' }); + const [simultaneousAttempts, setSimultaneousAttempts] = useState(1); const [artifactTab, setArtifactTab] = useState<'visual' | 'code' | 'text' | 'logs'>('logs'); const [updatedTabs, setUpdatedTabs] = useState>({ logs: false, @@ -794,7 +836,8 @@ export const HiveChatView: React.FC = observer(() => { 'Build', undefined, pdfUrl, - actionArtifact + actionArtifact, + simultaneousAttempts ); if (sentMessage === undefined) { @@ -1206,7 +1249,8 @@ export const HiveChatView: React.FC = observer(() => { 'Build', undefined, pdfUrl, - actionArtifact + actionArtifact, + simultaneousAttempts ); if (sentMessage) { @@ -1603,6 +1647,19 @@ export const HiveChatView: React.FC = observer(() => { placeholder="Type your message..." disabled={isSending} /> + + + setSimultaneousAttempts(Number(e.target.value))} + disabled={isSending} + title="Simultaneous Attempts" + > + + + + + {isPdfUploadEnabled && ( setIsUploadModalOpen(true)} disabled={isSending}> Attach