building.get_history
Overview
- [Build Mode Only] Returns whether undo/redo are available, plus the build commands issued through the CLI in the current build-mode session. Build commands issued through the game UI are NOT listed - the underlying command objects carry no name, so the real undo history cannot be enumerated. The log holds at most 64 entries and is cleared when build mode is left.
Metadata
| Field | Value |
|---|---|
| Display | Get Build History |
| Category | building |
| Access | Public |
| Scope | B1Standalone |
| Tags | Experimental |
| Aliases | — |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| limit | int | no | 20 | Maximum number of log entries to return, most recent first-in-order (1-64) |
Returns
Returns a JSON object with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
has_undo | bool | yes | Whether building.undo is available |
has_redo | bool | yes | Whether building.redo is available |
truncated | bool | yes | Whether older CLI log entries were dropped by 'limit' |
session_command_count | int | yes | Total build commands issued through the CLI this session (may exceed the 64-entry log) |
cli_entries | array<object> | yes | Build commands executed through the CLI in this build-mode session, oldest first. Commands issued through the game UI are NOT included. |
cli_entries[].command_id | string | yes | CLI command id, e.g. building.construct_wall |
cli_entries[].committed | bool | yes | Whether it entered the undo history |
cli_entries[].timestamp | string | yes | ISO-8601 UTC timestamp |
Usage
await inzoi.cli.execute('building.get_history', {
limit: 20, // optional
});