AI Newsletter Digest improvements: fixed QP soft line break decoding, URL extraction, and content cleaning

This commit is contained in:
Krilly
2026-03-04 13:29:22 +00:00
parent 29a98137a7
commit 57dd294675
13706 changed files with 2114953 additions and 237629 deletions

View File

@@ -0,0 +1,55 @@
#!/usr/bin/env node
/**
* Delete a task
*
* Usage:
* node delete-task.mjs --task-id "35fc5310-a1b1-49c7-be75-be631d3079ee"
*/
import { parseArgs } from 'util';
import { deleteTask } from '../lib/task.mjs';
const { values } = parseArgs({
options: {
'task-id': { type: 'string' },
help: { type: 'boolean', short: 'h' }
}
});
if (values.help) {
console.log(`
Delete a Lark task
Options:
--task-id Task GUID to delete (required)
-h, --help Show this help
Examples:
node delete-task.mjs --task-id "35fc5310-a1b1-49c7-be75-be631d3079ee"
`);
process.exit(0);
}
if (!values['task-id']) {
console.error('Error: --task-id is required');
process.exit(1);
}
async function main() {
try {
console.log(`Deleting task: ${values['task-id']}`);
await deleteTask(values['task-id']);
console.log('✅ Task deleted successfully!');
} catch (error) {
console.error('❌ Failed to delete task:', error.message);
if (error.larkResponse) {
console.error('Lark response:', JSON.stringify(error.larkResponse, null, 2));
}
process.exit(1);
}
}
main();