build fixes
This commit is contained in:
parent
a912db3fee
commit
5eb9253fb1
7 changed files with 12 additions and 13 deletions
|
|
@ -291,8 +291,8 @@ export function useCommcoach(instanceIdOverride?: string): CommcoachHookReturn {
|
|||
onDocumentCreatedRef.current?.(eventData);
|
||||
const docMsg: CoachingMessage = {
|
||||
id: `doc-${Date.now()}`,
|
||||
sessionId: session.id,
|
||||
contextId: session.contextId,
|
||||
sessionId: session?.id ?? '',
|
||||
contextId: session?.contextId ?? '',
|
||||
role: 'assistant',
|
||||
content: `📄 **Dokument erstellt:** ${eventData.fileName || 'Dokument'}\n\n_Das Dokument ist in der Seitenleiste unter "Dateien" verfuegbar._`,
|
||||
contentType: 'systemNote',
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export const CommcoachAssistantView: React.FC = () => {
|
|||
const [title, setTitle] = useState('');
|
||||
const [goals, setGoals] = useState('');
|
||||
const [personaId, setPersonaId] = useState<string | null>(null);
|
||||
const [personas, setPersonas] = useState<any[]>([]);
|
||||
const [_personas, _setPersonas] = useState<any[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
|
|
@ -56,7 +56,6 @@ export const CommcoachAssistantView: React.FC = () => {
|
|||
setLoading(true);
|
||||
setError(null);
|
||||
try {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const apiRequest = commcoachApi.getApiRequest();
|
||||
const module = await commcoachApi.createModuleApi(apiRequest, instanceId, {
|
||||
title: title.trim(),
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ export const CommcoachDashboardView: React.FC = () => {
|
|||
>
|
||||
<div className={styles.contextTitle}>{ctx.title}</div>
|
||||
<div className={styles.contextMeta}>
|
||||
<span className={styles.contextCategory}>{_categoryLabel(ctx.category)}</span>
|
||||
<span className={styles.contextCategory}>{_categoryLabel(ctx.moduleType)}</span>
|
||||
<span>
|
||||
{ctx.sessionCount} {t('Sessions')}
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ interface CommcoachDossierViewProps {
|
|||
|
||||
export const CommcoachDossierView: React.FC<CommcoachDossierViewProps> = ({ persistentInstanceId,
|
||||
persistentMandateId,
|
||||
initialModuleId,
|
||||
initialModuleId: _initialModuleId,
|
||||
}) => {
|
||||
const { t } = useLanguage();
|
||||
const _toolPayloadForDisplay = (payload: Record<string, unknown>): string => {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import ReactMarkdown from 'react-markdown';
|
|||
import remarkGfm from 'remark-gfm';
|
||||
import { UnifiedDataBar } from '../../../components/UnifiedDataBar';
|
||||
import type { UdbContext, UdbTab, AddToChat_FileItem } from '../../../components/UnifiedDataBar';
|
||||
import { ProviderMultiSelect, _defaultProviderSelection } from '../../../components/ProviderSelector';
|
||||
import { _defaultProviderSelection } from '../../../components/ProviderSelector';
|
||||
import type { ProviderSelection } from '../../../components/ProviderSelector';
|
||||
import { getPageIcon } from '../../../config/pageRegistry';
|
||||
import styles from './CommcoachDossierView.module.css';
|
||||
|
|
@ -75,9 +75,9 @@ export const CommcoachSessionView: React.FC = () => {
|
|||
const [attachedFileIds, setAttachedFileIds] = useState<string[]>([]);
|
||||
const [attachedDsIds, setAttachedDsIds] = useState<string[]>([]);
|
||||
const [attachedFdsIds, setAttachedFdsIds] = useState<string[]>([]);
|
||||
const [providerSelection, setProviderSelection] = useState<ProviderSelection>(_defaultProviderSelection);
|
||||
const [showFilePicker, setShowFilePicker] = useState(false);
|
||||
const [showSourcePicker, setShowSourcePicker] = useState(false);
|
||||
const [providerSelection, _setProviderSelection] = useState<ProviderSelection>(_defaultProviderSelection);
|
||||
const [_showFilePicker, setShowFilePicker] = useState(false);
|
||||
const [_showSourcePicker, setShowSourcePicker] = useState(false);
|
||||
|
||||
const _udbContext: UdbContext | null = instanceId
|
||||
? { instanceId, mandateId: mandateId || undefined, featureInstanceId: instanceId }
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export const CommcoachSettingsView: React.FC = () => {
|
|||
// =========================================================================
|
||||
// Tab: Allgemein
|
||||
// =========================================================================
|
||||
const [profile, setProfile] = useState<CoachingUserProfile | null>(null);
|
||||
const [_profile, setProfile] = useState<CoachingUserProfile | null>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [saving, setSaving] = useState(false);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
|
|
|||
|
|
@ -69,13 +69,13 @@ export const TeamsbotAssistantView: React.FC = () => {
|
|||
moduleId = mod.id;
|
||||
}
|
||||
|
||||
const session = await teamsbotApi.startSession(instanceId, {
|
||||
const result = await teamsbotApi.startSession(instanceId, {
|
||||
meetingLink: meetingLink.trim(),
|
||||
botName,
|
||||
moduleId: moduleId || undefined,
|
||||
} as any);
|
||||
|
||||
navigate(`/mandates/${mandateId}/teamsbot/${instanceId}/sessions?sessionId=${session.sessionId || session.id}`);
|
||||
navigate(`/mandates/${mandateId}/teamsbot/${instanceId}/sessions?sessionId=${result.session.id}`);
|
||||
} catch (err: any) {
|
||||
setError(err?.message || t('Fehler beim Starten'));
|
||||
} finally {
|
||||
|
|
|
|||
Loading…
Reference in a new issue