kimiflare 0.48.0 → 0.48.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
@@ -8248,7 +8248,7 @@ var init_cloud_quota_message = __esm({
8248
8248
 
8249
8249
  // src/ui/chat.tsx
8250
8250
  import React4 from "react";
8251
- import { Box as Box5, Text as Text5, Static } from "ink";
8251
+ import { Box as Box5, Text as Text5 } from "ink";
8252
8252
  import Spinner2 from "ink-spinner";
8253
8253
  import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
8254
8254
  function toolSignature(name, args) {
@@ -8265,8 +8265,6 @@ var init_chat = __esm({
8265
8265
  init_cloud_quota_message();
8266
8266
  ChatView = React4.memo(function ChatView2({ events, showReasoning, verbose, intentTier }) {
8267
8267
  const theme = useTheme();
8268
- const finalized = [];
8269
- const active = [];
8270
8268
  const toolCounts = /* @__PURE__ */ new Map();
8271
8269
  for (const e of events) {
8272
8270
  if (e.kind === "tool") {
@@ -8278,31 +8276,14 @@ var init_chat = __esm({
8278
8276
  for (const [sig, count] of toolCounts) {
8279
8277
  if (count >= 3) repeatedSigs.add(sig);
8280
8278
  }
8281
- for (let i = 0; i < events.length; i++) {
8282
- const e = events[i];
8283
- const isStreaming = e.kind === "assistant" && e.streaming;
8284
- if (isStreaming) {
8285
- active.push(e);
8286
- } else {
8287
- const prev = events[i - 1];
8288
- const showSeparator = !!(e.kind === "user" && prev && (prev.kind === "assistant" || prev.kind === "tool"));
8289
- finalized.push({ id: e.key, evt: e, showSeparator });
8290
- }
8291
- }
8292
- return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
8293
- /* @__PURE__ */ jsx6(Static, { items: finalized, children: (item) => /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
8294
- item.showSeparator && /* @__PURE__ */ jsx6(Box5, { marginY: 1, children: /* @__PURE__ */ jsx6(Text5, { color: theme.info.color, children: "\u2500".repeat(40) }) }),
8295
- /* @__PURE__ */ jsx6(EventView, { evt: item.evt, showReasoning, verbose, repeatedSigs, intentTier })
8296
- ] }, item.id) }),
8297
- active.map((e, i) => {
8298
- const prevEvt = i > 0 ? active[i - 1] : finalized[finalized.length - 1]?.evt;
8299
- const showSeparator = e.kind === "user" && prevEvt && (prevEvt.kind === "assistant" || prevEvt.kind === "tool");
8300
- return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
8301
- showSeparator && /* @__PURE__ */ jsx6(Box5, { marginY: 1, children: /* @__PURE__ */ jsx6(Text5, { color: theme.info.color, children: "\u2500".repeat(40) }) }),
8302
- /* @__PURE__ */ jsx6(EventView, { evt: e, showReasoning, verbose, repeatedSigs, intentTier })
8303
- ] }, e.key);
8304
- })
8305
- ] });
8279
+ return /* @__PURE__ */ jsx6(Box5, { flexDirection: "column", children: events.map((e, i) => {
8280
+ const prev = events[i - 1];
8281
+ const showSeparator = !!(e.kind === "user" && prev && (prev.kind === "assistant" || prev.kind === "tool"));
8282
+ return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
8283
+ showSeparator && /* @__PURE__ */ jsx6(Box5, { marginY: 1, children: /* @__PURE__ */ jsx6(Text5, { color: theme.info.color, children: "\u2500".repeat(40) }) }),
8284
+ /* @__PURE__ */ jsx6(EventView, { evt: e, showReasoning, verbose, repeatedSigs, intentTier })
8285
+ ] }, e.key);
8286
+ }) });
8306
8287
  });
