Skip to content

Commit df5df1f

Browse files
committed
refactor: Cleanup types
1 parent 37a9fb7 commit df5df1f

File tree

9 files changed

+9
-18
lines changed

9 files changed

+9
-18
lines changed

tools/server/webui/src/app.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type {
1212
ApiLlamaCppServerProps
1313
} from '$lib/types/api';
1414

15-
import type { ChatMessageType, ChatRole, ChatUploadedFile } from '$lib/types/chat';
15+
import type { ChatMessageType, ChatRole, ChatUploadedFile, MessageSiblingInfo } from '$lib/types/chat';
1616

1717
import type {
1818
DatabaseConversation,
@@ -57,6 +57,7 @@ declare global {
5757
DatabaseMessageExtraImageFile,
5858
DatabaseMessageExtraTextFile,
5959
DatabaseMessageExtraPdfFile,
60+
MessageSiblingInfo,
6061
SettingsConfigValue,
6162
SettingsFieldConfig,
6263
SettingsConfigType,

tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessage.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script lang="ts">
22
import { getDeletionInfo } from '$lib/stores/chat.svelte';
3-
import type { MessageSiblingInfo } from '$lib/utils/branching';
43
import { copyToClipboard } from '$lib/utils/copy';
54
import { parseThinkingContent } from '$lib/utils/thinking';
65
import ChatMessageAssistant from './ChatMessageAssistant.svelte';

tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessageActions.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import * as AlertDialog from '$lib/components/ui/alert-dialog';
55
import * as Tooltip from '$lib/components/ui/tooltip';
66
import type { DatabaseMessage } from '$lib/types/database';
7-
import type { MessageSiblingInfo } from '$lib/utils/branching';
87
import type { Component } from 'svelte';
98
import MessageBranchingControls from './MessageBranchingControls.svelte';
109

tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessageAssistant.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import { useProcessingState } from '$lib/hooks/use-processing-state.svelte';
44
import { isLoading } from '$lib/stores/chat.svelte';
55
import type { DatabaseMessage } from '$lib/types/database';
6-
import type { MessageSiblingInfo } from '$lib/utils/branching';
76
import { fade } from 'svelte/transition';
87
import ChatMessageActions from './ChatMessageActions.svelte';
98

tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessageUser.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import { ChatAttachmentsList } from '$lib/components/app';
66
import { inputClasses } from '$lib/constants/input-classes';
77
import type { DatabaseMessage } from '$lib/types/database';
8-
import type { MessageSiblingInfo } from '$lib/utils/branching';
98
import ChatMessageActions from './ChatMessageActions.svelte';
109
1110
interface Props {

tools/server/webui/src/lib/components/app/chat/ChatMessages/MessageBranchingControls.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { ChevronLeft, ChevronRight } from '@lucide/svelte';
33
import { Button } from '$lib/components/ui/button';
44
import * as Tooltip from '$lib/components/ui/tooltip';
5-
import type { MessageSiblingInfo } from '$lib/utils/branching';
65
76
interface Props {
87
class?: string;

tools/server/webui/src/lib/types/chat.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@ export interface ChatUploadedFile {
1010
preview?: string;
1111
textContent?: string;
1212
}
13+
14+
export interface MessageSiblingInfo {
15+
message: DatabaseMessage;
16+
siblingIds: string[];
17+
currentIndex: number;
18+
totalSiblings: number;
19+
}

tools/server/webui/src/lib/utils/audio-recording.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import { AudioMimeType } from '$lib/constants/supported-file-types';
22

3-
export interface AudioRecordingOptions {
4-
mimeType?: string;
5-
audioBitsPerSecond?: number;
6-
}
7-
83
export class AudioRecorder {
94
private mediaRecorder: MediaRecorder | null = null;
105
private audioChunks: Blob[] = [];

tools/server/webui/src/lib/utils/branching.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ import type { DatabaseMessage } from '$lib/types/database';
1717
* └── message 5 (assistant)
1818
*/
1919

20-
export interface MessageSiblingInfo {
21-
message: DatabaseMessage;
22-
siblingIds: string[];
23-
currentIndex: number;
24-
totalSiblings: number;
25-
}
26-
2720
/**
2821
* Filters messages to get the conversation path from root to a specific leaf node.
2922
* If the leafNodeId doesn't exist, returns the path with the latest timestamp.

0 commit comments

Comments
 (0)