mirror of
https://github.com/gengyabc/obsidian-pi-plugin.git
synced 2026-07-22 07:03:42 +00:00
- Replace activeWindow.setTimeout/clearTimeout with window timers - Change timer type annotations to number for browser compatibility - Remove unnecessary await on synchronous ensureConnection() - Cast require() results to proper types in pi-config-reader - Remove unused imports (ModelInfo, readProviders) from settings - Use generic querySelector<T> instead of type assertion - Handle errorMessage as string or object to prevent [object Object] - Replace CSS !important with higher specificity selectors - Merge duplicate .pi-message-label CSS selectors - Update README title to match manifest.json name (PiChat)
1001 lines
20 KiB
CSS
1001 lines
20 KiB
CSS
/* Pi Plugin — Chat View Styles */
|
|
|
|
/* Utility: hide elements via CSS class instead of inline styles */
|
|
/* Use higher specificity by scoping to plugin container */
|
|
.pi-chat-container .pi-session-panel.is-hidden,
|
|
.pi-chat-container .pi-attachments.is-hidden,
|
|
.pi-chat-container .pi-abort-btn.is-hidden,
|
|
.pi-chat-container .pi-header-model.is-hidden,
|
|
.pi-chat-container .pi-header-cwd.is-hidden,
|
|
.pi-chat-container .pi-env-var-container.is-hidden {
|
|
display: none;
|
|
}
|
|
|
|
/* Env var hint container for provider dropdown */
|
|
.pi-env-var-container {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-top: 8px;
|
|
padding: 8px 12px;
|
|
background: var(--background-secondary);
|
|
border-radius: var(--radius-s);
|
|
}
|
|
|
|
.pi-env-var-hint {
|
|
flex: 1;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.pi-env-var-add-btn {
|
|
padding: 4px 12px;
|
|
font-size: var(--font-ui-small);
|
|
border-radius: var(--radius-s);
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.pi-env-var-add-btn:hover:not(:disabled) {
|
|
background: var(--interactive-accent-hover);
|
|
}
|
|
|
|
.pi-env-var-add-btn:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* Platform help spacing */
|
|
.pi-platform-help {
|
|
margin-left: 0;
|
|
margin-top: 0.5em;
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
/* ── Layout ── */
|
|
.pi-chat-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
}
|
|
|
|
/* ── Header Bar ── */
|
|
.pi-header-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 6px 12px;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
background: var(--background-secondary);
|
|
flex-shrink: 0;
|
|
min-height: 32px;
|
|
gap: 8px;
|
|
}
|
|
|
|
.pi-header-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
min-width: 0;
|
|
flex: 1;
|
|
}
|
|
|
|
.pi-header-right {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.pi-header-session-name {
|
|
font-weight: 600;
|
|
font-size: 0.9em;
|
|
cursor: pointer;
|
|
padding: 2px 4px;
|
|
border-radius: 4px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
max-width: 200px;
|
|
}
|
|
|
|
.pi-header-session-name:hover {
|
|
background: var(--background-modifier-hover);
|
|
}
|
|
|
|
.pi-header-name-input {
|
|
font-weight: 600;
|
|
font-size: 0.9em;
|
|
border: 1px solid var(--interactive-accent);
|
|
border-radius: 4px;
|
|
padding: 1px 4px;
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
width: 180px;
|
|
outline: none;
|
|
}
|
|
|
|
.pi-header-model {
|
|
font-size: 0.75em;
|
|
color: var(--text-muted);
|
|
background: var(--background-primary-alt);
|
|
padding: 1px 6px;
|
|
border-radius: 8px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.pi-header-cwd {
|
|
font-size: 0.75em;
|
|
color: var(--text-muted);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
max-width: 150px;
|
|
}
|
|
|
|
.pi-header-new-btn {
|
|
font-size: 0.8em;
|
|
padding: 2px 10px;
|
|
border-radius: 4px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
background: var(--background-primary);
|
|
color: var(--text-muted);
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.pi-header-new-btn:hover {
|
|
background: var(--background-modifier-hover);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.pi-header-new-btn:focus-visible {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* ── Chat Body (panel + messages) ── */
|
|
.pi-chat-body {
|
|
display: flex;
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ── Session Panel ── */
|
|
.pi-session-panel {
|
|
width: 280px;
|
|
min-width: 280px;
|
|
border-right: 1px solid var(--background-modifier-border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: var(--background-primary);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.pi-session-panel-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 8px 12px;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.pi-session-panel-title {
|
|
font-weight: 600;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.pi-session-panel-close {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
color: var(--text-muted);
|
|
font-size: 1.1em;
|
|
padding: 0 4px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.pi-session-panel-close:hover {
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.pi-session-panel-close:focus-visible {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
.pi-session-panel-search {
|
|
margin: 8px;
|
|
padding: 4px 8px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-size: 0.85em;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.pi-session-panel-search:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
.pi-session-panel-list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 0 4px 8px;
|
|
}
|
|
|
|
.pi-session-panel-empty {
|
|
padding: 16px 12px;
|
|
color: var(--text-muted);
|
|
font-size: 0.85em;
|
|
text-align: center;
|
|
}
|
|
|
|
.pi-session-entry {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
padding: 8px;
|
|
margin: 2px 0;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
gap: 4px;
|
|
}
|
|
|
|
.pi-session-entry:hover {
|
|
background: var(--background-modifier-hover);
|
|
}
|
|
|
|
.pi-session-entry-active {
|
|
background: var(--background-modifier-active-hover);
|
|
border-left: 3px solid var(--interactive-accent);
|
|
}
|
|
|
|
.pi-session-entry-content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.pi-session-entry-name {
|
|
font-weight: 600;
|
|
font-size: 0.85em;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.pi-session-entry-meta {
|
|
font-size: 0.75em;
|
|
color: var(--text-muted);
|
|
margin-top: 2px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.pi-session-entry-cwd {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.pi-session-entry-preview {
|
|
font-size: 0.75em;
|
|
color: var(--text-faint);
|
|
margin-top: 2px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.pi-session-entry-actions {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
opacity: 0;
|
|
transition: opacity 0.15s;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.pi-session-entry:hover .pi-session-entry-actions {
|
|
opacity: 1;
|
|
}
|
|
|
|
.pi-session-action-btn {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 2px;
|
|
font-size: 0.8em;
|
|
border-radius: 2px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.pi-session-action-btn:hover {
|
|
background: var(--background-modifier-hover);
|
|
}
|
|
|
|
.pi-session-action-btn:focus-visible {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.pi-session-action-delete:hover {
|
|
background: var(--background-modifier-error-hover);
|
|
}
|
|
|
|
.pi-header-sessions-btn {
|
|
font-size: 0.85em;
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
background: var(--background-primary);
|
|
color: var(--text-muted);
|
|
cursor: pointer;
|
|
margin-right: 4px;
|
|
}
|
|
|
|
.pi-header-sessions-btn:hover {
|
|
background: var(--background-modifier-hover);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.pi-header-sessions-btn:focus-visible {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.pi-messages {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 12px;
|
|
}
|
|
|
|
.pi-input-container {
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
padding: 8px 12px;
|
|
min-height: 40px;
|
|
}
|
|
|
|
/* ── Messages ── */
|
|
.pi-message {
|
|
margin-bottom: 20px;
|
|
padding-bottom: 16px;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
user-select: text;
|
|
}
|
|
|
|
.pi-message:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.pi-message-label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.pi-message-label-text {
|
|
font-size: 0.8em;
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
/* ── User messages ── */
|
|
.pi-message-user .pi-message-content {
|
|
background: var(--background-modifier-form-field);
|
|
border-radius: 8px;
|
|
padding: 8px 12px;
|
|
}
|
|
|
|
.pi-message-content,
|
|
.pi-message-content * {
|
|
user-select: text;
|
|
}
|
|
|
|
.pi-message-user .pi-message-content p {
|
|
margin: 0;
|
|
}
|
|
|
|
/* ── Steering messages ── */
|
|
.pi-message-steer .pi-message-content {
|
|
background: var(--background-modifier-error-hover);
|
|
border-left: 3px solid var(--text-accent);
|
|
}
|
|
|
|
.pi-message-steer .pi-message-label-text {
|
|
color: var(--text-accent);
|
|
}
|
|
|
|
/* ── Assistant messages ── */
|
|
.pi-message-assistant .pi-message-content {
|
|
padding: 4px 0;
|
|
}
|
|
|
|
/* Assistant message error display */
|
|
.pi-message-assistant .pi-message-error {
|
|
background: var(--background-modifier-error);
|
|
color: var(--text-error);
|
|
padding: 8px 12px;
|
|
border-radius: var(--radius-s);
|
|
margin-bottom: 8px;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.pi-message-assistant .pi-message-error strong {
|
|
color: var(--text-error);
|
|
}
|
|
|
|
/* Tighten markdown spacing inside assistant messages */
|
|
.pi-message-assistant .pi-message-content > *:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.pi-message-assistant .pi-message-content > *:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* ── Tool call messages ── */
|
|
.pi-message-tool details {
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
padding: 4px 8px;
|
|
}
|
|
|
|
.pi-message-tool summary {
|
|
cursor: pointer;
|
|
font-family: var(--font-monospace);
|
|
font-size: 0.85em;
|
|
padding: 4px 0;
|
|
user-select: none;
|
|
}
|
|
|
|
.pi-message-tool summary:hover {
|
|
color: var(--text-accent);
|
|
}
|
|
|
|
.pi-tool-name {
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.pi-tool-error-indicator {
|
|
color: var(--text-error);
|
|
margin-left: 4px;
|
|
}
|
|
|
|
.pi-message-tool-error details {
|
|
border-color: var(--text-error);
|
|
}
|
|
|
|
.pi-tool-body {
|
|
padding: 8px 0 4px;
|
|
}
|
|
|
|
.pi-tool-section-label {
|
|
font-size: 0.75em;
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.pi-tool-args pre,
|
|
.pi-tool-result pre {
|
|
font-size: 0.85em;
|
|
margin: 0;
|
|
padding: 6px 8px;
|
|
background: var(--background-primary-alt);
|
|
border-radius: 4px;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.pi-tool-result {
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.pi-tool-result-content {
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
/* ── Input area ── */
|
|
.pi-input-area {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
gap: 8px;
|
|
}
|
|
|
|
.pi-input-textarea {
|
|
flex: 1;
|
|
resize: none;
|
|
min-height: 36px;
|
|
height: var(--pi-input-height, 36px);
|
|
max-height: 200px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 6px;
|
|
padding: 8px;
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-family: var(--font-text);
|
|
font-size: var(--font-text-size);
|
|
line-height: 1.4;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.pi-input-textarea:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
.pi-input-textarea.pi-input-disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* ── Abort button ── */
|
|
.pi-abort-btn {
|
|
padding: 4px 12px;
|
|
border-radius: 4px;
|
|
background: var(--color-red);
|
|
color: var(--text-on-accent);
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 0.85em;
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.pi-abort-btn:hover {
|
|
background: var(--color-red);
|
|
filter: brightness(0.85);
|
|
}
|
|
|
|
.pi-abort-btn:focus-visible {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* ── Attachment chips ── */
|
|
.pi-attachments {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 4px;
|
|
padding: 4px 0;
|
|
}
|
|
|
|
.pi-attachment-chip {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
background: var(--background-secondary);
|
|
border-radius: 12px;
|
|
padding: 2px 8px;
|
|
font-size: 0.8em;
|
|
}
|
|
|
|
.pi-attachment-name {
|
|
max-width: 150px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.pi-attachment-remove {
|
|
cursor: pointer;
|
|
opacity: 0.6;
|
|
font-size: 1.1em;
|
|
line-height: 1;
|
|
}
|
|
|
|
.pi-attachment-remove:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
.pi-attachment-thumb {
|
|
flex-shrink: 0;
|
|
width: 16px;
|
|
height: 16px;
|
|
object-fit: cover;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
/* ── Thinking ── */
|
|
.pi-thinking {
|
|
margin-bottom: 8px;
|
|
font-size: 0.85em;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.pi-thinking summary {
|
|
cursor: pointer;
|
|
user-select: none;
|
|
font-style: italic;
|
|
}
|
|
|
|
.pi-thinking-content {
|
|
padding: 4px 0 4px 12px;
|
|
border-left: 2px solid var(--background-modifier-border);
|
|
margin-top: 4px;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
/* Live thinking — pulsing summary while streaming */
|
|
.pi-thinking-live summary {
|
|
animation: pi-pulse 1.5s ease-in-out infinite;
|
|
}
|
|
|
|
.pi-thinking-live .pi-thinking-content {
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
@keyframes pi-pulse {
|
|
0%, 100% { opacity: 0.4; }
|
|
50% { opacity: 1; }
|
|
}
|
|
|
|
/* ── Status bar ── */
|
|
.pi-status-bar {
|
|
padding: 0 8px;
|
|
}
|
|
|
|
/* ── Command suggest ── */
|
|
.pi-command-suggest-item {
|
|
padding: 4px 0;
|
|
}
|
|
|
|
.pi-command-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.pi-command-name {
|
|
font-weight: 600;
|
|
font-family: var(--font-monospace);
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.pi-command-source {
|
|
font-size: 0.7em;
|
|
color: var(--text-faint);
|
|
background: var(--background-primary-alt);
|
|
padding: 0 4px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.pi-command-desc {
|
|
color: var(--text-muted);
|
|
font-size: 0.8em;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
/* ── Read-only banner ── */
|
|
.pi-readonly-banner {
|
|
padding: 6px 12px;
|
|
background: var(--background-secondary);
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
color: var(--text-muted);
|
|
font-size: 0.85em;
|
|
text-align: center;
|
|
}
|
|
|
|
/* ── Session list modal ── */
|
|
.pi-session-suggest-item {
|
|
padding: 4px 0;
|
|
}
|
|
|
|
.pi-session-date {
|
|
font-weight: 600;
|
|
font-size: 0.9em;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.pi-session-preview {
|
|
color: var(--text-muted);
|
|
font-size: 0.8em;
|
|
margin-top: 2px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* ── Rewind button (user message actions) ── */
|
|
.pi-message-actions {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
opacity: 0;
|
|
transition: opacity 120ms ease;
|
|
}
|
|
|
|
.pi-message-user:hover .pi-message-actions,
|
|
.pi-message-user:focus-within .pi-message-actions {
|
|
opacity: 1;
|
|
}
|
|
|
|
.pi-message-rewind-btn {
|
|
border: 1px solid var(--background-modifier-border);
|
|
background: var(--background-secondary);
|
|
color: var(--text-muted);
|
|
border-radius: 6px;
|
|
padding: 1px 6px;
|
|
font-size: 12px;
|
|
line-height: 18px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.pi-message-rewind-btn:hover {
|
|
color: var(--text-normal);
|
|
background: var(--background-modifier-hover);
|
|
}
|
|
|
|
.pi-message-rewind-btn.is-disabled,
|
|
.pi-message-rewind-btn:disabled {
|
|
opacity: 0.4;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* ── Return to latest banner ── */
|
|
.pi-return-banner {
|
|
margin: 8px 12px;
|
|
padding: 8px 10px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 8px;
|
|
background: var(--background-secondary);
|
|
color: var(--text-muted);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
max-width: 520px;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
.pi-return-banner-text {
|
|
font-size: 0.85em;
|
|
}
|
|
|
|
.pi-return-latest-btn {
|
|
border: 1px solid var(--interactive-accent);
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
border-radius: 6px;
|
|
padding: 2px 8px;
|
|
cursor: pointer;
|
|
font-size: 0.85em;
|
|
}
|
|
|
|
.pi-return-latest-btn:hover {
|
|
filter: brightness(0.9);
|
|
}
|
|
|
|
.pi-return-latest-btn:focus-visible {
|
|
outline: 2px solid var(--text-normal);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* ── Thinking indicator (waiting for Pi) ── */
|
|
.pi-thinking-indicator {
|
|
margin-bottom: 20px;
|
|
padding-bottom: 16px;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.pi-thinking-indicator-content {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 4px 0;
|
|
font-size: 0.85em;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.pi-thinking-dots {
|
|
display: inline-flex;
|
|
gap: 2px;
|
|
}
|
|
|
|
.pi-thinking-dots::before,
|
|
.pi-thinking-dots::after {
|
|
content: "";
|
|
display: inline-block;
|
|
width: 4px;
|
|
height: 4px;
|
|
background: var(--text-muted);
|
|
border-radius: 50%;
|
|
animation: pi-bounce 1.4s ease-in-out infinite;
|
|
}
|
|
|
|
.pi-thinking-dots::before {
|
|
animation-delay: 0s;
|
|
}
|
|
|
|
.pi-thinking-dots::after {
|
|
animation-delay: 0.2s;
|
|
margin-left: 2px;
|
|
}
|
|
|
|
/* Third dot using text trick */
|
|
.pi-thinking-text::before {
|
|
content: "";
|
|
display: inline-block;
|
|
width: 4px;
|
|
height: 4px;
|
|
background: var(--text-muted);
|
|
border-radius: 50%;
|
|
margin-right: 4px;
|
|
animation: pi-bounce 1.4s ease-in-out infinite;
|
|
animation-delay: 0.4s;
|
|
}
|
|
|
|
@keyframes pi-bounce {
|
|
0%, 80%, 100% {
|
|
transform: translateY(0);
|
|
opacity: 0.4;
|
|
}
|
|
40% {
|
|
transform: translateY(-6px);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* ── Permission Modal ── */
|
|
.pi-permission-modal {
|
|
padding: 20px;
|
|
max-width: 500px;
|
|
}
|
|
|
|
.pi-permission-modal h2 {
|
|
margin-bottom: 16px;
|
|
text-align: center;
|
|
}
|
|
|
|
.pi-permission-modal p {
|
|
margin-bottom: 20px;
|
|
text-align: center;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.pi-permission-options {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.pi-permission-option-btn {
|
|
width: 100%;
|
|
padding: 12px 16px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
background: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
text-align: left;
|
|
transition: background 0.15s, border-color 0.15s;
|
|
}
|
|
|
|
.pi-permission-option-btn:hover {
|
|
background: var(--background-modifier-hover);
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
.pi-permission-cancel-btn {
|
|
width: 100%;
|
|
padding: 10px 16px;
|
|
border: none;
|
|
background: var(--background-modifier-error);
|
|
color: var(--text-on-accent);
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
transition: background 0.15s;
|
|
}
|
|
|
|
.pi-permission-cancel-btn:hover {
|
|
background: var(--text-error);
|
|
}
|
|
|
|
.pi-permission-buttons {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.pi-permission-buttons button {
|
|
flex: 1;
|
|
padding: 10px 16px;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
transition: background 0.15s;
|
|
}
|
|
|
|
.pi-permission-confirm-btn {
|
|
border: none;
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.pi-permission-confirm-btn:hover {
|
|
background: var(--interactive-accent-hover);
|
|
}
|
|
|
|
.pi-permission-input {
|
|
width: 100%;
|
|
padding: 12px 16px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.pi-permission-input:focus {
|
|
border-color: var(--interactive-accent);
|
|
outline: none;
|
|
}
|
|
|
|
/* ── API Key Info Section (Settings) ── */
|
|
.pi-api-key-info {
|
|
padding: 12px;
|
|
margin-bottom: 16px;
|
|
background: var(--background-secondary);
|
|
border-radius: 8px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.pi-api-key-info p {
|
|
margin: 4px 0;
|
|
font-size: 0.85em;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.pi-api-key-info code {
|
|
background: var(--background-primary-alt);
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
font-size: 0.85em;
|
|
}
|
|
|
|
.pi-api-keys-missing {
|
|
color: var(--text-error);
|
|
}
|
|
|
|
.pi-api-keys-detected {
|
|
color: var(--text-success);
|
|
}
|
|
|
|
.pi-env-status-ok {
|
|
color: var(--text-success);
|
|
}
|
|
|
|
.pi-env-status-missing {
|
|
color: var(--text-error);
|
|
}
|
|
|
|
/* ── API Key Input Width (Settings) ── */
|
|
.pi-api-key-input {
|
|
width: 100%;
|
|
}
|
|
|
|
/* ── API Key Required for Selected Provider (highlighted) ── */
|
|
.setting-item.pi-api-key-setting .pi-api-key-input.pi-api-key-required {
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 1px var(--interactive-accent);
|
|
}
|
|
|
|
.setting-item.pi-api-key-setting .pi-api-key-input.pi-api-key-required:focus {
|
|
border-color: var(--interactive-accent);
|
|
box-shadow: 0 0 0 2px var(--interactive-accent);
|
|
}
|
|
|