ghostfill 0.2.0 → 0.2.1

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.

Potentially problematic release.


This version of ghostfill might be problematic. Click here for more details.

package/dist/index.mjs CHANGED
@@ -523,7 +523,7 @@ var CSS2 = `
523
523
  width: 36px;
524
524
  height: 36px;
525
525
  border: none;
526
- border-radius: 10px;
526
+ border-radius: 50%;
527
527
  background: transparent;
528
528
  color: #a1a1aa;
529
529
  cursor: pointer;
@@ -1033,7 +1033,7 @@ function createOverlay2(options) {
1033
1033
  <div class="gf-pop-header">
1034
1034
  <h3><span class="gf-slash">/</span>ghostfill</h3>
1035
1035
  <div class="gf-header-right">
1036
- <span class="gf-version">v0.1.3</span>
1036
+ <span class="gf-version">v0.2.1</span>
1037
1037
  <button class="gf-theme-btn" id="gf-s-theme" title="Toggle theme">
1038
1038
  ${saved.theme === "dark" ? ICONS.sun : ICONS.moon}
1039
1039
  </button>
@@ -1075,17 +1075,17 @@ function createOverlay2(options) {
1075
1075
  <label class="gf-label">API Key</label>
1076
1076
  <input type="password" class="gf-input gf-input-mono" id="gf-s-key" placeholder="sk-..." autocomplete="off" spellcheck="false" />
1077
1077
  </div>
1078
- </div>
1079
- <div class="gf-sep"></div>
1080
- <div class="gf-field">
1081
- <div style="display:flex;align-items:center;justify-content:space-between">
1082
- <div style="display:flex;align-items:center;gap:4px">
1083
- <label class="gf-label" style="margin:0">Presets</label>
1084
- <span class="gf-help" id="gf-s-presets-help">?<span class="gf-help-tip">Saved prompt templates that add context when filling. Select a preset in the Fill panel to use it automatically.</span></span>
1078
+ <div class="gf-sep"></div>
1079
+ <div class="gf-field">
1080
+ <div style="display:flex;align-items:center;justify-content:space-between">
1081
+ <div style="display:flex;align-items:center;gap:4px">
1082
+ <label class="gf-label" style="margin:0">Presets</label>
1083
+ <span class="gf-help" id="gf-s-presets-help">?<span class="gf-help-tip">Saved prompt templates that add context when filling. Select a preset in the Fill panel to use it automatically.</span></span>
1084
+ </div>
1085
+ <button class="gf-preset-chip add" id="gf-s-preset-add" style="font-size:10px;padding:2px 6px">+ Add</button>
1085
1086
  </div>
1086
- <button class="gf-preset-chip add" id="gf-s-preset-add" style="font-size:10px;padding:2px 6px">+ Add</button>
1087
+ <div class="gf-preset-list" id="gf-s-preset-list"></div>
1087
1088
  </div>
1088
- <div class="gf-preset-list" id="gf-s-preset-list"></div>
1089
1089
  </div>
1090
1090
  <button class="gf-save-btn" id="gf-s-save">Save</button>
1091
1091
  </div>
@@ -1640,6 +1640,10 @@ function createOverlay2(options) {
1640
1640
  if (activePresetId === p.id) activePresetId = null;
1641
1641
  renderPresetList();
1642
1642
  updateFillPresetUI();
1643
+ const s = loadSettings(aiConfig?.provider || "openai");
1644
+ s.presets = presets;
1645
+ s.activePresetId = activePresetId;
1646
+ saveSettings(s);
1643
1647
  });
1644
1648
  pill.append(name, x);
1645
1649
  sPresetList.appendChild(pill);
@@ -1825,9 +1829,15 @@ No specific instructions \u2014 generate realistic, contextually appropriate dat
1825
1829
  }
1826
1830
  document.addEventListener("keydown", handleShortcut);
1827
1831
  document.addEventListener("keydown", (e) => {
1828
- if (e.key === "Escape" && currentPopover) {
1832
+ if (e.key !== "Escape") return;
1833
+ if (currentPopover) {
1829
1834
  e.preventDefault();
1830
1835
  openPopover(null);
1836
+ return;
1837
+ }
1838
+ if (state.active) {
1839
+ e.preventDefault();
1840
+ btnMinimize.click();
1831
1841
  }
1832
1842
  });
1833
1843
  function destroy() {