feat(ui): add Monaco changes/files right drawer viewers

Use OpenCode v2 file APIs for browsing and Monaco DiffEditor for session snapshot diffs, with local baseline language metadata and optional CDN language loading.
This commit is contained in:
Shantur Rathore
2026-02-09 21:00:40 +00:00
parent 4eded9e204
commit b59e85abda
17 changed files with 1035 additions and 30 deletions

View File

@@ -184,6 +184,26 @@
background-color: var(--surface-secondary);
}
.file-viewer-toolbar {
@apply ml-auto flex items-center gap-1;
}
.file-viewer-toolbar-button {
@apply text-[11px] px-2 py-1 rounded border border-base transition-colors;
background-color: var(--surface-base);
color: var(--text-secondary);
}
.file-viewer-toolbar-button:hover {
background-color: var(--surface-hover);
color: var(--text-primary);
}
.file-viewer-toolbar-button.active {
color: var(--text-primary);
box-shadow: inset 0 0 0 1px var(--accent-primary);
}
.file-viewer-title {
@apply text-[11px] font-semibold uppercase tracking-wide;
color: var(--text-muted);
@@ -193,6 +213,16 @@
@apply flex-1 p-4 overflow-auto min-h-0;
}
.file-viewer-content--monaco {
@apply flex-1 overflow-hidden min-h-0;
padding: 0;
}
.monaco-viewer {
width: 100%;
height: 100%;
}
.file-viewer-empty {
@apply flex flex-col items-center justify-center h-full gap-3 text-center;
color: var(--text-muted);