add diff viewer prefs and task session shortcut

This commit is contained in:
Shantur Rathore
2025-11-08 12:53:51 +00:00
parent f59c36f6f8
commit 81ab3a40ed
12 changed files with 595 additions and 46 deletions

View File

@@ -583,11 +583,46 @@ button.button-primary {
}
.tool-call-header-label {
@apply flex items-center gap-2 font-semibold text-sm;
@apply flex items-center justify-between gap-2 font-semibold text-sm;
color: var(--text-muted);
margin-bottom: 1px;
}
.tool-call-header-meta {
@apply flex items-center gap-2;
}
.tool-call-header-button {
background-color: transparent;
border: 1px solid var(--border-base);
color: var(--text-muted);
padding: 0.15rem 0.75rem;
border-radius: 0.375rem;
font-size: 0.75rem;
font-weight: var(--font-weight-semibold);
line-height: 1;
display: inline-flex;
align-items: center;
justify-content: center;
height: 1.5rem;
transition: all 0.2s ease;
}
.tool-call-header-button:hover:not(:disabled) {
background-color: var(--surface-hover);
border-color: var(--accent-primary);
color: var(--accent-primary);
}
.tool-call-header-button:active:not(:disabled) {
transform: scale(0.95);
}
.tool-call-header-button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.tool-call-header-label .tool-call-icon {
@apply text-base;
}
@@ -667,8 +702,14 @@ button.button-primary {
@apply border rounded-md overflow-hidden;
border-color: var(--border-base);
color: inherit;
--tool-call-line-unit: 1.4em;
--tool-call-lines-compact: 24;
--tool-call-lines-large: 48;
--tool-call-max-height-compact: calc(var(--tool-call-lines-compact) * var(--tool-call-line-unit));
--tool-call-max-height-large: calc(var(--tool-call-lines-large) * var(--tool-call-line-unit));
}
.tool-call-message .tool-call {
border: none;
border-radius: 0;
@@ -746,11 +787,12 @@ button.button-primary {
white-space: pre-wrap;
word-wrap: break-word;
overflow-wrap: break-word;
max-height: calc(10 * 1.4em);
overflow-y: auto;
max-height: var(--tool-call-max-height-compact, calc(25 * 1.4em));
overflow-y: scroll;
}
.tool-call-details {
@apply flex flex-col;
background-color: var(--surface-code);
font-size: var(--font-size-xs);
@@ -763,8 +805,8 @@ button.button-primary {
padding: 0;
font-size: var(--font-size-xs);
line-height: var(--line-height-tight);
max-height: calc(15 * 1.4em);
overflow-y: auto;
max-height: var(--tool-call-max-height-compact, calc(25 * 1.4em));
overflow-y: scroll;
scrollbar-width: thin;
scrollbar-color: var(--border-base) transparent;
scrollbar-gutter: stable both-edges;
@@ -772,10 +814,84 @@ button.button-primary {
}
.tool-call-markdown-large {
max-height: calc(50 * 1.4em);
max-height: var(--tool-call-max-height-large, calc(48 * 1.4em));
}
.tool-call-diff-shell {
padding: 0;
}
.tool-call-diff-viewer {
max-height: var(--tool-call-max-height-large, calc(48 * 1.4em));
overflow: auto;
background-color: var(--surface-code);
}
.tool-call-diff-toolbar {
@apply flex items-center justify-between gap-3 px-3 py-2;
background-color: var(--surface-secondary);
border-bottom: 1px solid var(--border-base);
}
.tool-call-diff-toolbar-label {
font-size: 11px;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.08em;
}
.tool-call-diff-toggle {
@apply inline-flex items-center gap-1;
}
.tool-call-diff-mode-button {
@apply border text-xs font-semibold px-3 py-1 rounded transition-all duration-150;
border-color: var(--border-base);
background-color: transparent;
color: var(--text-muted);
}
.tool-call-diff-mode-button:hover {
background-color: var(--surface-hover);
color: var(--text-primary);
}
.tool-call-diff-mode-button.active {
background-color: var(--accent-primary);
border-color: var(--accent-primary);
color: var(--text-inverted);
}
.tool-call-diff-viewer .diff-tailwindcss-wrapper {
background-color: transparent;
color: inherit;
}
.tool-call-diff-viewer .diff-view-wrapper {
font-family: var(--font-family-mono);
}
.tool-call-diff-fallback {
margin: 0;
padding: 0.75rem;
background-color: var(--surface-code);
font-family: var(--font-family-mono);
font-size: var(--font-size-xs);
line-height: var(--line-height-tight);
}
.tool-call-diff-viewer .diff-line-old-num,
.tool-call-diff-viewer .diff-line-new-num,
.tool-call-diff-viewer .diff-line-num {
width: auto !important;
min-width: 4ch;
padding-left: 0.5rem;
padding-right: 0.5rem;
white-space: nowrap;
}
.tool-call-markdown .markdown-code-block {
margin: 0;
border: none;
background-color: transparent;
@@ -823,11 +939,12 @@ button.button-primary {
background-color: var(--surface-base);
border-radius: 4px;
overflow-x: auto;
max-height: calc(25 * 1.4em);
overflow-y: auto;
max-height: var(--tool-call-max-height-compact, calc(25 * 1.4em));
overflow-y: scroll;
}
.tool-call-section code {
font-family: var(--font-family-mono);
font-size: var(--font-size-xs);
line-height: var(--line-height-tight);
@@ -861,6 +978,24 @@ button.button-primary {
@apply text-base mr-1;
}
.tool-call-action-button {
@apply border text-xs font-semibold px-3 py-1 rounded transition-colors h-8 flex items-center;
border-color: var(--border-base);
color: var(--text-muted);
background-color: transparent;
}
.tool-call-action-button:hover:not(:disabled) {
background-color: var(--surface-hover);
color: var(--text-primary);
}
.tool-call-action-button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.tool-call-bash,
.tool-call-diff {
@apply my-2;