@vibetasks/cli 0.6.7 → 0.6.8

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.
@@ -497,9 +497,12 @@ var SessionManager = class {
497
497
  if (store.currentSession) {
498
498
  await this.endSession();
499
499
  }
500
+ const maxShortId = store.sessions.reduce((max, s) => Math.max(max, s.shortId || 0), 0);
501
+ const nextShortId = maxShortId + 1;
500
502
  const session = {
501
503
  id: this.generateSessionId(),
502
504
  fullId: randomUUID(),
505
+ shortId: nextShortId,
503
506
  startedAt: (/* @__PURE__ */ new Date()).toISOString(),
504
507
  project,
505
508
  actions: []
@@ -640,7 +643,7 @@ var addCommand = new Command2("add").description("Add a new task").argument("<ti
640
643
  } else {
641
644
  try {
642
645
  const detected = await detectProject(process.cwd());
643
- projectTag = detected.name;
646
+ projectTag = detected.fullName || detected.name;
644
647
  if (process.env.TASKFLOW_VERBOSE) {
645
648
  console.log(chalk3.gray(`Detected project: ${projectTag} (${detected.source})`));
646
649
  }
@@ -794,13 +797,14 @@ var ShortIdManager = class {
794
797
  this.storePath = join2(homedir2(), ".vibetasks", "short-ids.json");
795
798
  }
796
799
  /**
797
- * Save mappings from a list of task IDs
798
- * Short IDs are assigned 1, 2, 3... based on array order
800
+ * Save mappings from a list of tasks with their short_ids
801
+ * Uses the stable short_id from the database
799
802
  */
800
- async saveMappings(taskIds) {
801
- const mappings = taskIds.slice(0, this.maxIds).map((fullId, index) => ({
802
- shortId: index + 1,
803
- fullId,
803
+ async saveMappings(tasks) {
804
+ const mappings = tasks.filter((t) => t.short_id).slice(0, this.maxIds).map((task, index) => ({
805
+ shortId: task.short_id,
806
+ // Use actual short_id from database
807
+ fullId: task.id,
804
808
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
805
809
  }));
806
810
  const store = {
@@ -929,7 +933,10 @@ ${filterMessages[filter] || "No tasks found"}.
929
933
  const displayTasks = tasks.slice(0, limit);
930
934
  const shortIdManager = new ShortIdManager();
931
935
  if (options.shortIds) {
932
- await shortIdManager.saveMappings(displayTasks.map((t) => t.id));
936
+ await shortIdManager.saveMappings(displayTasks.map((t) => ({
937
+ id: t.id,
938
+ short_id: t.short_id
939
+ })));
933
940
  }
934
941
  const table = new Table({
935
942
  head: options.shortIds ? [
@@ -970,7 +977,7 @@ ${filterMessages[filter] || "No tasks found"}.
970
977
  };
971
978
  const priorityColor = priorityColors[task.priority || "none"];
972
979
  const statusColor = statusColors[task.status || "todo"];
973
- const shortId = chalk4.yellow.bold(`${index + 1}`);
980
+ const shortId = chalk4.yellow.bold(`${task.short_id || index + 1}`);
974
981
  const id = task.id.substring(0, 8);
975
982
  const status = statusColor(`${statusEmojis[task.status || "todo"]} ${task.status || "todo"}`);
976
983
  const title = task.status === "done" ? chalk4.strikethrough(task.title) : task.title;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibetasks/cli",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
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",