c2c2d51da5
This commit adds support for multi-turn tool calling by making processToolCalls
recursive. Previously, follow-up LLM responses that included additional tool
calls would drop those calls and present the text response instead.
Key changes:
- processToolCalls now accepts a depth parameter (default 0)
- Recurses when follow-up responses contain more tool_calls, up to MAX_TOOL_CALL_DEPTH
- Adds MAX_TOOL_CALL_DEPTH constant set to 5 to prevent infinite loops
- Clears pending actions only after processing is complete or before recursing
- Fixes new-chat container flex layout in styles.css to wrap and start from left
I need to write a clean git commit message for this diff. Let me analyze what changed:
1. In `main.js` and `src/chat-view.ts`:
- `processToolCalls` now has a `depth` parameter with default `0`
- Added `MAX_TOOL_CALL_DEPTH = 5` constant
- Added depth check at start of `processToolCalls`
- When follow-up LLM calls return more tool calls, it now recursively calls `processToolCalls` instead of ignoring
them
- `clearPendingActions()` moved around to be called at appropriate times
- Some variable renames from `finalResponse` to `followUpContent` for clarity
2. In `styles.css`:
- `.ollama-new-chat-container` changed from `justify-content: flex-end` to `flex-wrap: wrap; justify-content:
flex-start`
The main feature is recursive/multi-turn tool calling with a depth limit. The CSS change seems like a minor UI fix
included in the same commit.
Subject line ideas:
- "Add recursive tool call handling with depth limit" (47 chars) - good
- "Support multi-turn tool calls with depth limit" (46 chars) - good
- "Add recursive tool calls and depth limit" (41 chars) - good
- "Implement recursive tool calling with depth limit" (47 chars) - good
Wait, I also need to mention the CSS change? It's minor but part of the commit. However, usually the subject should
capture the main change. If there are multiple unrelated changes, sometimes people mention them, but here the CSS change
seems minor enough that it could be in the body or omitted if not important. Actually looking at the diff, the CSS
change is just adjusting flex properties. It might be related to UI changes needed for the tool call flow, or it could
be an unrelated fix piggybacking.
Actually, the prompt says "write a short clear commit message that summarizes the changes." If I can express it in the
subject line, don't include body. But this seems like a significant enough change that a body might help explain the
"why" and key details.
Let me think about the body. The key points:
- Makes `processToolCalls` recursive to handle follow-up tool calls
- Adds `MAX_TOOL_CALL_DEPTH` (5) to prevent infinite recursion
- Previously, follow-up responses containing tool_calls would drop them
- Also fixes new-chat container layout
Subject: Add recursive tool call handling with depth limit (47 chars)
Body:
Support multi-turn tool calling by recursing in processToolCalls when
follow-up LLM responses contain additional tool_calls. Previously these
were ignored and the text response was shown instead.
Add MAX_TOOL_CALL_DEPTH constant set to 5 to prevent infinite loops.
Clear pending actions at the appropriate recursion boundaries.
Fix new-chat container flex layout to wrap and align left.
Wait, I should check if "Add recursive tool call handling with depth limit" is clear enough. Yes.
Let me count chars:
"Add recursive tool call handling with depth limit"
A-d-d- -r-e-c-u-r-s-i-v-e- -t-o-o-l- -c-a-l-l- -h-a-n-d-l-i-n-g- -w-i-t-h- -d-e-p-t-h- -l-i-m-i-t
3+1+9+1+4+1+4+1+9+1+4+1+5+1+5 = let's just count: "Add" (3) + " " (1) + "recursive" (9) + " " (1) + "tool" (4) + " " (1)
+ "call" (4) + " " (1) + "handling" (8) + " " (1) + "with" (4) + " " (1) + "depth" (5) + " " (1) + "limit" (5) =
3+1+9+1+4+1+4+1+8+1+4+1+5+1+5 = 48 chars. Good.
Actually, looking more carefully at the code:
- The depth check is added
- Recursion is added
- clearPendingActions is moved
- The CSS change is there
Is the body useful? Yes, it explains the behavioral change and why. But maybe I can keep it shorter.
Actually, looking at the instructions again: "If you can accurately express the change in just the subject line, don't
include anything in the message body."
Hmm. This is a fairly complex change. But the subject line "Add recursive tool call handling with depth limit" does
accurately express the main change. The CSS change is minor. However, there are enough details (the depth limit of 5,
the recursion aspect, the fact that it handles follow-up tool calls) that a brief body might be useful to someone
looking at the commit log.
But the instructions also say "Only use the body when it is providing *useful* information" and "Don't repeat
information from the subject line in the message body."
If I use the subject line I proposed, what useful info could the body add?
- The depth limit value (5)
- That it affects follow-up LLM responses
- The CSS fix
Actually, I think a body is appropriate here because the change is not entirely captured by just knowing it's
"recursive" - the fact that it previously dropped tool calls on follow-up is useful context (the "why").
Let me draft:
Add recursive tool call handling with depth limit
When follow-up LLM responses contain additional tool_calls, recurse in
processToolCalls instead of ignoring them. Add MAX_TOOL_CALL_DEPTH
constant set to 5 to prevent infinite loops. Move clearPendingActions
to appropriate recursion boundaries. Fix new-chat container flex layout
to wrap and align left.
Wait, I should check line wrapping. Max 72 chars.
Line 1: "Add recursive tool call handling with depth limit"
Line 2: (blank)
Line 3: "When follow-up LLM responses contain additional tool_calls, recurse in"
Line 4: "processToolCalls instead of ignoring them. Add MAX_TOOL_CALL_DEPTH"
Line 5: "constant set to 5 to prevent infinite loops. Move clearPendingActions"
Line 6: "to appropriate recursion boundaries. Fix new-chat container flex layout"
Line 7: "to wrap and align left."
Let me check lengths:
Line 3: "When follow-up LLM responses contain additional tool_calls, recurse in" = 70 chars. Good.
Line 4: "processToolCalls instead of ignoring them. Add MAX_TOOL_CALL_DEPTH" = 67 chars. Good.
Line 5: "constant set to 5 to prevent infinite loops. Move clearPendingActions" = 69 chars. Good.
Line 6: "to appropriate recursion boundaries. Fix new-chat container flex layout" = 69 chars. Good.
Line 7: "to wrap and align left." = 23 chars. Good.
Actually, should I mention processToolCalls specifically? It's a detail but useful.
Alternative body:
Support multi-turn tool calling by recursing when follow-up responses
contain additional tool_calls. Previously these were discarded and the
text response was shown instead. Add MAX_TOOL_CALL_DEPTH constant set
to 5. Also fix new-chat container flex layout.
Length check:
"Support multi-turn tool calling by recursing when follow-up responses" = 67
"contain additional tool_calls. Previously these were discarded and the" = 70
"text response was shown instead. Add MAX_TOOL_CALL_DEPTH constant set" = 69
"to 5. Also fix new-chat container flex layout." = 46
I think this is clearer. But does it repeat the subject? The subject says "Add recursive tool call handling" and the
body says "Support multi-turn tool calling by recursing..." - that's similar but explains the mechanism, not repeating
per se.
Actually, I could also make the subject slightly different to be more specific:
"Add multi-turn tool call recursion with depth limit"
Then body:
When follow-up LLM responses contain additional tool_calls, recurse in
processToolCalls rather than discarding them. Add MAX_TOOL_CALL_DEPTH
constant set to 5. Move clearPendingActions to correct boundaries.
Also fix new-chat container flex layout.
Hmm. "Add multi-turn tool call recursion with depth limit" is 49 chars. Good.
Actually, looking at the diff again, the most important thing is that `processToolCalls` now recurses. Let me make sure
I capture that.
Another option: The commit could be split conceptually, but since it's one diff, we summarize all changes.
Final decision:
Subject: Add recursive tool call handling with depth limit
Body:
When follow-up LLM responses contain additional tool_calls, recurse in
processToolCalls instead of ignoring them. Add MAX_TOOL_CALL_DEPTH
constant set to 5 to prevent infinite loops. Move clearPendingActions
to appropriate recursion boundaries. Fix new-chat container flex layout
to wrap and align left.
Wait, I want to make sure I don't exceed 72 chars per line in the body.
Line 1: When follow-up LLM responses contain additional tool_calls, recurse in
Count: W(1)h(2)e(3)n(4) (5)f(6)o(7)l(8)l(9)o(10)w(11)-(12)u(13)p(14) (15)L(16)L(17)M(18)
(19)r(20)e(21)s(22)p(23)o(24)n(25)s(26)e(27)s(28) (29)c(30)o(31)n(32)t(33)a(34)i(35)n(36)
(37)a(38)d(39)d(40)i(41)t(42)i(43)o(44)n(45)a(46)l(47) (48)t(49)o(50)o(51)l(52)_(53)c(54)a(55)l(56)l(57)s(58),(59)
(60)r(61)e(62)c(63)u(64)r(65)s(66)e(67) (68)i(69)n(70) = 70 chars. OK.
Line 2: processToolCalls instead of ignoring them. Add MAX_TOOL_CALL_DEPTH
p(1)r(2)o(3)c(4)e(5)s(6)s(7)T(8)o(9)o(10)l(11)C(12)a(13)l(14)l(15)s(16) (17)i(18)n(19)s(20)t(21)e(22)a(23)d(24)
(25)o(26)f(27) (28)i(29)g(30)n(31)o(32)r(33)i(34)n(35)g(36) (37)t(38)h(39)e(40)m(41).(42) (43)A(44)d(45)d(46)
(47)M(48)A(49)X(50)_(51)T(52)O(53)O(54)L(55)_(56)C(57)A(58)L(59)L(60)_(61)D(62)E(63)P(64)T(65)H(66) = 66 chars. OK.
Line 3: constant set to 5 to prevent infinite loops. Move clearPendingActions
c(1)o(2)n(3)s(4)t(5)a(6)n(7)t(8) (9)s(10)e(11)t(12) (13)t(14)o(15) (16)5(17) (18)t(19)o(20)
(21)p(22)r(23)e(24)v(25)e(26)n(27)t(28) (29)i(30)n(31)f(32)i(33)n(34)i(35)t(36)e(37) (38)l(39)o(40)o(41)p(42)s(43).(44)
(45)M(46)o(47)v(48)e(49)
(50)c(51)l(52)e(53)a(54)r(55)P(56)e(57)n(58)d(59)i(60)n(61)g(62)A(63)c(64)t(65)i(66)o(67)n(68)s(69) = 69 chars. OK.
Line 4: to appropriate recursion boundaries. Fix new-chat container flex layout
t(1)o(2) (3)a(4)p(5)p(6)r(7)o(8)p(9)r(10)i(11)a(12)t(13)e(14) (15)r(16)e(17)c(18)u(19)r(20)s(21)i(22)o(23)n(24)
(25)b(26)o(27)u(28)n(29)d(30)a(31)r(32)i(33)e(34)s(35).(36) (37)F(38)i(39)x(40)
(41)n(42)e(43)w(44)-(45)c(46)h(47)a(48)t(49) (50)c(51)o(52)n(53)t(54)a(55)i(56)n(57)e(58)r(59) (60)f(61)l(62)e(63)x(64)
(65)l(66)a(67)y(68)o(69)u(70)t(71) = 71 chars. OK.
Line 5: to wrap and align left.
t(1)o(2) (3)w(4)r(5)a(6)p(7) (8)a(9)n(10)d(11) (12)a(13)l(14)i(15)g(16)n(17) (18)l(19)e(20)f(21)t(22).(23) = 23 chars.
OK.
This looks good. But I should double check: does the body provide useful info not in the subject? Yes, it explains the
specific behavior change (recursing instead of ignoring), the constant name and value, and the CSS fix.
Actually, should I include the CSS fix in the body? It's part of the diff. If I omit it, the
503 lines
11 KiB
CSS
503 lines
11 KiB
CSS
:root {
|
||
--ollama-user-bg: var(--background-modifier-form-field);
|
||
--ollama-assistant-bg: var(--background-primary-alt);
|
||
--ollama-border: var(--background-modifier-border);
|
||
--ollama-radius: var(--radius-m);
|
||
--ollama-gap: var(--size-4-2);
|
||
--ollama-log-debug: var(--text-muted);
|
||
--ollama-log-info: var(--text-accent);
|
||
--ollama-log-warn: var(--text-warning);
|
||
--ollama-log-error: var(--text-error);
|
||
--ollama-log-bg: var(--background-primary-alt);
|
||
}
|
||
|
||
/* Root chat view layout: flex column with input locked at bottom */
|
||
.ollama-chat-view-content {
|
||
display: flex;
|
||
flex-direction: column;
|
||
height: 100%;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.ollama-new-chat-container {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
justify-content: flex-start;
|
||
align-items: center;
|
||
gap: var(--size-4-1);
|
||
padding: var(--size-4-1) var(--size-4-2);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.ollama-chat-container {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--ollama-gap);
|
||
padding: var(--size-4-2);
|
||
overflow-y: auto;
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
user-select: text;
|
||
-webkit-user-select: text;
|
||
}
|
||
|
||
.ollama-input-container {
|
||
display: flex;
|
||
gap: var(--size-4-1);
|
||
padding: var(--size-4-2);
|
||
border-top: 1px solid var(--ollama-border);
|
||
background-color: var(--background-primary);
|
||
align-items: flex-end;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.ollama-message {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--size-4-1);
|
||
padding: var(--size-4-2);
|
||
border-radius: var(--ollama-radius);
|
||
border: 1px solid var(--ollama-border);
|
||
max-width: 90%;
|
||
user-select: text;
|
||
-webkit-user-select: text;
|
||
}
|
||
|
||
.ollama-message-user {
|
||
align-self: flex-end;
|
||
background-color: var(--ollama-user-bg);
|
||
}
|
||
|
||
.ollama-message-assistant {
|
||
align-self: flex-start;
|
||
background-color: var(--ollama-assistant-bg);
|
||
}
|
||
|
||
.ollama-message-header {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--size-4-1);
|
||
font-size: var(--font-smallest);
|
||
font-weight: var(--font-semibold);
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.05em;
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
.ollama-message-role::before {
|
||
display: inline-block;
|
||
width: 1em;
|
||
height: 1em;
|
||
margin-right: var(--size-4-1);
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.ollama-message-user .ollama-message-role::before {
|
||
content: '👤';
|
||
}
|
||
|
||
.ollama-message-assistant .ollama-message-role::before {
|
||
content: '🤖';
|
||
}
|
||
|
||
.ollama-message-content {
|
||
line-height: var(--line-height-normal);
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
user-select: text;
|
||
-webkit-user-select: text;
|
||
}
|
||
|
||
.ollama-new-chat-container {
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
padding: var(--size-4-1) var(--size-4-2);
|
||
}
|
||
|
||
.ollama-new-chat-button {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: var(--size-4-1);
|
||
padding: var(--size-4-1) var(--size-4-2);
|
||
font-size: var(--font-smallest);
|
||
border-radius: var(--ollama-radius);
|
||
border: 1px solid var(--ollama-border);
|
||
background-color: var(--background-modifier-form-field);
|
||
color: var(--text-normal);
|
||
cursor: pointer;
|
||
transition: background-color 0.15s ease;
|
||
}
|
||
|
||
.ollama-new-chat-button:hover {
|
||
background-color: var(--background-modifier-hover);
|
||
}
|
||
|
||
.ollama-new-chat-button::before {
|
||
content: '➕';
|
||
}
|
||
|
||
.ollama-input {
|
||
flex: 1;
|
||
min-height: 4rem;
|
||
max-height: 12rem;
|
||
padding: var(--size-4-1) var(--size-4-2);
|
||
border-radius: var(--ollama-radius);
|
||
border: 1px solid var(--ollama-border);
|
||
background-color: var(--background-modifier-form-field);
|
||
color: var(--text-normal);
|
||
resize: vertical;
|
||
font-family: inherit;
|
||
font-size: var(--font-ui-small);
|
||
line-height: var(--line-height-normal);
|
||
}
|
||
|
||
.ollama-input:focus {
|
||
outline: none;
|
||
border-color: var(--interactive-accent);
|
||
box-shadow: 0 0 0 2px var(--interactive-accent-translucent);
|
||
}
|
||
|
||
.ollama-send-button {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: var(--size-4-1) var(--size-4-3);
|
||
border-radius: var(--ollama-radius);
|
||
border: none;
|
||
background-color: var(--interactive-accent);
|
||
color: var(--text-on-accent);
|
||
font-weight: var(--font-semibold);
|
||
font-size: var(--font-ui-small);
|
||
cursor: pointer;
|
||
transition: filter 0.15s ease;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.ollama-send-button:hover {
|
||
filter: brightness(1.1);
|
||
}
|
||
|
||
.ollama-send-button:active {
|
||
filter: brightness(0.95);
|
||
}
|
||
|
||
/* Thinking indicator */
|
||
.ollama-thinking-indicator {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: var(--size-4-1);
|
||
font-style: italic;
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
.ollama-thinking-indicator::before {
|
||
content: '';
|
||
display: inline-block;
|
||
width: 0.9em;
|
||
height: 0.9em;
|
||
border: 2px solid var(--text-muted);
|
||
border-top-color: transparent;
|
||
border-radius: 50%;
|
||
animation: ollama-spin 1s linear infinite;
|
||
}
|
||
|
||
@keyframes ollama-spin {
|
||
to {
|
||
transform: rotate(360deg);
|
||
}
|
||
}
|
||
|
||
/* Proposed Actions Preview */
|
||
.ollama-proposed-actions {
|
||
margin-top: var(--size-4-2);
|
||
padding: var(--size-4-2);
|
||
border: 1px solid var(--ollama-border);
|
||
border-radius: var(--ollama-radius);
|
||
background-color: var(--background-primary);
|
||
}
|
||
|
||
.ollama-proposed-actions-header {
|
||
font-weight: var(--font-semibold);
|
||
font-size: var(--font-ui-small);
|
||
margin-bottom: var(--size-4-2);
|
||
color: var(--text-normal);
|
||
}
|
||
|
||
.ollama-proposed-action {
|
||
margin-bottom: var(--size-4-2);
|
||
padding: var(--size-4-1);
|
||
border: 1px solid var(--ollama-border);
|
||
border-radius: var(--ollama-radius);
|
||
background-color: var(--background-primary-alt);
|
||
}
|
||
|
||
.ollama-action-description {
|
||
font-weight: var(--font-medium);
|
||
font-size: var(--font-ui-small);
|
||
margin-bottom: var(--size-4-1);
|
||
color: var(--text-normal);
|
||
}
|
||
|
||
.ollama-action-diff {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--size-4-1);
|
||
}
|
||
|
||
.ollama-diff-before,
|
||
.ollama-diff-after {
|
||
margin: 0;
|
||
padding: var(--size-4-1);
|
||
border-radius: var(--ollama-radius);
|
||
font-size: var(--font-smallest);
|
||
font-family: var(--font-monospace);
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
max-height: 8rem;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.ollama-diff-before {
|
||
background-color: var(--background-modifier-error);
|
||
color: var(--text-normal);
|
||
}
|
||
|
||
.ollama-diff-after {
|
||
background-color: var(--background-modifier-success);
|
||
color: var(--text-normal);
|
||
}
|
||
|
||
.ollama-action-buttons {
|
||
display: flex;
|
||
gap: var(--size-4-1);
|
||
margin-top: var(--size-4-2);
|
||
}
|
||
|
||
.ollama-apply-button {
|
||
padding: var(--size-4-1) var(--size-4-2);
|
||
border-radius: var(--ollama-radius);
|
||
border: none;
|
||
background-color: var(--interactive-accent);
|
||
color: var(--text-on-accent);
|
||
font-weight: var(--font-semibold);
|
||
font-size: var(--font-ui-small);
|
||
cursor: pointer;
|
||
transition: filter 0.15s ease;
|
||
}
|
||
|
||
.ollama-apply-button:hover {
|
||
filter: brightness(1.1);
|
||
}
|
||
|
||
.ollama-cancel-button {
|
||
padding: var(--size-4-1) var(--size-4-2);
|
||
border-radius: var(--ollama-radius);
|
||
border: 1px solid var(--ollama-border);
|
||
background-color: var(--background-modifier-form-field);
|
||
color: var(--text-normal);
|
||
font-weight: var(--font-semibold);
|
||
font-size: var(--font-ui-small);
|
||
cursor: pointer;
|
||
transition: background-color 0.15s ease;
|
||
}
|
||
|
||
.ollama-cancel-button:hover {
|
||
background-color: var(--background-modifier-hover);
|
||
}
|
||
|
||
/* Agent Mode Selector */
|
||
.ollama-mode-selector {
|
||
padding: var(--size-4-1) var(--size-4-2);
|
||
border-radius: var(--ollama-radius);
|
||
border: 1px solid var(--ollama-border);
|
||
background-color: var(--background-modifier-form-field);
|
||
color: var(--text-normal);
|
||
font-size: var(--font-ui-small);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ollama-mode-selector:focus {
|
||
outline: none;
|
||
border-color: var(--interactive-accent);
|
||
}
|
||
|
||
/* Model Selector */
|
||
.ollama-model-selector {
|
||
padding: var(--size-4-1) var(--size-4-2);
|
||
border-radius: var(--ollama-radius);
|
||
border: 1px solid var(--ollama-border);
|
||
background-color: var(--background-modifier-form-field);
|
||
color: var(--text-normal);
|
||
font-size: var(--font-ui-small);
|
||
cursor: pointer;
|
||
max-width: 10rem;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.ollama-model-selector:focus {
|
||
outline: none;
|
||
border-color: var(--interactive-accent);
|
||
}
|
||
|
||
/* Chat History Selector */
|
||
.ollama-history-selector {
|
||
padding: var(--size-4-1) var(--size-4-2);
|
||
border-radius: var(--ollama-radius);
|
||
border: 1px solid var(--ollama-border);
|
||
background-color: var(--background-modifier-form-field);
|
||
color: var(--text-normal);
|
||
font-size: var(--font-ui-small);
|
||
cursor: pointer;
|
||
max-width: 12rem;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.ollama-history-selector:focus {
|
||
outline: none;
|
||
border-color: var(--interactive-accent);
|
||
}
|
||
|
||
.ollama-history-delete-button {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: var(--size-4-1);
|
||
padding: var(--size-4-1) var(--size-4-2);
|
||
font-size: var(--font-smallest);
|
||
border-radius: var(--ollama-radius);
|
||
border: 1px solid var(--ollama-border);
|
||
background-color: var(--background-modifier-form-field);
|
||
color: var(--text-normal);
|
||
cursor: pointer;
|
||
transition: background-color 0.15s ease;
|
||
}
|
||
|
||
.ollama-history-delete-button:hover {
|
||
background-color: var(--background-modifier-error-hover);
|
||
color: var(--text-error);
|
||
}
|
||
|
||
/* Show Logs Button */
|
||
.ollama-show-logs-button {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: var(--size-4-1);
|
||
padding: var(--size-4-1) var(--size-4-2);
|
||
font-size: var(--font-smallest);
|
||
border-radius: var(--ollama-radius);
|
||
border: 1px solid var(--ollama-border);
|
||
background-color: var(--background-modifier-form-field);
|
||
color: var(--text-normal);
|
||
cursor: pointer;
|
||
transition: background-color 0.15s ease;
|
||
}
|
||
|
||
.ollama-show-logs-button:hover {
|
||
background-color: var(--background-modifier-hover);
|
||
}
|
||
|
||
/* Logs Panel */
|
||
.ollama-logs-container {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
padding: var(--size-4-1) var(--size-4-2);
|
||
max-height: 12rem;
|
||
overflow-y: auto;
|
||
background-color: var(--ollama-log-bg);
|
||
border-top: 1px solid var(--ollama-border);
|
||
border-bottom: 1px solid var(--ollama-border);
|
||
font-family: var(--font-monospace);
|
||
font-size: var(--font-smallest);
|
||
}
|
||
|
||
.ollama-log-row {
|
||
display: flex;
|
||
gap: var(--size-4-1);
|
||
align-items: baseline;
|
||
line-height: var(--line-height-tight);
|
||
}
|
||
|
||
.ollama-log-time {
|
||
color: var(--text-faint);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.ollama-log-level {
|
||
flex-shrink: 0;
|
||
font-weight: var(--font-semibold);
|
||
text-transform: uppercase;
|
||
min-width: 3em;
|
||
}
|
||
|
||
.ollama-log-level-debug {
|
||
color: var(--ollama-log-debug);
|
||
}
|
||
|
||
.ollama-log-level-info {
|
||
color: var(--ollama-log-info);
|
||
}
|
||
|
||
.ollama-log-level-warn {
|
||
color: var(--ollama-log-warn);
|
||
}
|
||
|
||
.ollama-log-level-error {
|
||
color: var(--ollama-log-error);
|
||
}
|
||
|
||
.ollama-log-category {
|
||
color: var(--text-muted);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.ollama-log-message {
|
||
color: var(--text-normal);
|
||
word-break: break-word;
|
||
}
|
||
|
||
/* Activity Indicator */
|
||
.ollama-activity-indicator {
|
||
display: none;
|
||
align-items: center;
|
||
gap: var(--size-4-1);
|
||
padding: var(--size-4-1) var(--size-4-1);
|
||
font-size: var(--font-ui-small);
|
||
color: var(--text-muted);
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.ollama-activity-dot {
|
||
display: inline-block;
|
||
width: 0.6rem;
|
||
height: 0.6rem;
|
||
border-radius: 50%;
|
||
background-color: var(--interactive-accent);
|
||
animation: ollama-pulse 1.2s ease-in-out infinite;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.ollama-activity-text {
|
||
font-style: italic;
|
||
}
|
||
|
||
@keyframes ollama-pulse {
|
||
0%,
|
||
100% {
|
||
opacity: 1;
|
||
transform: scale(1);
|
||
}
|
||
50% {
|
||
opacity: 0.4;
|
||
transform: scale(0.8);
|
||
}
|
||
}
|
||
|
||
/* Disabled input/send during activity */
|
||
.ollama-input:disabled,
|
||
.ollama-send-button:disabled {
|
||
opacity: 0.6;
|
||
cursor: not-allowed;
|
||
}
|