✨ feat(vscode): 问 AI 输入框能粘贴、拖进图片随问题发给 Claude Code,缩略图能点开看大图,图片存进 .spx/code-qa 跟着问答删

This commit is contained in:
cruldra committed 2026-09-26 23:15:02 +08:00
1 parent d9a5c3673e
commit 36d842e18e
28 files changed
+825 -121

No files matched your search

@@ -621,6 +621,107 @@ body:is(.vscode-light, .vscode-high-contrast-light) [data-badge] { --kind: var(-
border: 0;
border-top: 1px solid color-mix(in srgb, var(--vscode-foreground) 12%, transparent);
}
/* 问题带的图片:一排 40px 的缩略图,和回答一样往右缩到问题下面;贴了还没发的在输入框上面,右上角有「去掉」 */
.cr-qa-thumbs {
display: flex;
flex-wrap: wrap;
gap: 6px;
padding: 2px 0 2px 18px;
}
.cr-qa-thumbs[data-pending] {
padding: 6px 0 0;
}
.cr-qa-thumb {
position: relative;
display: flex;
}
.cr-qa-thumb-open {
display: flex;
overflow: hidden;
width: 40px;
height: 40px;
border: 1px solid color-mix(in srgb, var(--vscode-foreground) 18%, transparent);
border-radius: 4px;
background: var(--vscode-editor-background);
cursor: zoom-in;
}
.cr-qa-thumb-open img {
width: 100%;
height: 100%;
object-fit: cover;
}
.cr-qa-thumb-open:hover {
border-color: var(--vscode-focusBorder);
}
.cr-qa-entry[data-history] .cr-qa-thumb-open img {
opacity: 0.7;
}
.cr-qa-entry[data-history] .cr-qa-thumb-open:hover img {
opacity: 1;
}
.cr-qa-thumb-remove {
position: absolute;
top: -6px;
right: -6px;
display: flex;
width: 16px;
height: 16px;
align-items: center;
justify-content: center;
border: 1px solid var(--vscode-widget-border, color-mix(in srgb, var(--vscode-foreground) 25%, transparent));
border-radius: 50%;
background: var(--vscode-editorWidget-background, var(--vscode-editor-background));
color: var(--vscode-descriptionForeground);
}
.cr-qa-thumb-remove:hover {
color: var(--vscode-foreground);
}
.cr-qa-thumb-open:focus-visible,
.cr-qa-thumb-remove:focus-visible {
outline: 1px solid var(--vscode-focusBorder);
outline-offset: 1px;
}
.cr-qa-notice {
color: var(--vscode-editorWarning-foreground, var(--vscode-descriptionForeground));
font-size: 11.5px;
}
/* 看大图:盖住整个预览,图片按比例放到最大,右上角「关闭」 */
.cr-qa-lightbox {
position: fixed;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
padding: 32px;
background: rgb(0 0 0 / 65%);
cursor: zoom-out;
inset: 0;
}
.cr-qa-lightbox img {
max-width: 100%;
max-height: 100%;
border-radius: 4px;
box-shadow: 0 6px 28px rgb(0 0 0 / 45%);
object-fit: contain;
}
.cr-qa-lightbox-close {
position: absolute;
top: 10px;
right: 10px;
display: flex;
width: 28px;
height: 28px;
align-items: center;
justify-content: center;
border: 1px solid var(--vscode-widget-border, transparent);
border-radius: 4px;
background: var(--vscode-editorWidget-background, var(--vscode-editor-background));
color: var(--vscode-foreground);
}
.cr-qa-lightbox-close:focus-visible {
outline: 1px solid var(--vscode-focusBorder);
outline-offset: 1px;
}
.cr-qa-input {
display: flex;
align-items: flex-end;