feat(teamsbot): session context textarea in dashboard, API type for sessionContext
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
cf8f4ea3be
commit
823abaf9a8
2 changed files with 20 additions and 0 deletions
|
|
@ -83,6 +83,7 @@ export interface StartSessionRequest {
|
|||
backgroundImageUrl?: string;
|
||||
connectionId?: string;
|
||||
joinMode?: TeamsbotJoinMode;
|
||||
sessionContext?: string;
|
||||
}
|
||||
|
||||
export interface ConfigUpdateRequest {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export const TeamsbotDashboardView: React.FC = () => {
|
|||
const [meetingLink, setMeetingLink] = useState('');
|
||||
const [botName, setBotName] = useState('');
|
||||
const [joinMode, setJoinMode] = useState<TeamsbotJoinMode>('anonymous');
|
||||
const [sessionContext, setSessionContext] = useState('');
|
||||
const [isStarting, setIsStarting] = useState(false);
|
||||
|
||||
const _loadSessions = useCallback(async () => {
|
||||
|
|
@ -65,6 +66,7 @@ export const TeamsbotDashboardView: React.FC = () => {
|
|||
meetingLink: meetingLink.trim(),
|
||||
botName: botName.trim() || undefined,
|
||||
joinMode: joinMode,
|
||||
sessionContext: sessionContext.trim() || undefined,
|
||||
};
|
||||
|
||||
await teamsbotApi.startSession(instanceId, request);
|
||||
|
|
@ -170,6 +172,23 @@ export const TeamsbotDashboardView: React.FC = () => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div className={styles.formGroup}>
|
||||
<label className={styles.label}>Session-Kontext (optional)</label>
|
||||
<textarea
|
||||
className={styles.textarea || styles.input}
|
||||
placeholder="Agenda, Hintergrundinformationen, Dokumente oder andere Informationen fuer den Bot..."
|
||||
value={sessionContext}
|
||||
onChange={(e) => setSessionContext(e.target.value)}
|
||||
disabled={isStarting}
|
||||
rows={4}
|
||||
style={{ resize: 'vertical', minHeight: '80px' }}
|
||||
/>
|
||||
<span style={{ fontSize: '12px', color: '#888' }}>
|
||||
Kontext den der Bot waehrend der Sitzung nutzen kann (z.B. Meeting-Agenda, Projektinfos).
|
||||
{sessionContext.length > 0 && ` (${sessionContext.length} Zeichen)`}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<button
|
||||
className={styles.startButton}
|
||||
onClick={_handleStartSession}
|
||||
|
|
|
|||
Loading…
Reference in a new issue