8307
8288
  EventView = React4.memo(function EventView2({
8308
8289
  evt,
@@ -12697,10 +12678,7 @@ var init_builtins = __esm({
12697
12678
  { name: "plan", description: "Switch to plan mode", source: "builtin" },
12698
12679
  { name: "auto", description: "Switch to auto mode", source: "builtin" },
12699
12680
  { name: "edit", description: "Switch to edit mode", source: "builtin" },
12700
- { name: "thinking", argHint: "low|medium|high", description: "Set reasoning effort", source: "builtin" },
12701
- { name: "effort", argHint: "low|medium|high", description: "Alias for /thinking", source: "builtin" },
12702
12681
  { name: "reasoning", description: "Toggle reasoning visibility", source: "builtin" },
12703
- { name: "agent", argHint: "[on|off|status]", description: "Multi-agent mode controls", source: "builtin" },
12704
12682
  { name: "memory", argHint: "[on|off|clear|search ...]", description: "Manage memory", source: "builtin" },
12705
12683
  { name: "cost", argHint: "[on|off]", description: "Show cost report or toggle attribution", source: "builtin" },
12706
12684
  { name: "gateway", argHint: "[status|off|<id>|cache-ttl|skip-cache|...]", description: "Manage AI Gateway", source: "builtin" },
@@ -17568,39 +17546,6 @@ ${wcagWarnings.join("\n")}` }
17568
17546
  setEvents((e) => [...e, { kind: "info", key: mkKey(), text: `gateway enabled: ${rest[0]}` }]);
17569
17547
  return true;
17570
17548
  }
17571
- if (c === "/thinking" || c === "/effort") {
17572
- if (!arg) {
17573
- setEvents((e) => [
17574
- ...e,
17575
- {
17576
- kind: "info",
17577
- key: mkKey(),
17578
- text: `current: ${effort} \xB7 ${EFFORT_DESCRIPTIONS[effort]}
17579
- use: /thinking low | medium | high`
17580
- }
17581
- ]);
17582
- return true;
17583
- }
17584
- if (arg === "low" || arg === "medium" || arg === "high") {
17585
- setEffort(arg);
17586
- if (cfg) void saveConfig({ ...cfg, reasoningEffort: arg }).catch(() => {
17587
- });
17588
- setEvents((e) => [
17589
- ...e,
17590
- {
17591
- kind: "info",
17592
- key: mkKey(),
17593
- text: `thinking: ${arg} \xB7 ${EFFORT_DESCRIPTIONS[arg]}`
17594
- }
17595
- ]);
17596
- return true;
17597
- }
17598
- setEvents((e) => [
17599
- ...e,
17600
- { kind: "info", key: mkKey(), text: "usage: /thinking low | medium | high" }
17601
- ]);
17602
- return true;
17603
- }
17604
17549
  if (c === "/mode") {
17605
17550
  if (!arg) {
17606
17551
  setEvents((e) => [
@@ -18238,7 +18183,6 @@ ${lines.join("\n")}` }]);
18238
18183
  const lines = [
18239
18184
  "commands:",
18240
18185
  " /mode edit|plan|auto switch agent mode",
18241
- " /thinking low|medium|high set reasoning effort",
18242
18186
  " /skills list|add|edit|... manage skills",
18243
18187
  " /memory on|off|clear manage memory",
18244
18188
  " /cost show cost report",
@@ -18256,7 +18200,7 @@ ${lines.join("\n")}` }]);
18256
18200
  }
18257
18201
  return false;
18258
18202
  },
18259
- [cfg, exit, usage, effort, theme, mode, openResumePicker, runCompact, runInit, initMcp, setCfg, setShowRemoteDashboard, setSelectedRemoteSession]
18203
+ [cfg, exit, usage, theme, mode, openResumePicker, runCompact, runInit, initMcp, setCfg, setShowRemoteDashboard, setSelectedRemoteSession]
18260
18204
  );
18261
18205
  const handleCommandSave = useCallback2(
18262
18206
  async (opts2) => {
@@ -19071,7 +19015,7 @@ ${lines.join("\n")}` }]);
19071
19015
  }
19072
19016
  const hasConversation = events.some((e) => e.kind === "user" || e.kind === "assistant");
19073
19017
  return /* @__PURE__ */ jsx24(ThemeProvider, { theme, children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", children: [
19074
- !hasConversation ? /* @__PURE__ */ jsx24(Welcome, {}) : /* @__PURE__ */ jsx24(ChatView, { events, showReasoning, verbose, intentTier: intentTier ?? void 0 }),
19018
+ !hasConversation && events.length === 0 ? /* @__PURE__ */ jsx24(Welcome, {}) : /* @__PURE__ */ jsx24(ChatView, { events, showReasoning, verbose, intentTier: intentTier ?? void 0 }),
19075
19019
  perm ? /* @__PURE__ */ jsx24(
19076
19020
  PermissionModal,
19077
19021
  {
@@ -19222,7 +19166,7 @@ async function renderApp(cfg, updateResult, lspScope = "global", lspProjectPath
19222
19166
  );
19223
19167
  await instance.waitUntilExit();
19224
19168
  }
19225
- var MAX_GITIGNORE_SIZE, FEEDBACK_WORKER_URL, CONTEXT_LIMIT, AUTO_COMPACT_SUGGEST_PCT, MAX_EVENTS, nextAssistantId, nextKey, mkKey, MAX_IMAGES_PER_MESSAGE, EFFORT_DESCRIPTIONS;
19169
+ var MAX_GITIGNORE_SIZE, FEEDBACK_WORKER_URL, CONTEXT_LIMIT, AUTO_COMPACT_SUGGEST_PCT, MAX_EVENTS, nextAssistantId, nextKey, mkKey, MAX_IMAGES_PER_MESSAGE;
19226
19170
  var init_app = __esm({
19227
19171
  "src/app.tsx"() {
19228
19172
  "use strict";
@@ -19294,11 +19238,6 @@ var init_app = __esm({
19294
19238
  nextKey = 1;
19295
19239
  mkKey = () => `evt_${nextKey++}`;
19296
19240
  MAX_IMAGES_PER_MESSAGE = 10;
19297
- EFFORT_DESCRIPTIONS = {
19298
- low: "low \u2014 fastest; lightest reasoning. Best for simple Q&A, small edits, quick coordination.",
19299
- medium: "medium \u2014 balanced (default). Solid quality on most edits, fast on trivial prompts.",
19300
- high: "high \u2014 deepest reasoning; slowest. Best for complex debugging, architecture, multi-file refactors."
19301
- };
19302
19241
  }
19303
19242
  });
19304
19243