p-doom/crowd-code-dataset-0.2 huggingface dataset:
[content] /home/franz.srambical/test_extension/extension.ts (typescript)
import * as vscode from 'vscode'

export function activate(context: vscode.ExtensionContext) {
    const output = vscode.window.createOutputChannel('Edit Trace Probe')
    output.show()

    const log = (msg: string) => {
        output.appendLine(`[${new Date().toISOString()}] ${msg}`)
    }

    // 1. Text document changes (editor / agent / reload)
    context.subscriptions.push(
        vscode.workspace.onDidChangeTextDocument(event => {
            const active = vscode.window.activeTextEditor?.document === event.document
            log(
                `TEXT_CHANGE
  uri=${event.document.uri.toString()}
  version=${event.document.version}
  changes=${event.contentChanges.length}
  active=${active}`
            )

            event.contentChanges.forEach((c, i) => {
                log(
                    `  change[${i}]: offset=${c.rangeOffset} length=${c.rangeLength} textLen=${c.text.length}`
                )
            })
        })
    )

    // 2. Document opened (often after git checkout / pull)
    context.subscriptions.push(
        vscode.workspace.onDidOpenTextDocument(doc => {
            log(
                `DOC_OPEN
  uri=${doc.uri.toString()}
  version=${doc.version}
  language=${doc.languageId}`
            )
        })
    )

    // 3. Filesystem-level changes (git, disk writes, tools)
    const watcher = vscode.workspace.createFileSystemWatcher('**/*')
    context.subscriptions.push(watcher)

    watcher.onDidChange(uri => log(`FS_CHANGE uri=${uri.toString()}`))
    watcher.onDidCreate(uri => log(`FS_CREATE uri=${uri.toString()}`))
    watcher.onDidDelete(uri => log(`FS_DELETE uri=${uri.toString()}`))

    log('Edit Trace Probe activated')
}

export function deactivate() {}