@vibetasks/cli 0.6.5 → 0.6.7
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/bin/vibetasks.js +88 -6
- package/package.json +3 -3
package/dist/bin/vibetasks.js
CHANGED
|
@@ -672,6 +672,18 @@ var addCommand = new Command2("add").description("Add a new task").argument("<ti
|
|
|
672
672
|
title: subtaskTitle,
|
|
673
673
|
done: false
|
|
674
674
|
})) || [];
|
|
675
|
+
let sessionId;
|
|
676
|
+
let sessionHistory = [];
|
|
677
|
+
if (createdBy === "ai") {
|
|
678
|
+
const sessionManager2 = getSessionManager();
|
|
679
|
+
const session = await sessionManager2.getOrCreateSession(projectTag);
|
|
680
|
+
sessionId = session.id;
|
|
681
|
+
sessionHistory = [{
|
|
682
|
+
session_id: session.id,
|
|
683
|
+
action: "created",
|
|
684
|
+
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
685
|
+
}];
|
|
686
|
+
}
|
|
675
687
|
const task = await taskOps.createTask({
|
|
676
688
|
title,
|
|
677
689
|
notes: options.notes,
|
|
@@ -685,7 +697,11 @@ var addCommand = new Command2("add").description("Add a new task").argument("<ti
|
|
|
685
697
|
status: createdBy === "ai" ? "vibing" : "todo",
|
|
686
698
|
// AI tasks start vibing
|
|
687
699
|
energy_required: options.energy,
|
|
688
|
-
subtasks_json: subtasksJson
|
|
700
|
+
subtasks_json: subtasksJson,
|
|
701
|
+
session_id: sessionId,
|
|
702
|
+
// Current AI session
|
|
703
|
+
session_history: sessionHistory
|
|
704
|
+
// Full history of sessions
|
|
689
705
|
});
|
|
690
706
|
if (options.tags && options.tags.length > 0) {
|
|
691
707
|
const tagIds = [];
|
|
@@ -840,7 +856,7 @@ var ShortIdManager = class {
|
|
|
840
856
|
};
|
|
841
857
|
|
|
842
858
|
// src/commands/list.ts
|
|
843
|
-
var listCommand = new Command3("list").description("List tasks").argument("[filter]", "Filter: all, today, upcoming, completed", "all").option("-l, --limit <number>", "Maximum number of tasks to show", "50").option("--project <name>", "Filter by project tag").option("--created-by <source>", "Filter by creator: ai or human").option("--status <status>", "Filter by status: todo, vibing, done").option("--short-ids", "Show short numeric IDs (1-99) for easy reference").action(async (filter, options) => {
|
|
859
|
+
var listCommand = new Command3("list").description("List tasks").argument("[filter]", "Filter: all, today, upcoming, completed", "all").option("-l, --limit <number>", "Maximum number of tasks to show", "50").option("--project <name>", "Filter by project tag").option("--created-by <source>", "Filter by creator: ai or human").option("--status <status>", "Filter by status: todo, vibing, done").option("--session [id]", "Filter by session (current session if no ID given)").option("--my-session", "Only show tasks from current AI session").option("--short-ids", "Show short numeric IDs (1-99) for easy reference").action(async (filter, options) => {
|
|
844
860
|
try {
|
|
845
861
|
const validFilters = ["all", "today", "upcoming", "completed"];
|
|
846
862
|
if (!validFilters.includes(filter)) {
|
|
@@ -870,6 +886,32 @@ var listCommand = new Command3("list").description("List tasks").argument("[filt
|
|
|
870
886
|
}
|
|
871
887
|
tasks = tasks.filter((t) => t.status === options.status);
|
|
872
888
|
}
|
|
889
|
+
if (options.mySession || options.session !== void 0) {
|
|
890
|
+
const sessionManager2 = getSessionManager();
|
|
891
|
+
let targetSessionId;
|
|
892
|
+
if (options.session && typeof options.session === "string") {
|
|
893
|
+
const session = await sessionManager2.getSession(options.session);
|
|
894
|
+
if (session) {
|
|
895
|
+
targetSessionId = session.id;
|
|
896
|
+
} else {
|
|
897
|
+
console.error(chalk4.red(`Session "${options.session}" not found`));
|
|
898
|
+
process.exit(1);
|
|
899
|
+
}
|
|
900
|
+
} else {
|
|
901
|
+
const currentSession = await sessionManager2.getCurrentSession();
|
|
902
|
+
if (currentSession) {
|
|
903
|
+
targetSessionId = currentSession.id;
|
|
904
|
+
} else {
|
|
905
|
+
console.log(chalk4.yellow("No active session. Start one with: vibetasks session start"));
|
|
906
|
+
process.exit(0);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
if (targetSessionId) {
|
|
910
|
+
tasks = tasks.filter((t) => t.session_id === targetSessionId);
|
|
911
|
+
console.log(chalk4.gray(`Filtering by session: ${chalk4.cyan(targetSessionId)}
|
|
912
|
+
`));
|
|
913
|
+
}
|
|
914
|
+
}
|
|
873
915
|
if (tasks.length === 0) {
|
|
874
916
|
const filterMessages = {
|
|
875
917
|
all: "No active tasks found",
|
|
@@ -1002,12 +1044,29 @@ No task found with ID starting with: ${id}
|
|
|
1002
1044
|
}
|
|
1003
1045
|
taskId = matchingTask.id;
|
|
1004
1046
|
}
|
|
1047
|
+
const sessionManager2 = getSessionManager();
|
|
1048
|
+
const currentSession = await sessionManager2.getOrCreateSession();
|
|
1049
|
+
const existingTask = await taskOps.getTask(taskId);
|
|
1050
|
+
const existingHistory = existingTask?.session_history || [];
|
|
1051
|
+
const updatedHistory = [
|
|
1052
|
+
...existingHistory,
|
|
1053
|
+
{
|
|
1054
|
+
session_id: currentSession.id,
|
|
1055
|
+
action: "completed",
|
|
1056
|
+
at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1057
|
+
notes: options.notes || options.context
|
|
1058
|
+
}
|
|
1059
|
+
];
|
|
1005
1060
|
const contextNotes = options.notes || options.context;
|
|
1061
|
+
const updatePayload = {
|
|
1062
|
+
session_id: currentSession.id,
|
|
1063
|
+
session_history: updatedHistory
|
|
1064
|
+
};
|
|
1006
1065
|
if (contextNotes) {
|
|
1007
|
-
|
|
1066
|
+
updatePayload.context_notes = contextNotes;
|
|
1008
1067
|
}
|
|
1068
|
+
await taskOps.updateTask(taskId, updatePayload);
|
|
1009
1069
|
const task = await taskOps.completeTask(taskId);
|
|
1010
|
-
const sessionManager2 = getSessionManager();
|
|
1011
1070
|
await sessionManager2.logAction({
|
|
1012
1071
|
type: "task_completed",
|
|
1013
1072
|
description: `Completed: "${task.title}"`,
|
|
@@ -1077,15 +1136,38 @@ var vibingCommand = new Command5("vibing").alias("start").alias("v").description
|
|
|
1077
1136
|
taskId = selectedTask;
|
|
1078
1137
|
}
|
|
1079
1138
|
spinner.start("Starting task...");
|
|
1139
|
+
const task = allTasks.find((t) => t.id === taskId);
|
|
1140
|
+
const sessionManager2 = getSessionManager();
|
|
1141
|
+
const currentSession = await sessionManager2.getOrCreateSession();
|
|
1142
|
+
const existingSessionHistory = task?.session_history || [];
|
|
1143
|
+
const lastSession = existingSessionHistory[existingSessionHistory.length - 1];
|
|
1144
|
+
let updatedHistory = existingSessionHistory;
|
|
1145
|
+
if (!lastSession || lastSession.session_id !== currentSession.id) {
|
|
1146
|
+
updatedHistory = [
|
|
1147
|
+
...existingSessionHistory,
|
|
1148
|
+
{
|
|
1149
|
+
session_id: currentSession.id,
|
|
1150
|
+
action: "continued",
|
|
1151
|
+
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
1152
|
+
}
|
|
1153
|
+
];
|
|
1154
|
+
}
|
|
1080
1155
|
await taskOps.updateTask(taskId, {
|
|
1081
1156
|
status: "vibing",
|
|
1082
|
-
completed: false
|
|
1157
|
+
completed: false,
|
|
1158
|
+
session_id: currentSession.id,
|
|
1159
|
+
// Update to current session
|
|
1160
|
+
session_history: updatedHistory
|
|
1083
1161
|
});
|
|
1084
|
-
const task = allTasks.find((t) => t.id === taskId);
|
|
1085
1162
|
spinner.succeed(chalk6.green("Now vibing on:"));
|
|
1086
1163
|
console.log(chalk6.white(`
|
|
1087
1164
|
${task?.title || taskId}
|
|
1088
1165
|
`));
|
|
1166
|
+
if (lastSession && lastSession.session_id !== currentSession.id) {
|
|
1167
|
+
console.log(chalk6.cyan(` \u{1F4CB} Continuing from session: ${lastSession.session_id}`));
|
|
1168
|
+
console.log(chalk6.gray(` This task has been worked on by ${existingSessionHistory.length} session(s)
|
|
1169
|
+
`));
|
|
1170
|
+
}
|
|
1089
1171
|
console.log(chalk6.gray(" Tips:"));
|
|
1090
1172
|
console.log(chalk6.gray(" \u2022 Update context notes as you work"));
|
|
1091
1173
|
console.log(chalk6.gray(" \u2022 Run `vibetasks done " + taskId.slice(0, 8) + "` when finished"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibetasks/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"description": "VibeTasks CLI - Lightning-fast task management from your terminal. Works with Claude Code, Cursor, and all AI coding tools.",
|
|
5
5
|
"author": "Vyas",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"typecheck": "tsc --noEmit"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@vibetasks/core": "^0.5.6",
|
|
49
|
-
"@vibetasks/shared": "^1.4.5",
|
|
48
|
+
"@vibetasks/core": "^0.5.6",
|
|
49
|
+
"@vibetasks/shared": "^1.4.5",
|
|
50
50
|
"commander": "^11.1.0",
|
|
51
51
|
"chalk": "^5.3.0",
|
|
52
52
|
"ora": "^8.0.1",
|