@kyun.si/agy-polish 0.0.4-beta.4 → 0.0.4-beta.5

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
@@ -12,7 +12,9 @@ npx @kyun.si/agy-polish@beta setup
12
12
 
13
13
  In Windows PowerShell, use `npx.cmd` in place of `npx`.
14
14
 
15
- Choose when Codex should edit your replies, then start a new `agy` chat. Try `/polish Rewrite the previous reply in two sentences.` If Antigravity asks for permission, allow the `polish_reply` tool. Add `--advanced` to `setup` to choose a mode, model and reasoning effort, or say **“Set up reply polishing”** to change them in chat.
15
+ Choose Normal, Turbo, Manual, or Off. With polishing on, you can keep the Codex default or choose a model and a supported reasoning effort from your provider’s model list. Run `setup` again to change your choices, or use `/polish-settings` in Antigravity.
16
+
17
+ Start a new `agy` chat and try `/polish Rewrite the previous reply in two sentences.` If Antigravity asks for permission, allow the `polish_reply` tool.
16
18
 
17
19
  For a full reply rewrite, your Codex provider receives the current draft, its question and your editing directions. For a selected passage, it receives just that passage and the relevant directions.
18
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kyun.si/agy-polish",
3
- "version": "0.0.4-beta.4",
3
+ "version": "0.0.4-beta.5",
4
4
  "description": "Polish Antigravity replies with Codex · 用 Codex 润色 Antigravity 回复",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agy-polish",
3
3
  "displayName": "AGY Polish · 回复润色",
4
- "version": "0.0.4-beta.4",
4
+ "version": "0.0.4-beta.5",
5
5
  "description": "Polish Antigravity replies with your local Codex CLI. 用本机 Codex CLI 润色 Antigravity 的回复。",
6
6
  "author": { "name": "mreasonyang" },
7
7
  "repository": "https://github.com/mreasonyang/agent-polish",
@@ -6,7 +6,7 @@ import { parseArgs } from 'node:util';
6
6
  import { agyExecutable, canonical, compareVersions, interactiveTerminal, LEGACY_BOTH_SETUP, npmChannel, windows } from './installer_common.mjs';
7
7
  import { systemLanguage, tr } from './installer_locale.mjs';
8
8
  import { withLock } from './installer_lock.mjs';
9
- import { chooseOnboardingMode, chooseOption, thinkingLabels, waitForCatalog } from './installer_terminal.mjs';
9
+ import { chooseOption, thinkingLabels, waitForCatalog } from './installer_terminal.mjs';
10
10
  import { AGY_INSTALL, installAgyBootstrap } from './agy_bootstrap.mjs';
11
11
  import {
12
12
  AgyInstallError, agyProfile, requireAgyCli, installedAgy, validateAgyBundle,
@@ -100,27 +100,23 @@ async function chooseAgyModel(settings, { model, effort }, { signedIn }, lang) {
100
100
  }
101
101
  }
102
102
 
