@kenkaiiii/ggcoder 5.20.5 → 5.21.0
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/dist/app-sidecar.js +11 -2
- package/dist/app-sidecar.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +16 -6
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session-compaction.test.js +19 -0
- package/dist/core/agent-session-compaction.test.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +2 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +1 -1
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/compaction/compactor.d.ts.map +1 -1
- package/dist/core/compaction/compactor.js +20 -11
- package/dist/core/compaction/compactor.js.map +1 -1
- package/dist/core/compaction/compactor.test.js +13 -0
- package/dist/core/compaction/compactor.test.js.map +1 -1
- package/dist/core/event-bus.d.ts +1 -0
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/verify-commands.d.ts.map +1 -1
- package/dist/core/verify-commands.js +1 -6
- package/dist/core/verify-commands.js.map +1 -1
- package/dist/core/verify-commands.test.js +1 -5
- package/dist/core/verify-commands.test.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/system-prompt.d.ts.map +1 -1
- package/dist/system-prompt.js +10 -12
- package/dist/system-prompt.js.map +1 -1
- package/dist/system-prompt.test.js +19 -3
- package/dist/system-prompt.test.js.map +1 -1
- package/package.json +4 -4
package/dist/app-sidecar.js
CHANGED
|
@@ -43,7 +43,7 @@ import { loginKimi } from "./core/oauth/kimi.js";
|
|
|
43
43
|
import { AUTH_PROVIDERS } from "./core/auth-providers.js";
|
|
44
44
|
import { ensureAppDirs, loadSavedSettings } from "./config.js";
|
|
45
45
|
import { SettingsManager } from "./core/settings-manager.js";
|
|
46
|
-
import { getModel,
|
|
46
|
+
import { getModel, getDefaultThinkingLevel, getContextWindow, MODELS, } from "./core/model-registry.js";
|
|
47
47
|
import { resolveStartOrFallback } from "./core/resolve-start.js";
|
|
48
48
|
import { getGitBranch, getGitDirtyFileCount, isGitRepo } from "./utils/git.js";
|
|
49
49
|
import { extractPlanSteps } from "./utils/plan-steps.js";
|
|
@@ -958,6 +958,10 @@ async function createSession(deps, opts) {
|
|
|
958
958
|
// parsing); the daemon owns the real listen host.
|
|
959
959
|
const host = "127.0.0.1";
|
|
960
960
|
const saved = loadSavedSettings(paths.settingsFile);
|
|
961
|
+
// Native login/logout and other live sessions share auth.json. Refresh the
|
|
962
|
+
// daemon-level snapshot before choosing this session's provider so a project
|
|
963
|
+
// never boots against credentials that were just replaced or disconnected.
|
|
964
|
+
await auth.load();
|
|
961
965
|
// Per-project model/thinking prefs win over the shared global settings.json:
|
|
962
966
|
// each window (one project cwd) restores its own selection instead of every
|
|
963
967
|
// window reading the same single global slot that the last writer clobbered
|
|
@@ -976,9 +980,14 @@ async function createSession(deps, opts) {
|
|
|
976
980
|
});
|
|
977
981
|
}
|
|
978
982
|
// Per-project thinking prefs win over the global settings.json fallback.
|
|
983
|
+
// With no saved level, the default follows the active credential's endpoint:
|
|
984
|
+
// Kimi K3 on the OAuth coding endpoint starts at its declared default (high),
|
|
985
|
+
// matching the official kimi-code CLI's plan-usage profile.
|
|
979
986
|
const thinkEnabled = projectPrefs?.thinkingEnabled ?? saved.thinkingEnabled;
|
|
980
987
|
const thinkingLevel = thinkEnabled
|
|
981
|
-
? (projectPrefs?.thinkingLevel ??
|
|
988
|
+
? (projectPrefs?.thinkingLevel ??
|
|
989
|
+
saved.thinkingLevel ??
|
|
990
|
+
getDefaultThinkingLevel(model, { baseUrl: auth.getStoredBaseUrl(provider) }))
|
|
982
991
|
: undefined;
|
|
983
992
|
// ── SSE fan-out (declared before the session so plan callbacks can use it) ─
|
|
984
993
|
const clients = new Set();
|