)]}'
{
  "commit": "6cad861fbb3dbb646d190b7a5efc2fe982ea3aa8",
  "tree": "a806f698dea80e939896d5bb8817b42979305b2e",
  "parents": [
    "33032d3d37b25537fe85f0afd9238ca2ece4bd71"
  ],
  "author": {
    "name": "Josh Bleecher Snyder",
    "email": "josharian@gmail.com",
    "time": "Fri May 30 19:25:39 2025 +0000"
  },
  "committer": {
    "name": "Josh Bleecher Snyder",
    "email": "josharian@gmail.com",
    "time": "Fri May 30 12:34:24 2025 -0700"
  },
  "message": "webui: fix multiple choice to append instead of replace chat content\n\nFix multiple choice button behavior to append selected text to existing\nchat input content instead of replacing it entirely, providing a better\nuser experience when users have already typed text.\n\nProblem Analysis:\nWhen users clicked multiple choice buttons, the _handleMutlipleChoiceSelected\nmethod was replacing all existing content in the chat input textarea:\n\n    chatInput.content \u003d e.detail.responseText;  // Replaces everything\n\nThis meant if users had typed some text and then clicked a multiple choice\noption, their previous text would be completely lost.\n\nImplementation:\nModified _handleMutlipleChoiceSelected in sketch-app-shell.ts to:\n\n1. Check if existing content is present in the chat input\n2. If content exists, add proper spacing (\\n\\n) between existing and new text\n3. Append the selected response text instead of replacing\n4. Call adjustChatSpacing() to resize textarea for new content\n5. Maintain focus on the input field\n\nTechnical Details:\n- Uses same append pattern as _handleDiffComment method in chat input\n- Adds two newlines for proper visual separation when appending\n- Triggers textarea height adjustment via requestAnimationFrame\n- Preserves existing behavior when chat input is empty (no spacing added)\n\nTesting:\n- All existing Playwright tests continue to pass (40 passed, 4 skipped)\n- TypeScript compilation successful with no errors\n- Changes isolated to single method with clear behavioral improvement\n\nThis ensures users can build up their messages incrementally by typing\ntext and then selecting from multiple choice options without losing\ntheir previous input.\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\nChange-ID: s284c59aa73ee4311k\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bdab955d2eec7bf1ea5301f5c6ade3684a2ff51d",
      "old_mode": 33188,
      "old_path": "webui/src/web-components/sketch-app-shell.ts",
      "new_id": "0659241d8bddddc9ab8e6afd3434cc1e4b3619af",
      "new_mode": 33188,
      "new_path": "webui/src/web-components/sketch-app-shell.ts"
    }
  ]
}
