@liyang8246/dsh-accounts 0.1.9 → 0.1.10

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.
Files changed (2) hide show
  1. package/lib/client.js +18 -8
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -600,7 +600,7 @@
600
600
  publish();
601
601
  },
602
602
  setText(next) {
603
- const value = next.trim();
603
+ const value = next.replace(/[\r\n\t]+/g, " ");
604
604
  dirty = true;
605
605
  if (value === text) return;
606
606
  text = value;
@@ -609,7 +609,7 @@
609
609
  if (timer !== void 0) clearTimeout(timer);
610
610
  timer = setTimeout(() => {
611
611
  timer = void 0;
612
- save?.(value);
612
+ save?.(value.trim());
613
613
  }, saveDelay);
614
614
  },
615
615
  keywords: () => parsed,
@@ -670,7 +670,9 @@
670
670
  const directory = original.call(models, sessionId);
671
671
  if (!patched.has(directory)) {
672
672
  patched.add(directory);
673
- filterDirectory(directory, filter);
673
+ try {
674
+ filterDirectory(directory, filter);
675
+ } catch {}
674
676
  }
675
677
  return directory;
676
678
  };
@@ -684,11 +686,19 @@
684
686
  const read = () => {
685
687
  const snapshot = source.getSnapshot();
686
688
  const key = filter.getSnapshot();
687
- if (cache === void 0 || cache.snapshot !== snapshot || cache.key !== key) cache = {
688
- snapshot,
689
- key,
690
- value: filterModels(snapshot, filter.keywords())
691
- };
689
+ if (cache === void 0 || cache.snapshot !== snapshot || cache.key !== key) {
690
+ let value;
691
+ try {
692
+ value = filterModels(snapshot, filter.keywords());
693
+ } catch {
694
+ value = snapshot;
695
+ }
696
+ cache = {
697
+ snapshot,
698
+ key,
699
+ value
700
+ };
701
+ }
692
702
  return cache.value;
693
703
  };
694
704
  const wrapped = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@liyang8246/dsh-accounts",
3
3
  "type": "module",
4
- "version": "0.1.9",
4
+ "version": "0.1.10",
5
5
  "description": "Independent multi-account Codex, OpenCode Go and CommandCode Go plugin for DeepSeek Harness.",
6
6
  "repository": { "type": "git", "url": "https://github.com/liyang8246/dsh-zolin.git", "directory": "packages/dsh-accounts" },
7
7
  "exports": {