feat(app): game detection for the performance stages
- while the services run the app looks at the foreground window every 2 s (Windows): the person's notGames and games lists first, never a browser, video player, the desktop, Discord, a launcher's own window or this app; a program under a Steam, Epic, Riot or Battle.net game folder, exclusive full screen, or a window covering a monitor without title bar or border whose process uses at least 10% of the GPU's 3D engine (the M0 rule) is a game - game mode stays until that game's process ends, also behind other windows; the dashboard shows "게임 모드: 켜짐 (name, reason)" and the game log tab its changes - a 게임 모드 settings screen (detection on/off, the two lists) - checked on the win-ci VM: a program in a Steam game folder turned it on after 1.4 s and off 2.0 s after it ended Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -191,8 +191,9 @@ reaches the screen.
|
||||
(`managed`), and while starting Strata's last line and how far that line says it got (its
|
||||
percentage, or `X of Y GB` for the model download; none on a line without progress), also before
|
||||
the services are up; a failure's reason in `note`.
|
||||
- `performance`: the performance stage (normal, gaming, paused, and why) comes with game
|
||||
detection in M7; until then `null`.
|
||||
- `game`: the game that game mode is on for, `{name, reason}` (below, "Game detection"), or null.
|
||||
- `performance`: the performance stage (normal, gaming, paused, and why) comes next in M7; until
|
||||
then `null`.
|
||||
|
||||
The dashboard's state is built from the core's events alone (`Dashboard::on_event` with the time),
|
||||
so it is tested with made-up events.
|
||||
@@ -326,6 +327,27 @@ the browser runs headless with a note.
|
||||
- If the monitor or the window cannot be made, the browser runs headless and the dashboard's
|
||||
`browser` note says why ("가상 모니터 없이 실행: ...").
|
||||
|
||||
## Game detection (`app/src/game.rs`)
|
||||
|
||||
`docs/v2/pc-features.md`, "게임 감지 기준". Whether a game runs, for the performance stages (next
|
||||
in M7). While the services run, the app looks at the foreground window every 2 s (Windows only;
|
||||
elsewhere it never sees a game). It never looks at the game's screen.
|
||||
|
||||
- `game` (new section): `detect` (게임 감지, on by default), `games` (programs that are games, as
|
||||
file names, ".exe" may be left out) and `notGames` (programs that are never games); each list at
|
||||
most 100 names, no folders. Read when the services start.
|
||||
- The foreground program is a game, in this order: in `notGames`: no; in `games`: yes
|
||||
(`registered`); a browser (also the bot's Chrome), video player, the desktop, Discord, a
|
||||
launcher's own window or this app: no; under a launcher's game folder (`\steamapps\common\`,
|
||||
`\epic games\`, `\riot games\`, `\battle.net\`): yes (`launcher`, with the launcher's name);
|
||||
Windows reports a full-screen Direct3D program (`fullscreen`): yes; its window covers one monitor
|
||||
completely, has no title bar or sizing border, and its process uses at least 10% of the GPU's 3D
|
||||
engine (`borderless`, the M0 check's rule): yes.
|
||||
- Once seen, game mode stays until that game's process ends, also while another window is in
|
||||
front; with `detect` off it is off. The name is the game's folder under the launcher folder, else
|
||||
the program's name without ".exe". The `game` log tab gets "game mode on: name (reason)" and
|
||||
"game mode off".
|
||||
|
||||
## LLM (`app/src/strata.rs`)
|
||||
|
||||
The brain answers with one model, Qwen3.6-35B-A3B UD-Q4_K_XL through Strata (M0). The services
|
||||
@@ -428,7 +450,7 @@ Plain HTML, CSS and an ES module, no build step, dark theme after `DESIGN.md`. A
|
||||
Strata's last line, and stop in the header; the header with start, restart and stop is rebuilt
|
||||
only when the state changes, so a click is never lost to the refresh. Every screen change starts
|
||||
a new generation: an answer that arrives after the user moved to another screen is dropped.
|
||||
- **Settings screens** (봇, 채널·호출, 채팅 채널, 대화 기억, 모델, 기능, 백그라운드 수집): built from `settings_fields`; only
|
||||
- **Settings screens** (봇, 채널·호출, 채팅 채널, 대화 기억, 모델, 기능, 백그라운드 수집, 게임 모드): built from `settings_fields`; only
|
||||
changed fields are sent; the server and voice channel are pickers (choosing another server clears
|
||||
the voice channel and lists only that server's channels); the chat channels are a table
|
||||
with their switches; the bot screen also changes the token; the 기능 screen has the feature
|
||||
@@ -518,7 +540,11 @@ settings folder and the next install giving one working device, the monitor off
|
||||
while the bot browser runs and off after, one Chrome window there filling the work area and holding
|
||||
the bot's tab, the focus staying in the program the user types into, no taskbar button, no Chrome
|
||||
left after the stop, and the uninstall leaving no device, driver package, registry key or settings
|
||||
folder. On every system: a removal forgets the driver only when no device is left and the package
|
||||
folder. Game detection (`tests/game_watch.rs`): a program started from a Steam game folder turns
|
||||
game mode on with the folder's name and off once it ends. On every system: game detection's rules
|
||||
(a borderless game, a maximised program, a browser's full-screen video, exclusive full screen,
|
||||
launcher folders and their own windows, the person's lists first, staying on until the game ends,
|
||||
detection off) and its settings. A removal forgets the driver only when no device is left and the package
|
||||
is gone or was not in the store; a failed install forgets it only under the same rule (and never
|
||||
when it was ours before), reporting both reasons otherwise; a leftover offers removal; driver tasks refused while the services start, and a start (and a
|
||||
second task) refused while one runs, also after it failed. On Linux the same window test runs on an X display (one window at the given place and
|
||||
|
||||
Reference in New Issue
Block a user