Add coverage prettification and sorting functionality

- Introduced `prettify.css` for syntax highlighting in coverage reports.
- Added `prettify.js` to handle code formatting and highlighting.
- Included `sort-arrow-sprite.png` for sort indicators in the coverage table.
- Implemented `sorter.js` to enable sorting and filtering of coverage summary tables.
- Added a search box for filtering table rows based on user input.
This commit is contained in:
catlog22
2026-02-07 22:21:05 +08:00
parent 6073627ff2
commit ece02ab32a
40 changed files with 2828 additions and 728 deletions

View File

@@ -249,14 +249,12 @@ for (const pending of pendingSelections) {
description: sol.description || sol.approach || 'No description'
}));
const answer = AskUserQuestion({
questions: [{
question: `Issue ${pending.issue_id}: which solution to bind?`,
header: pending.issue_id,
options: options,
multiSelect: false
}]
});
const answer = ASK_USER([{
id: pending.issue_id,
type: "select",
prompt: `Issue ${pending.issue_id}: which solution to bind?`,
options: options
}]); // BLOCKS (wait for user response)
const selected = answer[Object.keys(answer)[0]];
if (!selected || selected === 'Other') continue;

View File

@@ -582,19 +582,9 @@ ${solution.tasks.map(t => `- ${t.id}: ${t.title} [${t.action}]`).join('\n')}
// Confirm if not auto mode
if (!flags.yes && !flags.y) {
const confirm = AskUserQuestion({
questions: [{
question: `Create solution for issue ${issueId} with ${solution.tasks.length} tasks?`,
header: 'Confirm',
multiSelect: false,
options: [
{ label: 'Yes, create solution', description: 'Create and bind solution' },
{ label: 'Cancel', description: 'Abort without changes' }
]
}]
});
const confirmed = CONFIRM(`Create solution for issue ${issueId} with ${solution.tasks.length} tasks?`); // BLOCKS (wait for user response)
if (!confirm.answers?.['Confirm']?.includes('Yes')) {
if (!confirmed) {
console.log('Cancelled.');
return;
}

View File

@@ -251,15 +251,13 @@ agentIds.forEach((agentId, i) => {
```javascript
if (allClarifications.length > 0) {
for (const clarification of allClarifications) {
// Present to user via AskUserQuestion
const answer = AskUserQuestion({
questions: [{
question: `[${clarification.queue_id}] ${clarification.question}`,
header: clarification.conflict_id,
options: clarification.options,
multiSelect: false
}]
});
// Present to user via ASK_USER
const answer = ASK_USER([{
id: clarification.conflict_id,
type: "select",
prompt: `[${clarification.queue_id}] ${clarification.question}`,
options: clarification.options
}]); // BLOCKS (wait for user response)
// Re-spawn agent with user decision (original agent already closed)
// Create new agent with previous context + resolution
@@ -345,22 +343,20 @@ ccw issue queue list --brief
**Decision:**
- If `active_queue_id` is null → `ccw issue queue switch <new-queue-id>` (activate new queue)
- If active queue exists → Use **AskUserQuestion** to prompt user
- If active queue exists → Use **ASK_USER** to prompt user
**AskUserQuestion:**
**ASK_USER:**
```javascript
AskUserQuestion({
questions: [{
question: "Active queue exists. How would you like to proceed?",
header: "Queue Action",
options: [
{ label: "Merge into existing queue", description: "Add new items to active queue, delete new queue" },
{ label: "Use new queue", description: "Switch to new queue, keep existing in history" },
{ label: "Cancel", description: "Delete new queue, keep existing active" }
],
multiSelect: false
}]
})
ASK_USER([{
id: "queue_action",
type: "select",
prompt: "Active queue exists. How would you like to proceed?",
options: [
{ label: "Merge into existing queue", description: "Add new items to active queue, delete new queue" },
{ label: "Use new queue", description: "Switch to new queue, keep existing in history" },
{ label: "Cancel", description: "Delete new queue, keep existing active" }
]
}]); // BLOCKS (wait for user response)
```
**Action Commands:**