fix(plugin): append the multi-entity command steps after the existing ones

#1469 inserted `CommitMany` and `CommitManyAndEnd` between `Commit`,
`CommitAndEnd` and `Done`. `CommandStep` crosses the plugin IPC, which
encodes a variant by its position, so a plugin built against the previous
API that answered `Done` would have been read as `CommitAndEnd` — or
rejected as undecodable — by the new host. The two variants now sit after
`Cancel`, as the other additions to the v7 wire types do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-09-24 15:09:01 +03:00
1 parent 8ae804d921
commit 73b560de99
1 file changed
+8 -4
+8 -4
View File
@@ -710,16 +710,20 @@ pub enum CommandStep {
NeedPoint,
/// Commit an entity to the document and keep collecting points.
Commit(EntityType),
/// Commit multiple entities to the document and keep collecting points.
CommitMany(Vec<EntityType>),
/// Commit an entity and end the command.
CommitAndEnd(EntityType),
/// Commit multiple entities to the document and end the command.
CommitManyAndEnd(Vec<EntityType>),
/// End the command without committing.
Done,
/// Cancel the command.
Cancel,
// New variants go after the existing ones: the step crosses the plugin
// IPC, which encodes a variant by its position, so inserting one earlier
// would make a plugin built against the previous API send `Done` and
// have the host read it as something else.
/// Commit multiple entities to the document and keep collecting points.
CommitMany(Vec<EntityType>),
/// Commit multiple entities to the document and end the command.
CommitManyAndEnd(Vec<EntityType>),
}
/// Export a `BuiltinPlugin` from a `cdylib` so the host can load it at runtime.