flavor-code 1.4.5-beta.1 → 1.4.5-beta.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/README.md CHANGED
@@ -387,7 +387,7 @@ Project runtime data lives under `.flavor/`:
387
387
  └── plugins/ # Project plugins
388
388
  ```
389
389
 
390
- Long-term memory distinguishes user preferences, behavioral feedback, project conventions, and external references. Automatically extracted project facts and external references enter a review inbox that survives restarts; a high model score alone cannot save them. Review cards show whether an exact user quote supports a candidate. Use `Ctrl+Y` to save or `Ctrl+N` to ignore; `/memory` shows pending and decision counts. Explicit `/remember` still saves directly. Secrets, tokens, and raw tool output are rejected.
390
+ Long-term memory distinguishes user preferences, behavioral feedback, project conventions, and external references. Automatically extracted project facts and external references enter a review inbox that survives restarts; a high model score alone cannot save them. Review cards show whether an exact user quote supports a candidate. Use `Ctrl+Y` to save or `Ctrl+N` to ignore; on macOS, `Command+Y` and `Command+N` also work when the terminal passes those keys through. `/memory` shows pending and decision counts. Explicit `/remember` still saves directly. Secrets, tokens, and raw tool output are rejected.
391
391
 
392
392
  Image prompts support PNG, JPEG, and WebP, with a 5 MiB per-image maximum and up to 5 images per prompt. The desktop app supports picking or drag-and-drop; CLI clipboard images currently work on Windows and macOS. Standard CLI paste prefers clipboard text and creates an image attachment only when no usable text flavor is available; use `/paste-image` when both flavors exist and the image is intended.
393
393
 
package/README.zh-CN.md CHANGED
@@ -387,7 +387,7 @@ maxIterations: 30
387
387
  └── plugins/ # 项目插件
388
388
  ```
389
389
 
390
- 长期记忆会区分用户偏好、行为反馈、项目约定和外部引用。自动提取的项目约定和外部引用会进入可跨会话保留的审核队列,模型自评分再高也不会直接写入;卡片会标明是否有可核对的用户原话。使用 `Ctrl+Y` 保存或 `Ctrl+N` 忽略;`/memory` 显示待审核数量与采纳、忽略统计。明确的 `/remember` 仍直接保存。密钥、Token 和原始工具输出不会作为候选保存。
390
+ 长期记忆会区分用户偏好、行为反馈、项目约定和外部引用。自动提取的项目约定和外部引用会进入可跨会话保留的审核队列,模型自评分再高也不会直接写入;卡片会标明是否有可核对的用户原话。使用 `Ctrl+Y` 保存或 `Ctrl+N` 忽略;macOS 终端传递按键时也支持 `Command+Y` 和 `Command+N`。`/memory` 显示待审核数量与采纳、忽略统计。明确的 `/remember` 仍直接保存。密钥、Token 和原始工具输出不会作为候选保存。
391
391
 
392
392
  图片提示支持 PNG、JPEG 和 WebP,单图最大 5 MiB、每次最多 5 张。桌面端支持选择或拖放;CLI 剪贴板图片目前支持 Windows 和 macOS。CLI 标准粘贴会优先使用剪贴板文字,只有没有可用文字时才把剪贴板图像添加为附件;剪贴板同时含有文字和图片但需要图片时,使用 `/paste-image`。
393
393
 
@@ -2501,6 +2501,14 @@ function isPlatformShortcut(character, key, letter, platform = process.platform)
2501
2501
  if (character.toLowerCase() !== letter.toLowerCase()) return false;
2502
2502
  return platform === "darwin" ? key.super || key.ctrl : key.ctrl;
2503
2503
  }
2504
+ function memoryReviewAction(character, key, platform = process.platform) {
2505
+ if (isPlatformShortcut(character, key, "y", platform)) return "accept";
2506
+ if (isPlatformShortcut(character, key, "n", platform)) return "dismiss";
2507
+ return null;
2508
+ }
2509
+ function memoryReviewModifierHint(platform = process.platform) {
2510
+ return platform === "darwin" ? "Ctrl/Cmd" : "Ctrl";
2511
+ }
2504
2512
  function isOutputToggleShortcut(character, key) {
2505
2513
  return key.ctrl && character.toLowerCase() === "o";
2506
2514
  }
