opencode-codetime 0.6.1 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -211,7 +211,7 @@ export const plugin = async (ctx) => {
|
|
|
211
211
|
initState();
|
|
212
212
|
_projectDir = directory;
|
|
213
213
|
_worktree = worktree;
|
|
214
|
-
_projectName = `${path.basename(directory)}
|
|
214
|
+
_projectName = `${path.basename(directory)} opencode`;
|
|
215
215
|
_platform = os.platform();
|
|
216
216
|
return {
|
|
217
217
|
event: async ({ event }) => {
|
|
@@ -320,7 +320,9 @@ export const plugin = async (ctx) => {
|
|
|
320
320
|
}
|
|
321
321
|
lines.push(` ${"─".repeat(maxNameLen + 2 + maxTimeLen)}`);
|
|
322
322
|
lines.push(` ${"Total".padEnd(maxNameLen + 2)}${totalTime.padStart(maxTimeLen)}`);
|
|
323
|
-
|
|
323
|
+
const header = lines[0];
|
|
324
|
+
const table = lines.slice(1).join("\n");
|
|
325
|
+
return `${header}\n\`\`\`\n${table}\n\`\`\``;
|
|
324
326
|
}
|
|
325
327
|
// Project-specific mode
|
|
326
328
|
const projectName = args.project === "current" ? _projectName : args.project;
|
|
@@ -335,7 +337,7 @@ export const plugin = async (ctx) => {
|
|
|
335
337
|
}
|
|
336
338
|
const projectFormatted = formatMinutes(projectMins);
|
|
337
339
|
const displayName = args.project === "current"
|
|
338
|
-
? _projectName
|
|
340
|
+
? formatProjectName(_projectName)
|
|
339
341
|
: projectName;
|
|
340
342
|
if (totalMins !== null) {
|
|
341
343
|
const totalFormatted = formatMinutes(totalMins);
|