@vibetasks/cli 0.6.6 → 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 +54 -6
- package/package.json +1 -1
package/dist/bin/vibetasks.js
CHANGED
|
@@ -673,10 +673,16 @@ var addCommand = new Command2("add").description("Add a new task").argument("<ti
|
|
|
673
673
|
done: false
|
|
674
674
|
})) || [];
|
|
675
675
|
let sessionId;
|
|
676
|
+
let sessionHistory = [];
|
|
676
677
|
if (createdBy === "ai") {
|
|
677
678
|
const sessionManager2 = getSessionManager();
|
|
678
679
|
const session = await sessionManager2.getOrCreateSession(projectTag);
|
|
679
680
|
sessionId = session.id;
|
|
681
|
+
sessionHistory = [{
|
|
682
|
+
session_id: session.id,
|
|
683
|
+
action: "created",
|
|
684
|
+
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
685
|
+
}];
|
|
680
686
|
}
|
|
681
687
|
const task = await taskOps.createTask({
|
|
682
688
|
title,
|
|
@@ -692,8 +698,10 @@ var addCommand = new Command2("add").description("Add a new task").argument("<ti
|
|
|
692
698
|
// AI tasks start vibing
|
|
693
699
|
energy_required: options.energy,
|
|
694
700
|
subtasks_json: subtasksJson,
|
|
695
|
-
session_id: sessionId
|
|
696
|
-
//
|
|
701
|
+
session_id: sessionId,
|
|
702
|
+
// Current AI session
|
|
703
|
+
session_history: sessionHistory
|
|
704
|
+
// Full history of sessions
|
|
697
705
|
});
|
|
698
706
|
if (options.tags && options.tags.length > 0) {
|
|
699
707
|
const tagIds = [];
|
|
@@ -1036,12 +1044,29 @@ No task found with ID starting with: ${id}
|
|
|
1036
1044
|
}
|
|
1037
1045
|
taskId = matchingTask.id;
|
|
1038
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
|
+
];
|
|
1039
1060
|
const contextNotes = options.notes || options.context;
|
|
1061
|
+
const updatePayload = {
|
|
1062
|
+
session_id: currentSession.id,
|
|
1063
|
+
session_history: updatedHistory
|
|
1064
|
+
};
|
|
1040
1065
|
if (contextNotes) {
|
|
1041
|
-
|
|
1066
|
+
updatePayload.context_notes = contextNotes;
|
|
1042
1067
|
}
|
|
1068
|
+
await taskOps.updateTask(taskId, updatePayload);
|
|
1043
1069
|
const task = await taskOps.completeTask(taskId);
|
|
1044
|
-
const sessionManager2 = getSessionManager();
|
|
1045
1070
|
await sessionManager2.logAction({
|
|
1046
1071
|
type: "task_completed",
|
|
1047
1072
|
description: `Completed: "${task.title}"`,
|
|
@@ -1111,15 +1136,38 @@ var vibingCommand = new Command5("vibing").alias("start").alias("v").description
|
|
|
1111
1136
|
taskId = selectedTask;
|
|
1112
1137
|
}
|
|
1113
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
|
+
}
|
|
1114
1155
|
await taskOps.updateTask(taskId, {
|
|
1115
1156
|
status: "vibing",
|
|
1116
|
-
completed: false
|
|
1157
|
+
completed: false,
|
|
1158
|
+
session_id: currentSession.id,
|
|
1159
|
+
// Update to current session
|
|
1160
|
+
session_history: updatedHistory
|
|
1117
1161
|
});
|
|
1118
|
-
const task = allTasks.find((t) => t.id === taskId);
|
|
1119
1162
|
spinner.succeed(chalk6.green("Now vibing on:"));
|
|
1120
1163
|
console.log(chalk6.white(`
|
|
1121
1164
|
${task?.title || taskId}
|
|
1122
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
|
+
}
|
|
1123
1171
|
console.log(chalk6.gray(" Tips:"));
|
|
1124
1172
|
console.log(chalk6.gray(" \u2022 Update context notes as you work"));
|
|
1125
1173
|
console.log(chalk6.gray(" \u2022 Run `vibetasks done " + taskId.slice(0, 8) + "` when finished"));
|
package/package.json
CHANGED