-
Notifications
You must be signed in to change notification settings - Fork 956
feat(cli): let the terminal resolve a conflict too #3088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -168,6 +168,16 @@ ocx integration client history --client hermes | |
| ocx integration client restore --op <opId> [--confirm-drift] | ||
| ``` | ||
|
|
||
| `--overwrite-conflict`, **Replace** eyleminin terminal karsiligidir: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Restore Turkish diacritics in the new section. The added text omits required Turkish characters in several words. Restore spellings such as Proposed text corrections-`--overwrite-conflict`, **Replace** eyleminin terminal karsiligidir:
+`--overwrite-conflict`, **Replace** eyleminin terminal karşılığıdır:
-`--confirm-drift` gibi asla varsayilmaz: bayrak yazilmadan catisma yine reddedilir.
-Yalnizca `enable` icin gecerlidir; bir catismanin uzerine *disable* zorlamak hic
-yazmadigimiz bir blogu silecegi icin bu birlesim reddedilir.
+`--confirm-drift` gibi asla varsayılmaz: bayrak yazılmadan çatışma yine reddedilir.
+Yalnızca `enable` için geçerlidir; bir çatışmanın üzerine *disable* zorlamak hiç
+yazmadığımız bir bloğu sileceği için bu birleşim reddedilir.Also applies to: 177-179 🤖 Prompt for AI Agents |
||
|
|
||
| ```bash | ||
| ocx integration client enable --client zcode --overwrite-conflict | ||
| ``` | ||
|
|
||
| `--confirm-drift` gibi asla varsayilmaz: bayrak yazilmadan catisma yine reddedilir. | ||
| Yalnizca `enable` icin gecerlidir; bir catismanin uzerine *disable* zorlamak hic | ||
| yazmadigimiz bir blogu silecegi icin bu birlesim reddedilir. | ||
|
|
||
| MiniMax Code için sağlayıcıyı bir kez bağlayın ve denetimli başlatıcı üzerinden çalıştırın: | ||
|
|
||
| ```bash | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -29,7 +29,7 @@ const GROK_USAGE = `Usage: | |||||||
|
|
||||||||
| const CLIENT_USAGE = `Usage: | ||||||||
| ocx integration client [status] [--client <id>] [--json] | ||||||||
| ocx integration client <enable|disable> --client <id> [--json] | ||||||||
| ocx integration client <enable|disable> --client <id> [--overwrite-conflict] [--json] | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Split the usage line by action.
Proposed usage update- ocx integration client <enable|disable> --client <id> [--overwrite-conflict] [--json]
+ ocx integration client enable --client <id> [--overwrite-conflict] [--json]
+ ocx integration client disable --client <id> [--json]📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||
| ocx integration client history [--client <id>] [--json] | ||||||||
| ocx integration client restore --op <opId> [--confirm-drift] [--json]`; | ||||||||
|
|
||||||||
|
|
@@ -212,11 +212,33 @@ export async function handleClientIntegrationCommand( | |||||||
| throw new CliUsageError(`unknown client integration command ${action}`, CLIENT_USAGE); | ||||||||
| } | ||||||||
| const client = takeOption(args, "--client"); | ||||||||
| /* | ||||||||
| * The conflict escape hatch, spelled the way `restore --confirm-drift` is: the | ||||||||
| * refusal is the default and the waiver has to be typed. | ||||||||
| * | ||||||||
| * Without it the dashboard could resolve a conflict and the CLI could not, | ||||||||
| * which strands exactly the user who cannot open a browser -- an SSH session, | ||||||||
| * or an agent driving the proxy. That dead end is the reason the overwrite | ||||||||
| * path exists at all. | ||||||||
| */ | ||||||||
| const overwriteConflict = takeFlag(args, "--overwrite-conflict"); | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a ZCode user encounters a conflict and checks the public alias with Useful? React with 👍 / 👎. |
||||||||
| rejectArgs(args, CLIENT_USAGE); | ||||||||
| if (!client) throw new CliUsageError("--client <id> is required", CLIENT_USAGE); | ||||||||
| /* | ||||||||
| * Refused here rather than forwarded. The route answers 400 for this pair, but | ||||||||
| * a local usage error names the flag that is wrong, where the route's reply | ||||||||
| * arrives as a generic failed request. | ||||||||
| */ | ||||||||
| if (overwriteConflict && action === "disable") { | ||||||||
| throw new CliUsageError("--overwrite-conflict applies only to enable", CLIENT_USAGE); | ||||||||
| } | ||||||||
| const result = await runtimeRequest(`/api/client-integrations/${encodeURIComponent(client)}`, { | ||||||||
| method: "PUT", | ||||||||
| body: JSON.stringify({ enabled: action === "enable" }), | ||||||||
| // Sent only when asked for, so a proxy on an older build sees the request it | ||||||||
| // has always seen rather than an unknown field. | ||||||||
| body: JSON.stringify(overwriteConflict | ||||||||
| ? { enabled: true, overwriteConflict: true } | ||||||||
| : { enabled: action === "enable" }), | ||||||||
| }, deps); | ||||||||
| printData(result, wantsJson, [String((result as Record<string, unknown>).message ?? `${client} ${action}d.`)]); | ||||||||
| }); | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use the repository's apostrophe style.
Line 154 uses a straight apostrophe in
n'est. Replace it with the typographic apostrophe inn’estso the new French text passes the reportedAPOS_INCORRECTcheck.🧰 Tools
🪛 LanguageTool
[typographical] ~154-~154: Caractère d’apostrophe incorrect.
Context: ...t zcode --overwrite-conflict ``` Comme
--confirm-drift, il n'est jamais supposé : sans lui, un...(APOS_INCORRECT)
🤖 Prompt for AI Agents
Source: Linters/SAST tools