Newer
Older
abysiuscodium / extensions / abysius-ai / assets / chat.css
:root {
    --bg-primary: var(--vscode-editor-background, #1e1e1e);
    --bg-secondary: var(--vscode-panel-background, #252526);
    --bg-input: var(--vscode-input-background, #3c3c3c);
    --fg-primary: var(--vscode-foreground, #cccccc);
    --fg-secondary: var(--vscode-descriptionForeground, #858585);
    --accent: var(--vscode-button-background, #0e639c);
    --accent-hover: var(--vscode-button-hoverBackground, #1177bb);
    --border: var(--vscode-panel-border, #3e3e42);
    --code-bg: var(--vscode-textCodeBlock-background, #1e1e1e);
    --user-msg-bg: var(--vscode-button-background, #0e639c);
    --assistant-msg-bg: var(--vscode-panel-background, #252526);
    --scrollbar: var(--vscode-scrollbarSlider-background, rgba(121, 121, 121, 0.4));
    --error: var(--vscode-errorForeground, #f48771);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--vscode-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 13px;
    color: var(--fg-primary);
    background: var(--bg-primary);
    height: 100vh;
    overflow: hidden;
}

#chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#messages::-webkit-scrollbar {
    width: 8px;
}

#messages::-webkit-scrollbar-track {
    background: transparent;
}

#messages::-webkit-scrollbar-thumb {
    background: var(--scrollbar);
    border-radius: 4px;
}

.message {
    max-width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
    animation: slideIn 0.15s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-10px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.message.user {
    background: var(--user-msg-bg);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.message.assistant {
    background: var(--assistant-msg-bg);
    border: 1px solid var(--border);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.assistant.streaming {
    border-left: 2px solid var(--accent);
}

.message-time {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 4px;
    text-align: right;
}

/* Code blocks */
.message pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
    overflow-x: auto;
    position: relative;
}

.message pre code {
    font-family: var(--vscode-editor-font-family, 'Consolas', 'Monaco', monospace);
    font-size: 12px;
    line-height: 1.4;
    color: var(--fg-primary);
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    font-size: 11px;
    color: var(--fg-secondary);
}

.code-block-actions {
    display: flex;
    gap: 4px;
}

.code-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--fg-secondary);
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.1s;
}

.code-btn:hover {
    background: var(--bg-input);
    color: var(--fg-primary);
}

/* Inline code */
.message code:not(pre code) {
    background: var(--code-bg);
    padding: 1px 4px;
    border-radius: 3px;
    font-family: var(--vscode-editor-font-family, monospace);
    font-size: 12px;
}

/* Input area */
#input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    align-items: flex-end;
}

#message-input {
    flex: 1;
    background: var(--bg-input);
    color: var(--fg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    resize: none;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.4;
    max-height: 120px;
    min-height: 36px;
    outline: none;
    transition: border-color 0.15s;
}

#message-input:focus {
    border-color: var(--accent);
}

#message-input::placeholder {
    color: var(--fg-secondary);
}

#send-btn,
#cancel-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s;
    white-space: nowrap;
    height: fit-content;
}

#send-btn {
    background: var(--accent);
    color: #fff;
}

#send-btn:hover {
    background: var(--accent-hover);
}

#send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#cancel-btn {
    background: var(--bg-input);
    color: var(--fg-primary);
    border: 1px solid var(--border);
}

#cancel-btn:hover {
    background: var(--bg-secondary);
}

/* Loading indicator */
.streaming-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 4px;
}

.streaming-indicator span {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 1.2s infinite;
}

.streaming-indicator span:nth-child(2) { animation-delay: 0.2s; }
.streaming-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

/* Error state */
.message.error {
    background: rgba(244, 135, 113, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

/* Welcome message */
.welcome {
    text-align: center;
    padding: 40px 20px;
    color: var(--fg-secondary);
}

.welcome h3 {
    color: var(--fg-primary);
    margin-bottom: 8px;
    font-size: 16px;
}

.welcome p {
    font-size: 12px;
    line-height: 1.6;
}

/* Markdown content */
.message p {
    margin: 0 0 8px 0;
}

.message p:last-child {
    margin-bottom: 0;
}

.message ul,
.message ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message li {
    margin: 2px 0;
}

.message a {
    color: var(--accent);
    text-decoration: none;
}

.message a:hover {
    text-decoration: underline;
}

.message blockquote {
    border-left: 3px solid var(--accent);
    margin: 8px 0;
    padding-left: 12px;
    color: var(--fg-secondary);
}

.message table {
    border-collapse: collapse;
    margin: 8px 0;
    width: 100%;
}

.message th,
.message td {
    border: 1px solid var(--border);
    padding: 6px 10px;
    text-align: left;
}

.message th {
    background: var(--bg-secondary);
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--fg-secondary);
    text-align: center;
    padding: 20px;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}