zh-xx_rosypilot/styles.css
Jee C 79e06a913e feat: add 补全法条 command with 元典 API integration
- Register legal provision lookup as an Obsidian command (addCommand)
- Use configured LLM to detect law references from the 50 chars before cursor
- Call Yuandian rh_ft_detail API for exact article lookup, show in sidebar panel
- Two insert modes: raw provision text and LLM-adapted continuation, both as ghost text
- Adapted mode uses quote-colon format, continues from cursor without repeating existing text
- Spinner on "匹配原文" button during LLM rewrite; reasoning_content never exposed
- Auto-remove trigger space typed before "/" to avoid ghost text misalignment
- Settings v2.4.0: add Yuandian API key field with migration from 2.3.0
- New CSS classes for legal panel, item cards, action buttons, and spinner animation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 21:43:23 +08:00

329 lines
6.5 KiB
CSS

/************************************************************/
/* Inline completions */
/************************************************************/
/* Show inline completions text with less opacity */
.rosypilot-completions {
opacity: 0.5;
}
/* Keyboard shortcut hint shown after ghost text */
.rosypilot-completions-hint {
display: inline-block;
margin-left: 4px;
font-size: 0.75em;
opacity: 0.75;
vertical-align: middle;
}
.rosypilot-completions-hint-divider {
margin-right: 6px;
opacity: 0.4;
}
.rosypilot-completions-hint-accept {
color: var(--color-green);
}
.rosypilot-completions-hint-reject {
color: var(--color-red);
}
/************************************************************/
/* Usage progress bar */
/************************************************************/
.rosypilot-usage-progress-wrap {
margin: 4px var(--size-4-3) 12px;
}
.rosypilot-usage-progress-bar {
height: 6px;
border-radius: 3px;
background: var(--background-modifier-border);
overflow: hidden;
margin-bottom: 6px;
}
.rosypilot-usage-progress-fill {
height: 100%;
border-radius: 3px;
background: var(--interactive-accent);
transition: width 0.3s ease;
}
.rosypilot-usage-progress-label {
font-size: 0.8em;
opacity: 0.65;
}
/************************************************************/
/* About card */
/************************************************************/
.rosypilot-about {
margin: 4px var(--size-4-3) 12px;
padding: 10px 14px;
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
background: var(--background-secondary);
line-height: 1.6;
}
.rosypilot-about-title {
font-weight: 600;
font-size: 0.95em;
}
.rosypilot-about-meta {
font-size: 0.85em;
opacity: 0.75;
}
.rosypilot-about-copy {
font-size: 0.8em;
opacity: 0.5;
}
/************************************************************/
/* Debug panel */
/************************************************************/
.rosypilot-debug-toolbar {
display: flex;
justify-content: flex-end;
padding: 6px 8px;
border-bottom: 1px solid var(--background-modifier-border);
background: var(--background-secondary);
flex-shrink: 0;
}
.rosypilot-debug-clear-btn {
padding: 2px 10px;
font-size: 11px;
cursor: pointer;
border-radius: 4px;
border: 1px solid var(--background-modifier-border);
background: var(--background-secondary);
}
.rosypilot-debug-clear-btn:hover {
background: var(--background-modifier-hover);
}
.rosypilot-debug-container {
padding: 8px;
font-size: 12px;
overflow-y: auto;
flex: 1;
min-height: 0;
}
.rosypilot-debug-card {
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
margin-bottom: 8px;
overflow: hidden;
}
.rosypilot-debug-card-open {
border-color: var(--interactive-accent);
}
.rosypilot-debug-card-header {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 10px;
cursor: pointer;
user-select: none;
background: var(--background-secondary);
}
.rosypilot-debug-card-header:hover {
background: var(--background-modifier-hover);
}
.rosypilot-debug-card-context {
font-weight: bold;
font-size: 12px;
white-space: nowrap;
}
.rosypilot-debug-card-preview {
font-size: 11px;
opacity: 0.6;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1;
min-width: 0;
}
.rosypilot-debug-card-actions {
display: flex;
gap: 4px;
flex-shrink: 0;
}
.rosypilot-debug-toggle-btn {
padding: 0 4px;
font-size: 12px;
cursor: pointer;
border: none;
background: none;
line-height: 1;
}
.rosypilot-debug-copy-btn {
padding: 2px 8px;
font-size: 10px;
cursor: pointer;
border-radius: 4px;
border: 1px solid var(--background-modifier-border);
background: var(--background-secondary);
}
.rosypilot-debug-copy-btn:hover {
background: var(--background-modifier-hover);
}
.rosypilot-debug-card-body {
padding: 8px 10px;
border-top: 1px solid var(--background-modifier-border);
}
.rosypilot-debug-section {
margin-bottom: 8px;
}
.rosypilot-debug-section:last-child {
margin-bottom: 0;
}
.rosypilot-debug-section strong {
display: block;
font-size: 10px;
text-transform: uppercase;
opacity: 0.5;
margin-bottom: 2px;
letter-spacing: 0.5px;
}
.rosypilot-debug-section pre {
margin: 0;
padding: 4px 8px;
background-color: var(--background-secondary);
border-radius: 4px;
font-size: 11px;
white-space: pre-wrap;
word-break: break-all;
max-height: 200px;
overflow-y: auto;
}
.rosypilot-debug-message {
margin-bottom: 4px;
}
.rosypilot-debug-message code {
font-size: 10px;
text-transform: uppercase;
opacity: 0.7;
}
.rosypilot-debug-message pre {
margin: 2px 0 0 0;
}
.rosypilot-hidden {
display: none;
}
/************************************************************/
/* Legal panel */
/************************************************************/
.rosypilot-legal-panel {
padding: 8px;
overflow-y: auto;
height: 100%;
box-sizing: border-box;
}
.rosypilot-legal-status {
padding: 12px 4px;
font-size: 0.85em;
opacity: 0.6;
}
.rosypilot-legal-label {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.5px;
opacity: 0.5;
margin-bottom: 6px;
padding: 0 2px;
}
.rosypilot-legal-item {
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
padding: 10px 12px;
margin-bottom: 8px;
background: var(--background-secondary);
}
.rosypilot-legal-item-title {
font-weight: 600;
font-size: 0.9em;
margin-bottom: 6px;
line-height: 1.4;
}
.rosypilot-legal-item-content {
font-size: 0.85em;
line-height: 1.6;
white-space: pre-wrap;
margin-bottom: 6px;
}
.rosypilot-legal-item-meta {
font-size: 0.75em;
opacity: 0.55;
}
.rosypilot-legal-item-actions {
display: flex;
gap: 6px;
margin-top: 8px;
}
.rosypilot-legal-btn {
font-size: 0.8em;
padding: 2px 10px;
border-radius: 4px;
border: 1px solid var(--interactive-accent);
color: var(--interactive-accent);
background: transparent;
cursor: pointer;
}
.rosypilot-legal-btn:hover {
background: var(--interactive-accent);
color: var(--text-on-accent);
}
.rosypilot-legal-btn-spinner {
display: inline-block;
width: 11px;
height: 11px;
border: 2px solid currentColor;
border-top-color: transparent;
border-radius: 50%;
animation: rosypilot-spin 0.6s linear infinite;
}
@keyframes rosypilot-spin {
to { transform: rotate(360deg); }
}