Merge pull request #91 from IronRookieCoder/fix/issue-49-show-memory-pid

feat(config): add showMemoryPid setting to toggle footer memory/PID display
This commit is contained in:
geroge 2026-05-15 14:34:04 +08:00 committed by GitHub
commit 37fe62a5de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 37 additions and 2 deletions

View File

@ -131,6 +131,11 @@ export const SUPPORTED_SETTINGS: Record<string, SettingConfig> = {
'How to spawn teammates: "tmux" for traditional tmux, "in-process" for same process, "auto" to choose automatically',
options: TEAMMATE_MODES,
},
showMemoryPid: {
source: 'global',
type: 'boolean',
description: 'Show memory usage and PID in the footer status bar',
},
...(process.env.USER_TYPE === 'ant'
? {
classifierPermissionsEnabled: {

View File

@ -365,8 +365,8 @@ function ModeIndicator({
...(shouldShowPrStatus
? [<PrBadge key="pr-status" number={prStatus.number!} url={prStatus.url!} reviewState={prStatus.reviewState!} />]
: []),
// RSS memory indicator — always visible
...(rssState
// RSS memory indicator — configurable via showMemoryPid
...(isMemoryPidEnabled() && rssState
? [
<Text
key="rss"
@ -626,3 +626,7 @@ function getSpinnerHintParts(
function isPrStatusEnabled(): boolean {
return getGlobalConfig().prStatusFooterEnabled ?? true;
}
function isMemoryPidEnabled(): boolean {
return getGlobalConfig().showMemoryPid ?? true;
}

View File

@ -868,6 +868,28 @@ export function Config({
});
},
},
{
id: 'showMemoryPid',
label: 'Show memory & PID in footer',
value: globalConfig.showMemoryPid ?? true,
type: 'boolean' as const,
onChange(enabled: boolean) {
saveGlobalConfig(current => {
if (current.showMemoryPid === enabled) return current;
return {
...current,
showMemoryPid: enabled,
};
});
setGlobalConfig({
...getGlobalConfig(),
showMemoryPid: enabled,
});
logEvent('tengu_show_memory_pid_setting_changed', {
enabled,
});
},
},
{
id: 'model',
label: 'Model',

View File

@ -544,6 +544,9 @@ export type GlobalConfig = {
// PR status footer configuration (feature-flagged via GrowthBook)
prStatusFooterEnabled?: boolean // Show PR review status in footer (default: true)
// RSS memory + PID footer display
showMemoryPid?: boolean // Show memory usage and PID in footer (default: true)
// Tmux live panel visibility (ant-only, toggled via Enter on tmux pill)
tungstenPanelVisible?: boolean
@ -673,6 +676,7 @@ export const GLOBAL_CONFIG_KEYS = [
'copyOnSelect',
'permissionExplainerEnabled',
'prStatusFooterEnabled',
'showMemoryPid',
'remoteControlAtStartup',
'remoteDialogSeen',
] as const