103
- async function prepareAgySetup(interactive, advanced, lang) {
103
+ async function prepareAgySetup(interactive, lang) {
104
104
  const { settings, current } = await loadAgySettings();
105
105
  const t = (zh, en) => tr(zh, en, lang);
106
106
  const patch = {};
107
107
  let mode = current.mode;
108
108
  if (interactive) {
109
109
  console.log(t(...agyDataNotice));
110
- const title = t('在 Antigravity 中如何润色?', 'How should Antigravity replies be polished?');
111
- if (advanced) {
112
- const modes = Object.entries(agyModeLabels).map(([id, label]) => ({
113
- id, name: t(...label) + (id === current.mode ? t('(当前)', ' (current)') : '')
114
- }));
115
- mode = await chooseOption(title, modes, lang, process.stdin, process.stdout, current.mode);
116
- } else {
117
- mode = await chooseOnboardingMode(title, current.mode, lang);
118
- }
110
+ const modes = Object.entries(agyModeLabels).map(([id, label]) => ({
111
+ id, name: t(...label) + (id === current.mode ? t('(当前)', ' (current)') : '')
112
+ }));
113
+ mode = await chooseOption(t('在 Antigravity 中如何润色?', 'How should Antigravity replies be polished?'),
114
+ modes, lang, process.stdin, process.stdout, current.mode);
119
115
  if (!mode) return null;
120
116
  if (mode !== current.mode) patch.mode = mode;
121
117
  }
122
118
  let provider;
123
- if (mode !== 'off' && interactive && advanced) {
119
+ if (mode !== 'off' && interactive) {
124
120
  provider = await checkCodexProvider(lang);
125
121
  if (provider.ready || provider.canListModels) {
126
122
  const model = await chooseAgyModel(settings, current, provider, lang);
@@ -241,8 +237,8 @@ async function runAgyHost(action, plan, installDependency, lang) {
241
237
 
242
238
  function usage(lang) {
243
239
  return tr(
244
- '用法:agy-polish [setup|update|doctor|uninstall] [--install-agy] [--advanced]\nsetup(默认命令)安装 Antigravity 插件,由 Codex 润色回复。\n--advanced 在 setup 中显示完整的模式和模型选项。--install-agy 可在 setup 或 update 中安装 Google 的 Antigravity CLI。\n-h, --help 显示帮助。',
245
- 'Usage: agy-polish [setup|update|doctor|uninstall] [--install-agy] [--advanced]\nsetup (default) installs the Antigravity plugin to polish replies with Codex.\n--advanced shows the full mode and model choices during setup. --install-agy can install Google’s Antigravity CLI during setup or update.\n-h, --help shows this help.',
240
+ '用法:agy-polish [setup|update|doctor|uninstall] [--install-agy]\nsetup(默认命令)安装 Antigravity 插件,可选择润色模式、Codex 模型和思考等级。\n--install-agy 可在 setup 或 update 中安装 Google 的 Antigravity CLI。\n-h, --help 显示帮助。',
241
+ 'Usage: agy-polish [setup|update|doctor|uninstall] [--install-agy]\nsetup (default) installs the Antigravity plugin and lets you choose the polishing mode, Codex model and reasoning effort.\n--install-agy can install Google’s Antigravity CLI during setup or update.\n-h, --help shows this help.',
246
242
  lang
247
243
  );
248
244
  }
@@ -253,7 +249,7 @@ export async function main(args = process.argv.slice(2)) {
253
249
  console.log(usage(lang));
254
250
  return 0;
255
251
  }
256
- let action, installDependency, advanced;
252
+ let action, installDependency;
257
253
  try {
258
254
  const { values, positionals } = parseArgs({
259
255
  args, allowPositionals: true,
@@ -261,9 +257,8 @@ export async function main(args = process.argv.slice(2)) {
261
257
  });
262
258
  action = positionals[0] ?? 'setup';
263
259
  installDependency = values['install-agy'] ?? false;
264
- advanced = values.advanced ?? false;
265
260
  if (positionals.length > 1 || !['setup', 'update', 'doctor', 'uninstall'].includes(action) ||
266
- (advanced && action !== 'setup') || (installDependency && !['setup', 'update'].includes(action))) {
261
+ (values.advanced && action !== 'setup') || (installDependency && !['setup', 'update'].includes(action))) {
267
262
  throw new Error('invalid installer arguments');
268
263
  }
269
264
  } catch {
@@ -271,7 +266,7 @@ export async function main(args = process.argv.slice(2)) {
271
266
  return 2;
272
267
  }
273
268
  try {
274
- const plan = action === 'setup' ? await prepareAgySetup(interactiveTerminal(), advanced, lang) : undefined;
269
+ const plan = action === 'setup' ? await prepareAgySetup(interactiveTerminal(), lang) : undefined;
275
270
  if (plan === null) {
276
271
  const legacy = process.env[LEGACY_BOTH_SETUP];
277
272
  if (legacy === 'codex-complete') console.log(tr('Codex 配置已完成。Antigravity 配置已取消。',