@@ -3222,8 +3230,9 @@ function App({ workspace, home, resumeSession, instanceId, palAlias, onSessionEn
3222
3230
  return;
3223
3231
  }
3224
3232
  const pendingMemory = active?.memoryReviews.pending[0];
3225
- if (pendingMemory !== void 0 && key.ctrl && (character.toLowerCase() === "y" || character.toLowerCase() === "n")) {
3226
- if (character.toLowerCase() === "y") {
3233
+ const reviewAction = pendingMemory === void 0 ? null : memoryReviewAction(character, key);
3234
+ if (pendingMemory !== void 0 && reviewAction !== null) {
3235
+ if (reviewAction === "accept") {
3227
3236
  void active.memoryReviews.accept(pendingMemory.id).catch((error) => {
3228
3237
  dispatch({ type: "submit-error", message: safeUiError(error) });
3229
3238
  });
@@ -4136,6 +4145,7 @@ function QueueItems({ items, selection, scrollRef, onSelect }) {
4136
4145
  }
4137
4146
  function MemoryReviewCards({ reviews, autoDismissSeconds }) {
4138
4147
  const review = reviews[0];
4148
+ const modifier = memoryReviewModifierHint();
4139
4149
  const [remaining, setRemaining] = (0, import_react8.useState)(autoDismissSeconds);
4140
4150
  (0, import_react8.useEffect)(() => {
4141
4151
  if (autoDismissSeconds <= 0) return;
@@ -4162,9 +4172,15 @@ function MemoryReviewCards({ reviews, autoDismissSeconds }) {
4162
4172
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: "\u2502 Model-generated content is not stored until you approve it." }),
4163
4173
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "yellow", children: [
4164
4174
  "\u2514\u2500 ",
4165
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: true, children: "Ctrl+Y" }),
4175
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { bold: true, children: [
4176
+ modifier,
4177
+ "+Y"
4178
+ ] }),
4166
4179
  " save / ",
4167
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: true, children: "Ctrl+N" }),
4180
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { bold: true, children: [
4181
+ modifier,
4182
+ "+N"
4183
+ ] }),
4168
4184
  " ignore",
4169
4185
  autoDismissSeconds > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: true, color: "cyanBright", children: ` (auto-dismiss in ${remaining}s)` }) : " (stays pending until reviewed)"
4170
4186
  ] })
@@ -5175,6 +5191,8 @@ export {
5175
5191
  isPlatformShortcut,
5176
5192
  jumpScroll,
5177
5193
  jumpToAdjacentTurn,
5194
+ memoryReviewAction,
5195
+ memoryReviewModifierHint,
5178
5196
  navigateHistory,
5179
5197
  navigatePromptHistory,
5180
5198
  outputToggleShortcut,
package/dist/cli-main.js CHANGED
@@ -4173,7 +4173,7 @@ async function runInteractiveCli(props) {
4173
4173
  const [{ render, AlternateScreen }, { default: React }, { App }] = await Promise.all([
4174
4174
  import("./claude-ink-5X2DRKN6.js"),
4175
4175
  import("./react-M6JGXSJZ.js"),
4176
- import("./app-IUPRUKWJ.js")
4176
+ import("./app-LJV3GEXU.js")
4177
4177
  ]);
4178
4178
  const instance = await render(React.createElement(
4179
4179
  AlternateScreen,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flavor-code",
3
- "version": "1.4.5-beta.1",
3
+ "version": "1.4.5-beta.2",
4
4
  "author": "YachuanWzh",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,6 +1,6 @@
1
1
  # flavor-code 技术方案报告
2
2
 
3
- > 版本:1.4.5-beta.1 | 语言:TypeScript | 运行时:Node.js ≥20 | 包管理器:npm
3
+ > 版本:1.4.5-beta.2 | 语言:TypeScript | 运行时:Node.js ≥20 | 包管理器:npm
4
4
 
5
5
  ---
6
6