Skip to content

Commit 7c55aee

Browse files
committed
feat: unify /codetime command to support current project, specific project, and breakdown via arguments
1 parent 83be0f8 commit 7c55aee

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

src/index.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -342,16 +342,12 @@ export const plugin: Plugin = async (ctx) => {
342342
cfg.command["codetime"] = {
343343
description: "Show today's coding time from CodeTime",
344344
template:
345-
"Retrieve current CodeTime coding time stats.\n\n" +
346-
"Immediately call `codetime` with no arguments and return its output verbatim.\n" +
347-
"Do not call other tools.",
348-
};
349-
cfg.command["codetime-breakdown"] = {
350-
description: "Show today's coding time breakdown by project",
351-
template:
352-
"Retrieve CodeTime coding time stats broken down by project.\n\n" +
353-
'Immediately call `codetime` with `breakdown: true` and return its output verbatim.\n' +
354-
"Do not call other tools.",
345+
"Retrieve CodeTime coding time stats.\n\n" +
346+
"Based on the arguments provided: `$ARGUMENTS`\n\n" +
347+
'- If no arguments (empty/blank), call `codetime` with `project: "current"` to show current project time.\n' +
348+
"- If the argument is `breakdown`, call `codetime` with `breakdown: true` to show all projects.\n" +
349+
"- Otherwise, call `codetime` with `project` set to the argument value to show that specific project's time.\n\n" +
350+
"Return the output verbatim. Do not call other tools.",
355351
};
356352
},
357353

0 commit comments

Comments
 (0)