Skip to content

Commit da06dc2

Browse files
webui: purge ai-generated cruft
1 parent 500d222 commit da06dc2

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

tools/server/webui/src/lib/components/app/chat/ChatScreen/ChatScreenWarning.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import { AlertTriangle, RefreshCw } from '@lucide/svelte';
3-
import { serverLoading, serverStore, serverWarning } from '$lib/stores/server.svelte';
3+
import { serverLoading, serverStore } from '$lib/stores/server.svelte';
44
import { fly } from 'svelte/transition';
55
66
interface Props {
@@ -22,7 +22,7 @@
2222
<div class="flex items-center">
2323
<AlertTriangle class="h-4 w-4 text-yellow-600 dark:text-yellow-400" />
2424
<p class="ml-2 text-sm text-yellow-800 dark:text-yellow-200">
25-
{serverWarning() ?? 'Server `/props` endpoint not available - using cached data'}
25+
Server `/props` endpoint not available - using cached data
2626
</p>
2727
</div>
2828
<button

tools/server/webui/src/lib/services/chat.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -696,15 +696,9 @@ export class ChatService {
696696
const currentConfig = config();
697697
const apiKey = currentConfig.apiKey?.toString().trim();
698698

699-
// Force a fresh network read so restarting the backend with a new model
700-
// immediately propagates updated props and modality information.
701-
const cacheBuster = Date.now().toString();
702-
const response = await fetch(`./props?cb=${cacheBuster}`, {
703-
cache: 'no-store',
699+
const response = await fetch(`./props`, {
704700
headers: {
705701
'Content-Type': 'application/json',
706-
'Cache-Control': 'no-cache',
707-
Pragma: 'no-cache',
708702
...(apiKey ? { Authorization: `Bearer ${apiKey}` } : {})
709703
}
710704
});

tools/server/webui/src/lib/stores/server.svelte.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,8 @@ class ServerStore {
150150
const currentConfig = config();
151151
const apiKey = currentConfig.apiKey?.toString().trim();
152152

153-
// Avoid cached responses so slot availability reflects the restarted backend.
154-
const cacheBuster = Date.now().toString();
155-
const response = await fetch(`./slots?cb=${cacheBuster}`, {
156-
cache: 'no-store',
153+
const response = await fetch(`./slots`, {
157154
headers: {
158-
'Cache-Control': 'no-cache',
159-
Pragma: 'no-cache',
160155
...(apiKey ? { Authorization: `Bearer ${apiKey}` } : {})
161156
}
162157
});

0 commit comments

Comments
 (0)