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