Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e9296a1
add back NH Type, Year Pub, and Clear filters
van-go Jul 3, 2025
795c38f
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Jul 7, 2025
67a0e65
cert-updates
van-go Jul 9, 2025
52d892c
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Jul 9, 2025
e5c271c
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Jul 16, 2025
e7b055b
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Jul 16, 2025
ece6e39
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Aug 15, 2025
40e39f8
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Aug 21, 2025
25aa2f0
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Sep 15, 2025
cb3ddc6
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Oct 1, 2025
f1eb0f7
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Oct 15, 2025
674e4b3
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Nov 18, 2025
ae4f839
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Nov 20, 2025
0da44cd
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Dec 3, 2025
0632d99
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Dec 4, 2025
0e144dc
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Dec 10, 2025
88a519b
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Jan 7, 2026
ed01b72
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Apr 3, 2026
a7d292d
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Jul 15, 2026
e57d5a8
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Aug 4, 2026
205a380
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Aug 24, 2026
3fe0a6a
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Sep 8, 2026
d450770
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Sep 23, 2026
59892ce
Merge branch 'main' of https://github.com/DesignSafe-CI/portal
van-go Sep 24, 2026
27e85b4
enhance AIChat component to accept senderRef prop for improved focus …
van-go Sep 24, 2026
0afa800
Remove certificate file from PR
van-go Sep 24, 2026
6d08b6b
Merge branch 'main' into task/WC-369-Improve-AI-Chat-Usability
jarosenb Sep 28, 2026
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
4 changes: 3 additions & 1 deletion client/modules/workspace/src/AISearch/AIChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ interface Message {

interface AIChatProps {
closed?: boolean;
senderRef?: React.Ref<React.ElementRef<typeof Sender>>;
}

interface WSMessage {
Expand All @@ -60,7 +61,7 @@ interface WSMessage {
key: string;
}

export const AIChat: React.FC<AIChatProps> = ({ closed }) => {
export const AIChat: React.FC<AIChatProps> = ({ closed, senderRef }) => {
const [messages, setMessages] = useState<Message[]>([
{
key: 'welcome',
Expand Down Expand Up @@ -298,6 +299,7 @@ export const AIChat: React.FC<AIChatProps> = ({ closed }) => {
>
<div className={styles.sender}>
<Sender
ref={senderRef}
onSubmit={handleSendMessage}
placeholder="Ask me anything about DesignSafe publications and documentation..."
loading={loading}
Expand Down
9 changes: 7 additions & 2 deletions client/modules/workspace/src/AISearch/AIChatButton.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Button, Drawer } from 'antd';
import { useState } from 'react';
import { useRef, useState } from 'react';
import type { Sender } from '@ant-design/x';
import { AIChat } from './AIChat';
import styles from './AIChatButton.module.css';

export const AIChatButton: React.FC = () => {
const [showDrawer, setShowDrawer] = useState(false);
const senderRef = useRef<React.ElementRef<typeof Sender>>(null);

return (
<div id="nav-ai-root">
Expand All @@ -31,11 +33,14 @@ export const AIChatButton: React.FC = () => {
placement="bottom"
height="var(--ai-chat-drawer-height)"
open={showDrawer}
afterOpenChange={(open) => {
if (open) senderRef.current?.focus();
}}
onClose={() => setShowDrawer(false)}
maskClosable={true}
rootClassName={styles.drawer}
>
<AIChat closed={!showDrawer} />
<AIChat closed={!showDrawer} senderRef={senderRef} />
</Drawer>
</div>
);
Expand Down
Loading