kimiflare 0.8.0 → 0.8.2

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/dist/index.js CHANGED
@@ -1252,7 +1252,8 @@ async function checkForUpdate(force = false) {
1252
1252
  if (!force) {
1253
1253
  const cached = await readCache();
1254
1254
  if (cached) {
1255
- return { hasUpdate: cached.hasUpdate, localVersion, latestVersion: cached.latestVersion };
1255
+ const hasUpdate2 = isNewer(localVersion, cached.latestVersion);
1256
+ return { hasUpdate: hasUpdate2, localVersion, latestVersion: cached.latestVersion };
1256
1257
  }
1257
1258
  }
1258
1259
  const latestVersion = await fetchLatestVersion();
@@ -1260,7 +1261,7 @@ async function checkForUpdate(force = false) {
1260
1261
  return { hasUpdate: false, localVersion, latestVersion: null };
1261
1262
  }
1262
1263
  const hasUpdate = isNewer(localVersion, latestVersion);
1263
- await writeCache({ checkedAt: Date.now(), latestVersion, hasUpdate });
1264
+ await writeCache({ checkedAt: Date.now(), latestVersion });
1264
1265
  return { hasUpdate, localVersion, latestVersion };
1265
1266
  }
1266
1267
  async function isGitRepo() {
@@ -1901,7 +1902,7 @@ var init_resume_picker = __esm({
1901
1902
  import { Box as Box8, Text as Text8 } from "ink";
1902
1903
  import SelectInput3 from "ink-select-input";
1903
1904
  import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
1904
- function ThemePicker({ themes, current, onPick }) {
1905
+ function ThemePicker({ themes, current, onPick, onPreview }) {
1905
1906
  const items = themes.map((t) => ({
1906
1907
  label: t.label,
1907
1908
  value: t.name,
@@ -1918,7 +1919,7 @@ function ThemePicker({ themes, current, onPick }) {
1918
1919
  onHighlight: (item) => {
1919
1920
  if (item.value !== "__cancel__") {
1920
1921
  const highlighted = themes.find((t) => t.name === item.value);
1921
- if (highlighted) onPick(highlighted);
1922
+ if (highlighted) onPreview?.(highlighted);
1922
1923
  }
1923
1924
  },
1924
1925
  onSelect: (item) => {
@@ -1929,10 +1930,7 @@ function ThemePicker({ themes, current, onPick }) {
1929
1930
  itemComponent: ({ label, isSelected }) => {
1930
1931
  const theme = themes.find((t) => t.label === label);
1931
1932
  const color = theme?.accent ?? current.accent;
1932
- return /* @__PURE__ */ jsx8(Box8, { children: /* @__PURE__ */ jsxs8(Text8, { color, bold: isSelected, dimColor: !isSelected, children: [
1933
- isSelected ? "\u203A " : " ",
1934
- label
1935
- ] }) });
1933
+ return /* @__PURE__ */ jsx8(Box8, { children: /* @__PURE__ */ jsx8(Text8, { color, bold: isSelected, dimColor: !isSelected, children: label }) });
1936
1934
  }
1937
1935
  }
1938
1936
  ) })
@@ -4145,7 +4143,7 @@ use: /thinking low | medium | high`
4145
4143
  return /* @__PURE__ */ jsx13(Box12, { flexDirection: "column", children: /* @__PURE__ */ jsx13(ResumePicker, { sessions: resumeSessions, onPick: handleResumePick, theme }) });
4146
4144
  }
4147
4145
  if (showThemePicker) {
4148
- return /* @__PURE__ */ jsx13(Box12, { flexDirection: "column", children: /* @__PURE__ */ jsx13(ThemePicker, { themes: themeList(), current: theme, onPick: handleThemePick }) });
4146
+ return /* @__PURE__ */ jsx13(Box12, { flexDirection: "column", children: /* @__PURE__ */ jsx13(ThemePicker, { themes: themeList(), current: theme, onPick: handleThemePick, onPreview: (t) => setTheme(t) }) });
4149
4147
  }
4150
4148
  const hasConversation = events.some((e) => e.kind === "user" || e.kind === "assistant");
4151
4149
  return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [