@brimveyn/aimux-config 0.8.2 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/package.json +1 -1
- package/src/actions.ts +3 -2
- package/src/backends.ts +11 -0
- package/src/defaults.ts +15 -1
- package/src/index.ts +1 -0
- package/src/resolver.ts +9 -0
- package/src/types.ts +20 -1
package/README.md
CHANGED
package/package.json
CHANGED
package/src/actions.ts
CHANGED
|
@@ -524,11 +524,12 @@ export const confirmRenameTab: ActionFn = (ctx: ModeContext) => {
|
|
|
524
524
|
const trimmed = (ctx.state.modal.editBuffer ?? '').trim()
|
|
525
525
|
const tabId = ctx.state.modal.sessionTargetId
|
|
526
526
|
const actions: KeyResult['actions'] = []
|
|
527
|
+
const effects: KeyResult['effects'] = []
|
|
527
528
|
if (trimmed && tabId != null && tabId !== '') {
|
|
528
|
-
|
|
529
|
+
effects.push({ tabId, title: trimmed, type: 'rename-tab' })
|
|
529
530
|
}
|
|
530
531
|
actions.push({ type: 'close-modal' })
|
|
531
|
-
return r(actions,
|
|
532
|
+
return r(actions, effects, 'navigation')
|
|
532
533
|
}
|
|
533
534
|
|
|
534
535
|
// Rename worktree modal
|
package/src/backends.ts
CHANGED
|
@@ -21,3 +21,14 @@ export function codexBackend(opts?: { args?: string[] }): BackendConfig {
|
|
|
21
21
|
command: 'codex',
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Create a Kimi Code CLI backend configuration.
|
|
27
|
+
* Stub — runtime wiring deferred to follow-up work.
|
|
28
|
+
*/
|
|
29
|
+
export function kimiBackend(opts?: { model?: string }): BackendConfig {
|
|
30
|
+
return {
|
|
31
|
+
args: opts?.model != null && opts.model !== '' ? ['--model', opts.model] : [],
|
|
32
|
+
command: 'kimi',
|
|
33
|
+
}
|
|
34
|
+
}
|
package/src/defaults.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
AutoCommitConfig,
|
|
3
|
+
AutoRenameConfig,
|
|
4
|
+
MultiRepoConfig,
|
|
5
|
+
ResolvedKeymapConfig,
|
|
6
|
+
} from './types'
|
|
2
7
|
|
|
3
8
|
import * as actions from './actions'
|
|
4
9
|
import { KeymapBuilder } from './keymap-builder'
|
|
@@ -12,6 +17,15 @@ export const DEFAULT_AUTO_COMMIT_CONFIG: AutoCommitConfig = {
|
|
|
12
17
|
timeoutMs: 60_000,
|
|
13
18
|
}
|
|
14
19
|
|
|
20
|
+
export const DEFAULT_AUTO_RENAME_CONFIG: AutoRenameConfig = {
|
|
21
|
+
enabled: true,
|
|
22
|
+
models: {
|
|
23
|
+
claude: 'claude-haiku-4-5',
|
|
24
|
+
codex: 'gpt-5-mini',
|
|
25
|
+
},
|
|
26
|
+
timeoutMs: 15_000,
|
|
27
|
+
}
|
|
28
|
+
|
|
15
29
|
export const DEFAULT_MULTI_REPO_CONFIG: MultiRepoConfig = {
|
|
16
30
|
enabled: true,
|
|
17
31
|
maxDepth: 1,
|
package/src/index.ts
CHANGED
package/src/resolver.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
AimuxUserConfig,
|
|
3
3
|
AutoCommitConfig,
|
|
4
|
+
AutoRenameConfig,
|
|
4
5
|
ModeId,
|
|
5
6
|
ModeKeymapDef,
|
|
6
7
|
MultiRepoConfig,
|
|
@@ -10,6 +11,7 @@ import type {
|
|
|
10
11
|
|
|
11
12
|
import {
|
|
12
13
|
DEFAULT_AUTO_COMMIT_CONFIG,
|
|
14
|
+
DEFAULT_AUTO_RENAME_CONFIG,
|
|
13
15
|
DEFAULT_MULTI_REPO_CONFIG,
|
|
14
16
|
getDefaultKeymapConfig,
|
|
15
17
|
} from './defaults'
|
|
@@ -28,6 +30,12 @@ export function resolveConfig(userConfig: AimuxUserConfig): ResolvedConfig {
|
|
|
28
30
|
timeoutMs: userConfig.autoCommit?.timeoutMs ?? DEFAULT_AUTO_COMMIT_CONFIG.timeoutMs,
|
|
29
31
|
}
|
|
30
32
|
|
|
33
|
+
const autoRename: AutoRenameConfig = {
|
|
34
|
+
enabled: userConfig.autoRename?.enabled ?? DEFAULT_AUTO_RENAME_CONFIG.enabled,
|
|
35
|
+
models: { ...DEFAULT_AUTO_RENAME_CONFIG.models, ...userConfig.autoRename?.models },
|
|
36
|
+
timeoutMs: userConfig.autoRename?.timeoutMs ?? DEFAULT_AUTO_RENAME_CONFIG.timeoutMs,
|
|
37
|
+
}
|
|
38
|
+
|
|
31
39
|
const multiRepo: MultiRepoConfig = {
|
|
32
40
|
enabled: userConfig.multiRepo?.enabled ?? DEFAULT_MULTI_REPO_CONFIG.enabled,
|
|
33
41
|
maxDepth: Math.max(1, userConfig.multiRepo?.maxDepth ?? DEFAULT_MULTI_REPO_CONFIG.maxDepth),
|
|
@@ -35,6 +43,7 @@ export function resolveConfig(userConfig: AimuxUserConfig): ResolvedConfig {
|
|
|
35
43
|
|
|
36
44
|
return {
|
|
37
45
|
autoCommit,
|
|
46
|
+
autoRename,
|
|
38
47
|
backends: userConfig.backends ?? {},
|
|
39
48
|
externalEditor: userConfig.externalEditor ?? {},
|
|
40
49
|
gitPane: resolveGitPane(userConfig.gitPane),
|
package/src/types.ts
CHANGED
|
@@ -42,6 +42,7 @@ export type BuiltinAssistantId =
|
|
|
42
42
|
| 'codex'
|
|
43
43
|
| 'opencode'
|
|
44
44
|
| 'grok'
|
|
45
|
+
| 'kimi'
|
|
45
46
|
| 'terminal'
|
|
46
47
|
| 'antigravity'
|
|
47
48
|
export type AssistantId = BuiltinAssistantId | (string & {})
|
|
@@ -121,6 +122,7 @@ export interface PersistedTabSnapshot {
|
|
|
121
122
|
errorMessage?: string
|
|
122
123
|
exitCode?: number
|
|
123
124
|
worktreeId?: string
|
|
125
|
+
autoRenameStatus?: 'eligible' | 'attempted'
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
export interface WorkspaceSnapshotV1 {
|
|
@@ -187,6 +189,7 @@ export interface TabSession {
|
|
|
187
189
|
errorMessage?: string
|
|
188
190
|
exitCode?: number
|
|
189
191
|
worktreeId?: string
|
|
192
|
+
autoRenameStatus?: 'eligible' | 'attempted'
|
|
190
193
|
}
|
|
191
194
|
|
|
192
195
|
export interface SnippetRecord {
|
|
@@ -250,7 +253,14 @@ export interface GitPanelState {
|
|
|
250
253
|
error: GitPanelError | null
|
|
251
254
|
}
|
|
252
255
|
|
|
253
|
-
export type DiffFileStatus =
|
|
256
|
+
export type DiffFileStatus =
|
|
257
|
+
| 'modified'
|
|
258
|
+
| 'new'
|
|
259
|
+
| 'deleted'
|
|
260
|
+
| 'binary'
|
|
261
|
+
| 'renamed'
|
|
262
|
+
| 'image'
|
|
263
|
+
| 'too-large'
|
|
254
264
|
|
|
255
265
|
export interface DiffData {
|
|
256
266
|
path: string
|
|
@@ -839,6 +849,7 @@ export type SideEffect =
|
|
|
839
849
|
| { type: 'apply-theme'; action: 'confirm' }
|
|
840
850
|
| { type: 'apply-theme'; action: 'preview'; delta: 1 | -1 }
|
|
841
851
|
| { type: 'rename-session'; sessionId: string; name: string }
|
|
852
|
+
| { type: 'rename-tab'; tabId: string; title: string }
|
|
842
853
|
| { type: 'split-pane'; direction: SplitDirection; sourceTabId?: string }
|
|
843
854
|
| { type: 'confirm-split' }
|
|
844
855
|
| { type: 'scroll-git-diff'; delta: number }
|
|
@@ -1081,6 +1092,12 @@ export interface AutoCommitConfig {
|
|
|
1081
1092
|
models: Partial<Record<string, string>>
|
|
1082
1093
|
}
|
|
1083
1094
|
|
|
1095
|
+
export interface AutoRenameConfig {
|
|
1096
|
+
enabled: boolean
|
|
1097
|
+
timeoutMs: number
|
|
1098
|
+
models: Partial<Record<string, string>>
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1084
1101
|
export interface MultiRepoConfig {
|
|
1085
1102
|
/** When true, scan projectPath for nested git repos and aggregate their status into the git panel. */
|
|
1086
1103
|
enabled: boolean
|
|
@@ -1192,6 +1209,7 @@ export interface AimuxUserConfig {
|
|
|
1192
1209
|
*/
|
|
1193
1210
|
snippetTriggerChar?: string
|
|
1194
1211
|
autoCommit?: Partial<AutoCommitConfig>
|
|
1212
|
+
autoRename?: Partial<AutoRenameConfig>
|
|
1195
1213
|
multiRepo?: Partial<MultiRepoConfig>
|
|
1196
1214
|
statusBar?: StatusBarConfig
|
|
1197
1215
|
externalEditor?: ExternalEditorConfig
|
|
@@ -1271,6 +1289,7 @@ export interface ResolvedConfig {
|
|
|
1271
1289
|
snippets: SnippetDef[]
|
|
1272
1290
|
snippetTriggerChar: string
|
|
1273
1291
|
autoCommit: AutoCommitConfig
|
|
1292
|
+
autoRename: AutoRenameConfig
|
|
1274
1293
|
multiRepo: MultiRepoConfig
|
|
1275
1294
|
statusBar: StatusBarConfig
|
|
1276
1295
|
externalEditor: ExternalEditorConfig
|