* Optimize read_console defaults and paging * Fix read_console truncate test expectations * Reduce read_console default count from 50 to 10 Further optimize token usage by reducing the default count from 50 to 10 entries. Even 10-20 messages with stack traces can be token-heavy. Added tests for default behavior and paging functionality. Updated tool description to document defaults and paging support. * Fix ReadConsoleTests to include log type messages The default types filter changed to ['error', 'warning'] (excluding 'log'), so tests using Debug.Log() need to explicitly request log messages. Also added format='detailed' to HandleCommand_Get_Works test since it accesses structured message fields. * Address CodeRabbit review feedback - Fix property naming consistency: next_cursor -> nextCursor (C# camelCase) - Remove redundant EndGettingEntries call from catch block (already in finally) - Extract stacktrace stripping to helper function (reduce duplication) - Fix test mock to match actual C# response structure (items, nextCursor, truncated, total) * perf: add early exit optimization for ReadConsole paging - Add early exit in paging loop once page is filled, avoiding iteration through remaining console entries (total becomes 'at least N') - Prefix unused mock arguments with underscores in test_read_console_truncate.py to suppress Ruff linter warnings * refactor: give pageSize independent default, clarify count semantics - Change pageSize resolution from 'pageSize ?? count ?? 50' to 'pageSize ?? 50' so pageSize has its own default independent of count - count now only serves as the non-paging limit - Add XML docs to GetConsoleEntries with clear parameter descriptions - Update Python tool annotations to document pageSize default (50) and clarify that count is ignored when paging |
||
|---|---|---|
| .. | ||
| Scenes | ||
| Scripts | ||
| Tests | ||
| Packages.meta | ||
| Scenes.meta | ||
| Scripts.meta | ||
| Tests.meta | ||