Skip to content

Commit 4e477e2

Browse files
committed
fix: ability to remove unresponsive ollama servers
1 parent 79d4529 commit 4e477e2

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

src/app/(public)/share/[id]/page.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@ export default async function SharePage({
126126
<main className="container mx-auto p-4">
127127
<ChatMeta
128128
createdAt={chat.createdAt.toISOString()}
129-
model={modelType === "ollama" ? "Selfhosted Model" : modelInfo?.name || chat.model || "Unknown Model"}
129+
model={
130+
modelType === "ollama"
131+
? "Selfhosted Model"
132+
: modelInfo?.name || chat.model || "Unknown Model"
133+
}
130134
title={chat.name || "Untitled Chat"}
131135
id={id}
132136
shared={chat.public}

src/components/OllamaModelList.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,17 @@ export const OllamaModelList = ({ models }: OllamaListProps) => {
197197
</span>
198198
</>
199199
) : (
200-
<span className="badge badge-error">
201-
Not Available
202-
</span>
200+
<>
201+
<button
202+
className="btn btn-sm btn-ghost mr-2"
203+
onClick={() => removeModel(model.id)}
204+
>
205+
<X className="h-4 w-4" />
206+
</button>
207+
<span className="badge badge-error">
208+
Not Available
209+
</span>
210+
</>
203211
)}
204212
</div>
205213
</div>

0 commit comments

Comments
 (0)