Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d4a3dbd
Integrate roo_cursor improvements into modular structure
proggod Apr 1, 2025
fc837d0
Add debugging logs for diff viewer functionality
proggod Apr 1, 2025
2913618
Fix auto-open diff viewer functionality
proggod Apr 1, 2025
3597444
Add extensive debugging for auto-diff feature
proggod Apr 1, 2025
fe43c84
Fix auto-open diff by moving code before early return
proggod Apr 1, 2025
89ce49f
Add diff opening at all task completion points
proggod Apr 1, 2025
2a13395
Fix checkpoint verification when diff views are closed
proggod Apr 1, 2025
b990506
Merged into main base
proggod Apr 1, 2025
4808902
Update button padding in diffApprove.css and fix test files
proggod Apr 1, 2025
d82502f
Fix TypeScript errors in ClineProvider test
proggod Apr 1, 2025
d9c9065
Fixed recs
proggod Apr 1, 2025
c8fb2df
chore: add changeset for recent improvements
proggod Apr 1, 2025
a25c0b8
chore: trigger CI
proggod Apr 1, 2025
5b4d9a9
removed some docs
proggod Apr 1, 2025
64e8d2e
syncd with main better
proggod Apr 1, 2025
1927723
fixed initilization not being awaited
proggod Apr 1, 2025
f1e8194
fixed initilization not being awaited
proggod Apr 1, 2025
18024a5
fixed multiline test failing
proggod Apr 1, 2025
bac391e
fixed multiline test failing
proggod Apr 1, 2025
1bdc418
fixed multiline test failing
proggod Apr 1, 2025
5cc1e72
clineprovider test different
proggod Apr 1, 2025
5443364
removed some doc files
proggod Apr 1, 2025
2782eab
Remove temporary diff files
proggod Apr 1, 2025
699b1ab
Restore isolatedModules: true in Jest config
proggod Apr 1, 2025
4a00375
Remove temporary jest.setup.ts.main file
proggod Apr 1, 2025
1173a2a
Add @types/knuth-shuffle-seeded dependency
proggod Apr 1, 2025
defb8d8
Add API_LOGGING translations for all supported languages
proggod Apr 1, 2025
03089cf
Clean up unused files and configure knip to ignore dynamic imports
proggod Apr 1, 2025
0c136ff
Fix test issues: removed circular dependency in system.ts and removed…
proggod Apr 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
temp/
.pnpm-store
dist
out
Expand Down
41 changes: 23 additions & 18 deletions knip.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
{
"$schema": "https://unpkg.com/knip@latest/schema.json",
"entry": ["src/extension.ts", "src/activate/index.ts", "webview-ui/src/index.tsx"],
"project": ["src/**/*.ts", "webview-ui/src/**/*.{ts,tsx}"],
"ignoreDependencies": [],
"ignoreBinaries": [],
"ignoreExportsUsedInFile": {},
"entry": ["src/**/*.ts", "webview-ui/src/index.tsx"],
"project": "**/*.{js,ts,jsx,tsx}",
"ignore": [
"media/diffApprove.ts",
"media/diffApprove.js",
"**/__mocks__/**",
"**/__tests__/**",
"**/test/**",
"**/*.test.ts",
"**/*.test.tsx",
"**/stories/**",
"coverage/**",
"dist/**",
"out/**",
"bin/**",
"e2e/**",
"scripts/**",
"benchmark/**",
"src/activate/**",
"src/exports/**",
"src/extension.ts",
"scripts/**"
"webview-ui/build/**",
"webview-ui/src/stories/**",
"webview-ui/src/components/**",
"webview-ui/src/utils/**",
"webview-ui/src/context/**",
"webview-ui/src/i18n/**",
"webview-ui/src/lib/**",
"webview-ui/src/oauth/**",
"webview-ui/src/*.d.ts",
"webview-ui/src/setupTests.ts",
"webview-ui/.storybook/**",
"webview-ui/vite.config.ts",
"*.config.{js,ts,cjs,mjs,json}"
],
"workspaces": {
"webview-ui": {
"entry": ["src/index.tsx"],
"project": ["src/**/*.{ts,tsx}"]
}
"rules": {
"files": "warn"
}
}
243 changes: 243 additions & 0 deletions media/diffApprove.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
body {
font-family:
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
sans-serif;
padding: 0;
margin: 0;
}

.diff-header {
padding: 16px;
border-bottom: 1px solid var(--vscode-panel-border);
background: var(--vscode-editor-background);
position: sticky;
top: 0;
z-index: 1;
}

.diff-header h2 {
margin: 0 0 16px 0;
font-size: 14px;
font-weight: normal;
color: var(--vscode-foreground);
}
Comment on lines +18 to +23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use tailwind style ?


.actions {
display: flex;
gap: 8px;
}

button {
padding: 2px 8px;
border: 1px solid var(--vscode-button-border);
border-radius: 4px;
background: var(--vscode-button-background);
color: var(--vscode-button-foreground);
cursor: pointer;
font-size: 11px;
}

button:hover {
background: var(--vscode-button-hoverBackground);
}

.diff-content {
padding: 0;
}

.diff-block {
margin: 0;
border: 1px solid var(--vscode-panel-border);
border-radius: 0;
overflow: hidden;
}

.diff-block.approved {
opacity: 0.7;
border-left: 4px solid #2e7d32;
}

.diff-block.denied {
opacity: 0.7;
border-left: 4px solid #c62828;
}

.block-header {
padding: 2px 8px;
background: var(--vscode-editor-background);
border-bottom: 1px solid var(--vscode-panel-border);
display: flex;
justify-content: flex-end;
align-items: center;
}

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

.approve-button {
background: #2e7d32;
border-color: #2e7d32;
}

.deny-button {
background: #c62828;
border-color: #c62828;
}

.lines {
padding: 0;
font-family: "SF Mono", Monaco, Menlo, Courier, monospace;
font-size: 12px;
line-height: 1.4;
background: var(--vscode-editor-background);
}

.line {
display: flex;
padding: 0 8px;
white-space: pre;
}

.line:hover {
background: var(--vscode-editor-lineHighlightBackground);
}

.line-number {
color: var(--vscode-editorLineNumber-foreground);
padding-right: 16px;
user-select: none;
text-align: right;
width: 40px;
}

.content {
flex: 1;
}

.deletion {
background-color: rgba(198, 40, 40, 0.15);
color: #c62828;
}

.addition {
background-color: rgba(46, 125, 50, 0.15);
color: #2e7d32;
}

.old-content,
.new-content {
position: relative;
}

.old-content::before,
.new-content::before {
content: "";
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 4px;
}

.old-content::before {
background: #c62828;
}

.new-content::before {
background: #2e7d32;
}

.context {
background: var(--vscode-editor-background);
}

/* Additions */
.addition .line {
background: rgba(46, 125, 50, 0.08);
}

.addition .content {
color: #2e7d32;
}

/* Deletions */
.deletion .line {
background: rgba(198, 40, 40, 0.08);
}

.deletion .content {
color: #c62828;
}

/* Changes */
.change .old-content .line {
background: rgba(198, 40, 40, 0.08);
}

.change .old-content .content {
color: #c62828;
}

.change .new-content .line {
background: rgba(46, 125, 50, 0.08);
}

.change .new-content .content {
color: #2e7d32;
}

/* Separators */
.old-content {
border-bottom: 1px solid var(--vscode-panel-border);
}

/* Approved/Denied States */
.diff-block.processed {
opacity: 0.5;
}

.error {
color: var(--vscode-errorForeground);
padding: 16px;
text-align: center;
}

/* Line number columns */
.line-number {
min-width: 3em;
padding-right: 1em;
text-align: right;
color: var(--vscode-editorLineNumber-foreground);
}

/* Gutter between line numbers and content */
.gutter {
width: 1px;
background-color: var(--vscode-panel-border);
margin: 0 8px;
}

/* Empty line number placeholder */
.line-number:empty::before {
content: " ";
}

#approveAll {
background: #2e7d32;
border-color: #2e7d32;
}

#denyAll {
background: #c62828;
border-color: #c62828;
}

#approveAll:hover {
background: #1b5e20;
}

#denyAll:hover {
background: #b71c1c;
}
29 changes: 29 additions & 0 deletions media/diffApprove.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// @ts-check
;(function () {
try {
// Get VSCode API
const vscode = acquireVsCodeApi()

// Attach event listeners
document.getElementById("approveAll").onclick = function () {
vscode.postMessage({ type: "approveAll" })
}

document.getElementById("denyAll").onclick = function () {
vscode.postMessage({ type: "denyAll" })
}

document.querySelectorAll("button[data-block-id]").forEach(function (button) {
button.onclick = function () {
const blockId = parseInt(this.getAttribute("data-block-id") || "0")
const action = this.getAttribute("data-action") || ""
vscode.postMessage({ type: action, blockId: blockId })
}
})
} catch (error) {
acquireVsCodeApi().postMessage({
type: "log",
message: `[Webview Error] ${error instanceof Error ? error.message : String(error)}`,
})
}
})()
Loading