Skip to content

Commit ca10e30

Browse files
author
LoCoBench Bot
committed
Merge remote-tracking branch 'origin/ralph/gapfill-docgen'
# Conflicts: # configs/codereview_2config.sh # configs/selected_benchmark_tasks.json # prd.json
2 parents 09e6cf9 + 44ab4a9 commit ca10e30

File tree

46 files changed

+4976
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+4976
-149
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM ubuntu:22.04
2+
3+
# Install dependencies
4+
RUN apt-get update && apt-get install -y \
5+
git \
6+
ca-certificates \
7+
&& rm -rf /var/lib/apt/lists/*
8+
9+
WORKDIR /workspace
10+
11+
# Clone VS Code repository with blobless clone for faster setup
12+
# Commit 69d110f2 is from main branch (2026-02-16)
13+
RUN git clone --filter=blob:none --no-checkout https://github.com/microsoft/vscode.git repo \
14+
&& cd repo \
15+
&& git checkout 69d110f2fe9decdf0b4f79f894f23b3c1967bcb2 \
16+
&& git sparse-checkout init --cone \
17+
&& git sparse-checkout set src/vs/vscode.d.ts src/vs/workbench extensions \
18+
&& git checkout
19+
20+
# Set working directory to repo root so agent can explore the codebase
21+
WORKDIR /workspace/repo
22+
23+
# Entry point: agent will generate documentation.md in /workspace/
24+
CMD ["/bin/bash"]
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# Task: Generate VS Code Diagnostic API Reference Documentation
2+
3+
## Objective
4+
5+
Generate comprehensive API reference documentation for the **VS Code Diagnostic API**. The Diagnostic API allows extensions to report code issues (errors, warnings, information, hints) to users within the editor.
6+
7+
## Scope
8+
9+
Your documentation should cover the following API surface within the `vscode.languages` namespace:
10+
11+
### Core Interfaces and Classes
12+
13+
1. **Diagnostic class**: Represents a single diagnostic (error, warning, info, hint)
14+
2. **DiagnosticCollection interface**: Container for managing diagnostics across documents
15+
3. **DiagnosticSeverity enum**: Severity levels (Error, Warning, Information, Hint)
16+
4. **DiagnosticRelatedInformation class**: Additional context for diagnostics
17+
5. **DiagnosticTag enum**: Tags for categorizing diagnostics (Unnecessary, Deprecated)
18+
19+
### Key Functions
20+
21+
1. **createDiagnosticCollection()**: Factory function for creating diagnostic collections
22+
2. **getDiagnostics()**: Retrieve diagnostics for a resource or workspace
23+
24+
### Events
25+
26+
1. **onDidChangeDiagnostics**: Event fired when diagnostics change globally
27+
28+
## Required Content
29+
30+
Your API reference must include:
31+
32+
### For Each API Method/Function:
33+
- **Signature**: Full TypeScript signature with parameter types and return type
34+
- **Parameters**: Description of each parameter, including optional/required status
35+
- **Return value**: Description of what is returned
36+
- **Behavior notes**: How the API behaves in different scenarios
37+
- **Error cases**: What errors can occur and when
38+
39+
### For Each Interface/Class:
40+
- **Properties**: All properties with types and descriptions
41+
- **Methods**: All methods with signatures and behavior
42+
- **Constructor**: Construction pattern (if applicable)
43+
- **Lifecycle**: Object lifecycle and disposal semantics
44+
45+
### Usage Examples:
46+
- **Basic usage**: Simple diagnostic creation and publishing
47+
- **Advanced patterns**: Event subscription, cleanup, related information
48+
- **Real-world patterns**: Extract usage examples from internal VS Code code
49+
50+
## Output Format
51+
52+
Write your documentation to `/workspace/documentation.md` using Markdown format.
53+
54+
Structure your documentation as follows:
55+
56+
```markdown
57+
# VS Code Diagnostic API Reference
58+
59+
## Overview
60+
[Brief introduction to the Diagnostic API]
61+
62+
## Core Types
63+
64+
### Diagnostic
65+
[Class documentation]
66+
67+
### DiagnosticCollection
68+
[Interface documentation]
69+
70+
### DiagnosticSeverity
71+
[Enum documentation]
72+
73+
### DiagnosticRelatedInformation
74+
[Class documentation]
75+
76+
### DiagnosticTag
77+
[Enum documentation]
78+
79+
## Functions
80+
81+
### createDiagnosticCollection()
82+
[Function documentation]
83+
84+
### getDiagnostics()
85+
[Function documentation]
86+
87+
## Events
88+
89+
### onDidChangeDiagnostics
90+
[Event documentation]
91+
92+
## Usage Examples
93+
94+
### Basic Example
95+
[Code example with explanation]
96+
97+
### Advanced Example
98+
[Code example with explanation]
99+
100+
## Common Patterns
101+
[Patterns discovered from internal usage]
102+
103+
## Error Handling
104+
[Error cases and handling strategies]
105+
```
106+
107+
## Tips
108+
109+
- Use the VS Code repository's TypeScript definitions (src/vs/vscode.d.ts) to find exact API signatures
110+
- Search for internal usage in src/vs/workbench/ and extensions/ directories to discover real-world patterns
111+
- Include behavioral notes that aren't obvious from type signatures (e.g., disposal requirements, threading considerations)
112+
- Document the relationship between DiagnosticCollection.set() and getDiagnostics()
113+
- Explain when onDidChangeDiagnostics fires and what information it provides
114+
115+
## Evaluation
116+
117+
Your documentation will be scored on:
118+
- **API completeness** (40%): Coverage of all required API methods, properties, and types
119+
- **Behavioral notes** (30%): Correct description of non-obvious behaviors, lifecycle, error cases
120+
- **Usage examples** (20%): Quality and correctness of code examples from internal callers
121+
- **Structure** (10%): Organization, clarity, and completeness of documentation structure
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[task]
2+
category = "api_reference"
3+
suite = "ccb_docgen"
4+
name = "docgen-api-001"
5+
language = "typescript"
6+
difficulty = "hard"
7+
time_limit_sec = 1200
8+
9+
[task.metadata]
10+
description = "Generate API reference documentation for VS Code's Diagnostic API"
11+
tags = ["documentation", "api-reference", "vscode", "typescript"]

0 commit comments

Comments
 (0)