feat(teamsbot): join mode selector, response channel setting, API types for chat and join modes
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
356acb1ca2
commit
dffebc8d73
3 changed files with 37 additions and 1 deletions
|
|
@ -50,11 +50,15 @@ export interface TeamsbotBotResponse {
|
|||
timestamp?: string;
|
||||
}
|
||||
|
||||
export type TeamsbotResponseChannel = 'voice' | 'chat' | 'both';
|
||||
export type TeamsbotJoinMode = 'systemBot' | 'anonymous' | 'userAccount';
|
||||
|
||||
export interface TeamsbotConfig {
|
||||
botName: string;
|
||||
backgroundImageUrl?: string;
|
||||
aiSystemPrompt: string;
|
||||
responseMode: 'auto' | 'manual' | 'transcribeOnly';
|
||||
responseChannel: TeamsbotResponseChannel;
|
||||
language: string;
|
||||
voiceId?: string;
|
||||
browserBotUrl?: string;
|
||||
|
|
@ -78,6 +82,7 @@ export interface StartSessionRequest {
|
|||
botName?: string;
|
||||
backgroundImageUrl?: string;
|
||||
connectionId?: string;
|
||||
joinMode?: TeamsbotJoinMode;
|
||||
}
|
||||
|
||||
export interface ConfigUpdateRequest {
|
||||
|
|
@ -85,6 +90,7 @@ export interface ConfigUpdateRequest {
|
|||
backgroundImageUrl?: string;
|
||||
aiSystemPrompt?: string;
|
||||
responseMode?: 'auto' | 'manual' | 'transcribeOnly';
|
||||
responseChannel?: TeamsbotResponseChannel;
|
||||
language?: string;
|
||||
voiceId?: string;
|
||||
browserBotUrl?: string;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { useState, useEffect, useCallback, useRef } from 'react';
|
|||
import { useNavigate } from 'react-router-dom';
|
||||
import { useCurrentInstance } from '../../../hooks/useCurrentInstance';
|
||||
import * as teamsbotApi from '../../../api/teamsbotApi';
|
||||
import type { TeamsbotSession, StartSessionRequest } from '../../../api/teamsbotApi';
|
||||
import type { TeamsbotSession, StartSessionRequest, TeamsbotJoinMode } from '../../../api/teamsbotApi';
|
||||
import styles from './Teamsbot.module.css';
|
||||
|
||||
/**
|
||||
|
|
@ -21,6 +21,7 @@ export const TeamsbotDashboardView: React.FC = () => {
|
|||
// New session form
|
||||
const [meetingLink, setMeetingLink] = useState('');
|
||||
const [botName, setBotName] = useState('');
|
||||
const [joinMode, setJoinMode] = useState<TeamsbotJoinMode>('anonymous');
|
||||
const [isStarting, setIsStarting] = useState(false);
|
||||
|
||||
const _loadSessions = useCallback(async () => {
|
||||
|
|
@ -63,6 +64,7 @@ export const TeamsbotDashboardView: React.FC = () => {
|
|||
const request: StartSessionRequest = {
|
||||
meetingLink: meetingLink.trim(),
|
||||
botName: botName.trim() || undefined,
|
||||
joinMode: joinMode,
|
||||
};
|
||||
|
||||
await teamsbotApi.startSession(instanceId, request);
|
||||
|
|
@ -142,6 +144,20 @@ export const TeamsbotDashboardView: React.FC = () => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div className={styles.formGroup}>
|
||||
<label className={styles.label}>Join-Modus</label>
|
||||
<select
|
||||
className={styles.select || styles.input}
|
||||
value={joinMode}
|
||||
onChange={(e) => setJoinMode(e.target.value as TeamsbotJoinMode)}
|
||||
disabled={isStarting}
|
||||
>
|
||||
<option value="systemBot">System-Bot (authentifiziert)</option>
|
||||
<option value="anonymous">Anonymer Gast</option>
|
||||
<option value="userAccount">Mein Account</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div className={styles.formGroup}>
|
||||
<label className={styles.label}>Bot-Name (optional)</label>
|
||||
<input
|
||||
|
|
|
|||
|
|
@ -206,6 +206,20 @@ export const TeamsbotSettingsView: React.FC = () => {
|
|||
<option value="transcribeOnly">Nur Transkription - Keine AI-Antworten</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div className={styles.formGroup}>
|
||||
<label className={styles.label}>Antwort-Kanal</label>
|
||||
<select
|
||||
className={styles.select}
|
||||
value={formData.responseChannel || 'voice'}
|
||||
onChange={(e) => _updateField('responseChannel', e.target.value)}
|
||||
>
|
||||
<option value="voice">Nur Sprache - Bot antwortet per Audio</option>
|
||||
<option value="chat">Nur Chat - Bot antwortet per Textnachricht</option>
|
||||
<option value="both">Sprache + Chat - Bot antwortet per Audio und Text</option>
|
||||
</select>
|
||||
<span className={styles.hint}>Wie soll der Bot im Meeting antworten?</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Voice Settings */}
|
||||
|
|
|
|||
Loading…
Reference in a new issue