jinzd-ai-cli 0.4.23 → 0.4.24

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.
@@ -782,27 +782,40 @@ function renderFilteredSessions(filter) {
782
782
  </div>`;
783
783
  }).join('');
784
784
 
785
- // Click to load session (only in normal mode)
785
+ // Click to load session / double-click title to rename
786
786
  sessionListEl.querySelectorAll('.session-item').forEach(el => {
787
+ let clickTimer = null;
788
+
787
789
  el.addEventListener('click', (e) => {
788
790
  if (e.target.closest('.session-delete-btn') || e.target.closest('.session-batch-cb') || e.target.closest('.session-rename-input')) return;
789
791
  if (batchSelectMode) {
790
- // In batch mode, clicking the row toggles the checkbox
791
792
  const cb = el.querySelector('.session-batch-cb');
792
793
  if (cb) { cb.checked = !cb.checked; cb.dispatchEvent(new Event('change')); }
793
794
  return;
794
795
  }
796
+ // If clicking on the title text, delay to allow dblclick detection
797
+ if (!batchSelectMode && e.target.closest('.session-title')) {
798
+ if (clickTimer) return; // Already waiting
799
+ clickTimer = setTimeout(() => {
800
+ clickTimer = null;
801
+ const id = el.dataset.sessionId;
802
+ if (id) send({ type: 'command', name: 'session', args: ['load', id] });
803
+ }, 300);
804
+ return;
805
+ }
806
+ // Clicking elsewhere on the item — load immediately
795
807
  const id = el.dataset.sessionId;
796
808
  if (!id) return;
797
809
  send({ type: 'command', name: 'session', args: ['load', id] });
798
810
  });
799
811
 
800
- // Double-click session title to rename
801
812
  if (!batchSelectMode) {
802
813
  const titleEl = el.querySelector('.session-title');
803
814
  if (titleEl) {
804
815
  titleEl.addEventListener('dblclick', (e) => {
805
816
  e.stopPropagation();
817
+ e.preventDefault();
818
+ if (clickTimer) { clearTimeout(clickTimer); clickTimer = null; }
806
819
  startSessionRename(el, titleEl);
807
820
  });
808
821
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.23",
3
+ "version": "0.4.24",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",