aitasks 1.2.1 → 1.2.2
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 +94 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1890,7 +1890,7 @@ var require_commander = __commonJS((exports) => {
|
|
|
1890
1890
|
var require_package = __commonJS((exports, module) => {
|
|
1891
1891
|
module.exports = {
|
|
1892
1892
|
name: "aitasks",
|
|
1893
|
-
version: "1.2.
|
|
1893
|
+
version: "1.2.2",
|
|
1894
1894
|
description: "CLI task management tool built for AI agents",
|
|
1895
1895
|
type: "module",
|
|
1896
1896
|
bin: {
|
|
@@ -41728,6 +41728,15 @@ var StatusPicker = ({ task }) => /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_def
|
|
|
41728
41728
|
}, undefined, false, undefined, this)
|
|
41729
41729
|
]
|
|
41730
41730
|
}, undefined, true, undefined, this);
|
|
41731
|
+
var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
41732
|
+
function getDateKey(ts) {
|
|
41733
|
+
const d2 = new Date(ts);
|
|
41734
|
+
return `${d2.getFullYear()}-${d2.getMonth()}-${d2.getDate()}`;
|
|
41735
|
+
}
|
|
41736
|
+
function formatDateLabel(ts) {
|
|
41737
|
+
const d2 = new Date(ts);
|
|
41738
|
+
return `${MONTHS[d2.getMonth()]} ${d2.getDate()}`;
|
|
41739
|
+
}
|
|
41731
41740
|
function wrapText2(text, maxW) {
|
|
41732
41741
|
const words2 = text.split(/\s+/);
|
|
41733
41742
|
const result2 = [];
|
|
@@ -41777,6 +41786,8 @@ var TreeBoardComponent = ({ getTasks }) => {
|
|
|
41777
41786
|
const doneCnt = items.filter((i) => i.section === "done").length;
|
|
41778
41787
|
const result2 = [];
|
|
41779
41788
|
let firstSection = true;
|
|
41789
|
+
let prevDateKey = null;
|
|
41790
|
+
let prevSection = null;
|
|
41780
41791
|
for (let idx = 0;idx < items.length; idx++) {
|
|
41781
41792
|
const item = items[idx];
|
|
41782
41793
|
if (item.showSectionHeader && item.section !== "middle") {
|
|
@@ -41789,7 +41800,19 @@ var TreeBoardComponent = ({ getTasks }) => {
|
|
|
41789
41800
|
total: item.section === "in_progress" ? ipTotal : undefined
|
|
41790
41801
|
});
|
|
41791
41802
|
firstSection = false;
|
|
41803
|
+
prevDateKey = null;
|
|
41804
|
+
} else if (item.section !== prevSection) {
|
|
41805
|
+
prevDateKey = null;
|
|
41806
|
+
}
|
|
41807
|
+
if (item.indent === 0) {
|
|
41808
|
+
const ts = item.section === "done" ? item.task.completed_at ?? item.task.created_at : item.task.created_at;
|
|
41809
|
+
const dateKey = getDateKey(ts);
|
|
41810
|
+
if (prevDateKey !== null && prevDateKey !== dateKey) {
|
|
41811
|
+
result2.push({ kind: "date-sep", label: formatDateLabel(ts) });
|
|
41812
|
+
}
|
|
41813
|
+
prevDateKey = dateKey;
|
|
41792
41814
|
}
|
|
41815
|
+
prevSection = item.section;
|
|
41793
41816
|
result2.push({ kind: "item", item, itemIdx: idx });
|
|
41794
41817
|
}
|
|
41795
41818
|
return result2;
|
|
@@ -41940,7 +41963,8 @@ var TreeBoardComponent = ({ getTasks }) => {
|
|
|
41940
41963
|
const leftTotalRows = leftRows.length;
|
|
41941
41964
|
const leftMaxOffset = Math.max(0, leftTotalRows - leftVisibleH);
|
|
41942
41965
|
const leftOffset = Math.min(leftScrollOffset, leftMaxOffset);
|
|
41943
|
-
const
|
|
41966
|
+
const rawLeftRows = leftRows.slice(leftOffset, leftOffset + leftVisibleH);
|
|
41967
|
+
const visibleLeftRows = rawLeftRows[0]?.kind === "date-sep" ? rawLeftRows.slice(1) : rawLeftRows;
|
|
41944
41968
|
const leftScrollbar = (() => {
|
|
41945
41969
|
const bar = Array(leftVisibleH).fill(" ");
|
|
41946
41970
|
if (leftTotalRows > leftVisibleH) {
|
|
@@ -42083,6 +42107,37 @@ var TreeBoardComponent = ({ getTasks }) => {
|
|
|
42083
42107
|
]
|
|
42084
42108
|
}, `sp-${leftOffset + i}`, true, undefined, this);
|
|
42085
42109
|
}
|
|
42110
|
+
if (row.kind === "date-sep") {
|
|
42111
|
+
const dashW = Math.max(0, Math.floor((leftInner - 2 - row.label.length - 2) / 2));
|
|
42112
|
+
const dashes = "\u254C".repeat(dashW);
|
|
42113
|
+
return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
|
|
42114
|
+
children: [
|
|
42115
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
|
|
42116
|
+
flexGrow: 1,
|
|
42117
|
+
paddingLeft: 1,
|
|
42118
|
+
children: [
|
|
42119
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
42120
|
+
dimColor: true,
|
|
42121
|
+
children: dashes
|
|
42122
|
+
}, undefined, false, undefined, this),
|
|
42123
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
42124
|
+
dimColor: true,
|
|
42125
|
+
children: [
|
|
42126
|
+
" ",
|
|
42127
|
+
row.label,
|
|
42128
|
+
" "
|
|
42129
|
+
]
|
|
42130
|
+
}, undefined, true, undefined, this),
|
|
42131
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
42132
|
+
dimColor: true,
|
|
42133
|
+
children: dashes
|
|
42134
|
+
}, undefined, false, undefined, this)
|
|
42135
|
+
]
|
|
42136
|
+
}, undefined, true, undefined, this),
|
|
42137
|
+
sb
|
|
42138
|
+
]
|
|
42139
|
+
}, `ds-${leftOffset + i}`, true, undefined, this);
|
|
42140
|
+
}
|
|
42086
42141
|
if (row.kind === "section") {
|
|
42087
42142
|
const color = row.section === "in_progress" ? "yellow" : "green";
|
|
42088
42143
|
const label = row.section === "in_progress" ? "IN PROGRESS" : "DONE";
|
|
@@ -42215,6 +42270,7 @@ var StaticCard = ({ task }) => {
|
|
|
42215
42270
|
};
|
|
42216
42271
|
var StaticSection = ({ status, tasks }) => {
|
|
42217
42272
|
const color = STATUS_COLORS3[status];
|
|
42273
|
+
const getTaskDateKey = (t) => getDateKey(status === "done" ? t.completed_at ?? t.created_at : t.created_at);
|
|
42218
42274
|
return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
|
|
42219
42275
|
flexDirection: "column",
|
|
42220
42276
|
borderStyle: "round",
|
|
@@ -42249,9 +42305,41 @@ var StaticSection = ({ status, tasks }) => {
|
|
|
42249
42305
|
dimColor: true,
|
|
42250
42306
|
children: "empty"
|
|
42251
42307
|
}, undefined, false, undefined, this)
|
|
42252
|
-
}, undefined, false, undefined, this) : tasks.map((t) =>
|
|
42253
|
-
|
|
42254
|
-
|
|
42308
|
+
}, undefined, false, undefined, this) : tasks.map((t, i) => {
|
|
42309
|
+
const prev = tasks[i - 1];
|
|
42310
|
+
const showSep = prev != null && getTaskDateKey(prev) !== getTaskDateKey(t);
|
|
42311
|
+
return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(import_react29.default.Fragment, {
|
|
42312
|
+
children: [
|
|
42313
|
+
showSep && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
|
|
42314
|
+
paddingLeft: 2,
|
|
42315
|
+
paddingRight: 1,
|
|
42316
|
+
children: [
|
|
42317
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
42318
|
+
dimColor: true,
|
|
42319
|
+
children: [
|
|
42320
|
+
"\u254C".repeat(4),
|
|
42321
|
+
" "
|
|
42322
|
+
]
|
|
42323
|
+
}, undefined, true, undefined, this),
|
|
42324
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
42325
|
+
dimColor: true,
|
|
42326
|
+
children: [
|
|
42327
|
+
formatDateLabel(status === "done" ? t.completed_at ?? t.created_at : t.created_at),
|
|
42328
|
+
" "
|
|
42329
|
+
]
|
|
42330
|
+
}, undefined, true, undefined, this),
|
|
42331
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
42332
|
+
dimColor: true,
|
|
42333
|
+
children: "\u254C".repeat(4)
|
|
42334
|
+
}, undefined, false, undefined, this)
|
|
42335
|
+
]
|
|
42336
|
+
}, undefined, true, undefined, this),
|
|
42337
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(StaticCard, {
|
|
42338
|
+
task: t
|
|
42339
|
+
}, undefined, false, undefined, this)
|
|
42340
|
+
]
|
|
42341
|
+
}, t.id, true, undefined, this);
|
|
42342
|
+
})
|
|
42255
42343
|
]
|
|
42256
42344
|
}, undefined, true, undefined, this);
|
|
42257
42345
|
};
|
|
@@ -42985,4 +43073,4 @@ program2.parseAsync(process.argv).catch((err) => {
|
|
|
42985
43073
|
process.exit(1);
|
|
42986
43074
|
});
|
|
42987
43075
|
|
|
42988
|
-
//# debugId=
|
|
43076
|
+
//# debugId=605E90B62461DFBE64756E2164756E21
|