snow-ai 0.6.21 → 0.6.22

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/bundle/cli.mjs CHANGED
@@ -48069,9 +48069,11 @@ PLACEHOLDER_FOR_WORKFLOW_SECTION
48069
48069
  - Reduces cognitive load - AI doesn't need to remember everything
48070
48070
  - Enables recovery if conversation is interrupted
48071
48071
 
48072
- **Formatting rule:**
48073
- - TODO item content SHOULD start with a numeric prefix to explicitly mark execution order, e.g. "1. ...", "2. ...", "3. ..."
48074
- - In continuous conversations, BEFORE calling todo-add, run todo-get (paired with an action tool) to inspect existing items and choose the next available sequence number (typically max(existingPrefix)+1). This prevents duplicate numbering across multiple turns.
48072
+ **Formatting rule - CRITICAL for sequential numbering:**
48073
+ - TODO item content MUST start with a numeric prefix to mark execution order, e.g. "1. ...", "2. ...", "3. ..."
48074
+ - **REQUIRED: Get existing TODOs first** - BEFORE calling todo-add, ALWAYS run todo-get (paired with an action tool in the same call) to inspect current items
48075
+ - **Calculate next sequence number** - Extract the highest existing numeric prefix from todo-get results, then use max(existingPrefix)+1 for new items
48076
+ - **Example workflow**: todo-get + filesystem-read("file.ts") \u2192 see existing "1. Read file", "2. Analyze code" \u2192 add new items starting with "3. ..."
48075
48077
 
48076
48078
  **WHEN TO USE (Default for most work):**
48077
48079
  - ANY task touching 2+ files
@@ -441737,6 +441739,7 @@ var init_sessionManager = __esm({
441737
441739
  }
441738
441740
  }
441739
441741
  async deleteSession(sessionId) {
441742
+ var _a21;
441740
441743
  let sessionDeleted = false;
441741
441744
  try {
441742
441745
  const oldSessionPath = path35.join(this.sessionsDir, `${sessionId}.json`);
@@ -441779,6 +441782,10 @@ var init_sessionManager = __esm({
441779
441782
  }
441780
441783
  }
441781
441784
  if (sessionDeleted) {
441785
+ this.invalidateCache();
441786
+ if (((_a21 = this.currentSession) == null ? void 0 : _a21.id) === sessionId) {
441787
+ this.clearCurrentSession();
441788
+ }
441782
441789
  try {
441783
441790
  const todoService2 = getTodoService();
441784
441791
  await todoService2.deleteTodoList(sessionId);
@@ -442533,6 +442540,12 @@ This ensures efficient workflow and prevents unnecessary wait times.`,
442533
442540
  PARALLEL CALLS ONLY: MUST pair with other tools (todo-add + filesystem-read/etc).
442534
442541
  NEVER call todo-add alone - always combine with an action tool.
442535
442542
 
442543
+ SEQUENCE NUMBERING - CRITICAL:
442544
+ - ALWAYS run todo-get FIRST (in the same parallel call) to check existing items before adding new ones
442545
+ - Extract the highest numeric prefix from existing TODOs, then continue from max+1
442546
+ - Example: If todo-get returns "1. Read file", "2. Analyze code", new items must start with "3. ..."
442547
+ - This prevents duplicate numbering in continuous conversations
442548
+
442536
442549
  WHEN TO USE (Very common):
442537
442550
  - Start ANY multi-step task \u2192 Create TODO list immediately
442538
442551
  - User adds new requirements \u2192 Add tasks for new work
@@ -442542,7 +442555,8 @@ SUPPORTS BATCH ADDING:
442542
442555
  - Single: content="Task description"
442543
442556
  - Multiple: content=["Task 1", "Task 2", "Task 3"] (recommended for multi-step work)
442544
442557
 
442545
- EXAMPLE: todo-add(content=["Read file", "Modify code", "Test changes"]) + filesystem-read("file.ts")`,
442558
+ EXAMPLE (FIRST TIME): todo-add(content=["1. Read file", "2. Modify code"]) + filesystem-read("file.ts")
442559
+ EXAMPLE (CONTINUING): todo-get + todo-add(content=["3. Test changes", "4. Run build"])`,
442546
442560
  inputSchema: {
442547
442561
  type: "object",
442548
442562
  properties: {
@@ -555489,16 +555503,21 @@ var init_ProfilePanel = __esm({
555489
555503
  function parseSkillIdFromHeaderLine(line) {
555490
555504
  return line.replace(/^# Skill:\s*/i, "").trim() || "unknown";
555491
555505
  }
555492
- function restoreTextWithSkillPlaceholders(buffer, text3) {
555506
+ function restoreTextWithSkillPlaceholders(buffer, text3, options3 = {}) {
555493
555507
  if (!text3)
555494
555508
  return;
555509
+ const { usePastePlaceholderForLongPlainText = false, pastePlaceholderThreshold = 300 } = options3;
555495
555510
  const lines = text3.split("\n");
555496
555511
  let plain = "";
555497
555512
  const flushPlain = () => {
555498
- if (plain) {
555513
+ if (!plain)
555514
+ return;
555515
+ if (usePastePlaceholderForLongPlainText && plain.length > pastePlaceholderThreshold) {
555516
+ buffer.insert(plain);
555517
+ } else {
555499
555518
  buffer.insertRestoredText(plain);
555500
- plain = "";
555501
555519
  }
555520
+ plain = "";
555502
555521
  };
555503
555522
  let i = 0;
555504
555523
  while (i < lines.length) {
@@ -555683,7 +555702,9 @@ function ChatInput({ onSubmit, onCommand, placeholder = "Type your message...",
555683
555702
  const images = initialContent.images || [];
555684
555703
  if (images.length === 0) {
555685
555704
  if (text3) {
555686
- restoreTextWithSkillPlaceholders(buffer, text3);
555705
+ restoreTextWithSkillPlaceholders(buffer, text3, {
555706
+ usePastePlaceholderForLongPlainText: true
555707
+ });
555687
555708
  }
555688
555709
  } else {
555689
555710
  const imagePlaceholderPattern = /\[image #\d+\]/g;
@@ -555691,7 +555712,9 @@ function ChatInput({ onSubmit, onCommand, placeholder = "Type your message...",
555691
555712
  for (let i = 0; i < parts.length; i++) {
555692
555713
  const part = parts[i];
555693
555714
  if (part) {
555694
- restoreTextWithSkillPlaceholders(buffer, part);
555715
+ restoreTextWithSkillPlaceholders(buffer, part, {
555716
+ usePastePlaceholderForLongPlainText: true
555717
+ });
555695
555718
  }
555696
555719
  if (i < images.length) {
555697
555720
  const img = images[i];
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-ai",
3
- "version": "0.6.21",
3
+ "version": "0.6.22",
4
4
  "description": "Agentic coding in your terminal",
5
5
  "license": "MIT",
6
6
  "bin": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-ai",
3
- "version": "0.6.21",
3
+ "version": "0.6.22",
4
4
  "description": "Agentic coding in your terminal",
5
5
  "license": "MIT",
6
6
  "bin": {