mirror of
https://github.com/ollama/ollama.git
synced 2026-10-23 20:11:28 +00:00
app: align ChatGPT connection status copy with Claude (#18325)
This commit is contained in:
parent
1b45aa19da
commit
3e02feac8d
2 changed files with 25 additions and 16 deletions
|
|
@ -42,7 +42,7 @@ describe("CodexDesktopRow", () => {
|
|||
expect(html).toContain('aria-checked="false"');
|
||||
});
|
||||
|
||||
it("shows only the Ollama request count when connected", () => {
|
||||
it("matches Claude's connected copy before the first request", () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<CodexDesktopRow
|
||||
integration={integration}
|
||||
|
|
@ -54,27 +54,36 @@ describe("CodexDesktopRow", () => {
|
|||
/>,
|
||||
);
|
||||
|
||||
expect(html).toContain("0 Ollama requests this session");
|
||||
expect(html).toContain("Connected to Ollama · 0 requests this session");
|
||||
expect(html).not.toContain("Codex + Ollama");
|
||||
expect(html).not.toContain("3 Ollama models");
|
||||
expect(html).toContain('aria-label="Remove Ollama models from ChatGPT"');
|
||||
expect(html).toContain('aria-checked="true"');
|
||||
});
|
||||
|
||||
it("shows the Ollama request count with singular copy", () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<CodexDesktopRow
|
||||
integration={integration}
|
||||
initialStatus={status({
|
||||
connected: true,
|
||||
model: "qwen3:8b",
|
||||
requests: 1,
|
||||
})}
|
||||
/>,
|
||||
);
|
||||
it.each([
|
||||
{ requests: 1, expected: "Connected to Ollama · 1 request this session" },
|
||||
{
|
||||
requests: 12,
|
||||
expected: "Connected to Ollama · 12 requests this session",
|
||||
},
|
||||
])(
|
||||
"matches Claude's connected copy for $requests requests",
|
||||
({ requests, expected }) => {
|
||||
const html = renderToStaticMarkup(
|
||||
<CodexDesktopRow
|
||||
integration={integration}
|
||||
initialStatus={status({
|
||||
connected: true,
|
||||
model: "qwen3:8b",
|
||||
requests,
|
||||
})}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(html).toContain("1 Ollama request this session");
|
||||
});
|
||||
expect(html).toContain(expected);
|
||||
},
|
||||
);
|
||||
|
||||
it("offers installation when ChatGPT is not installed", () => {
|
||||
const html = renderToStaticMarkup(
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ function codexDesktopDescription(
|
|||
): string {
|
||||
if (!status?.connected) return defaultDescription;
|
||||
const requestCount = status.requests ?? 0;
|
||||
return `${requestCount} Ollama ${requestCount === 1 ? "request" : "requests"} this session`;
|
||||
return `Connected to Ollama · ${requestCount} ${requestCount === 1 ? "request" : "requests"} this session`;
|
||||
}
|
||||
|
||||
export function CodexDesktopRow({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue