feat(plugin): add CommitMany and CommitManyAndEnd for multi-entity interactive commands

This commit is contained in:
yztink committed 2026-09-23 15:19:33 -07:00
1 parent 358103c1e4
commit d218ec1451
3 files changed
+26 -3

No files matched your search

+4
View File
@@ -645,8 +645,12 @@ 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.
+2
View File
@@ -197,6 +197,7 @@ fn handle_host_request(
CommandStep::Done
| CommandStep::Cancel
| CommandStep::CommitAndEnd(_)
| CommandStep::CommitManyAndEnd(_)
);
(Ok(s), is_done)
}
@@ -335,6 +336,7 @@ fn handle_host_request_v4(
CommandStep::Done
| CommandStep::Cancel
| CommandStep::CommitAndEnd(_)
| CommandStep::CommitManyAndEnd(_)
);
(Ok(s), is_done)
}