@unity-china/codely-cli 1.0.0-beta.43 → 1.0.0-beta.44

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.
Files changed (2) hide show
  1. package/bundle/gemini.js +25 -18
  2. package/package.json +1 -1
package/bundle/gemini.js CHANGED
@@ -365236,7 +365236,7 @@ function urlMatches(urlArray, targetUrl) {
365236
365236
  const normalizedTarget = normalizeUrl2(targetUrl);
365237
365237
  return urlArray.some((url4) => normalizeUrl2(url4) === normalizedTarget);
365238
365238
  }
365239
- function getCoreSystemPrompt(userMemory, config4, additionalPrompts) {
365239
+ function getCoreSystemPrompt(userMemory, config4, additionalPrompts, runtimeContext) {
365240
365240
  const enableSequentialThinking = config4?.enableSequentialThinking ?? true;
365241
365241
  const planToolingGuidance = enableSequentialThinking ? [
365242
365242
  ` - Use the '${SequentialThinkTool.Name}' and '${TodoWriteTool.Name}' together to plan before implementing the task.`,
@@ -365268,9 +365268,9 @@ function getCoreSystemPrompt(userMemory, config4, additionalPrompts) {
365268
365268
  }
365269
365269
  }
365270
365270
  }
365271
- if (config4?.systemPromptMappings) {
365272
- const currentModel = process23.env.OPENAI_MODEL || "";
365273
- const currentBaseUrl = process23.env.OPENAI_BASE_URL || "";
365271
+ if (config4?.systemPromptMappings && process23.env.CUSTOM_AUTH && runtimeContext?.authType === AuthType3.USE_OPENAI) {
365272
+ const currentModel = runtimeContext.model || "";
365273
+ const currentBaseUrl = runtimeContext.baseUrl || "";
365274
365274
  const matchedMapping = config4.systemPromptMappings.find((mapping) => {
365275
365275
  const { baseUrls, modelNames } = mapping;
365276
365276
  if (baseUrls && modelNames && urlMatches(baseUrls, currentBaseUrl) && modelNames.includes(currentModel)) {
@@ -365802,6 +365802,7 @@ var init_prompts = __esm({
365802
365802
  init_gitUtils();
365803
365803
  init_memoryTool();
365804
365804
  init_tool_names();
365805
+ init_contentGenerator();
365805
365806
  SystemPromptExtensions = class _SystemPromptExtensions {
365806
365807
  static instance;
365807
365808
  extensions = [];
@@ -379972,7 +379973,7 @@ Your result MUST be a concise but informative summary for the caller (main agent
379972
379973
  let finalPrompt = getCoreSystemPrompt(userMemory, {
379973
379974
  systemPromptMappings,
379974
379975
  enableSequentialThinking: !this.runtimeContext.isThinkingSupportedModel()
379975
- });
379976
+ }, void 0, this.runtimeContext.getContentGeneratorConfig());
379976
379977
  finalPrompt += `
379977
379978
 
379978
379979
  # Agent Specialization
@@ -419218,7 +419219,7 @@ async function getPackageJson2() {
419218
419219
  // packages/cli/src/utils/version.ts
419219
419220
  async function getCliVersion() {
419220
419221
  const pkgJson = await getPackageJson2();
419221
- return "1.0.0-beta.43";
419222
+ return "1.0.0-beta.44";
419222
419223
  }
419223
419224
 
419224
419225
  // packages/cli/src/ui/commands/types.ts
@@ -419751,7 +419752,7 @@ import process30 from "node:process";
419751
419752
 
419752
419753
  // packages/cli/src/generated/git-commit.ts
419753
419754
  init_esbuild_polyfill();
419754
- var GIT_COMMIT_INFO = "92247f00";
419755
+ var GIT_COMMIT_INFO = "107c4b52";
419755
419756
 
419756
419757
  // packages/cli/src/ui/commands/bugCommand.ts
419757
419758
  var bugCommand = {
@@ -461887,10 +461888,14 @@ async function loadCliConfig(settings, extensions, sessionId2, argv, cwd3 = proc
461887
461888
  (_, i3) => allExtensions[i3].isActive
461888
461889
  );
461889
461890
  if (argv.openaiApiKey) {
461890
- process33.env.OPENAI_API_KEY = argv.openaiApiKey;
461891
+ if (process33.env.CUSTOM_AUTH && settings.selectedAuthType === AuthType3.USE_OPENAI) {
461892
+ process33.env.OPENAI_API_KEY = argv.openaiApiKey;
461893
+ }
461891
461894
  }
461892
461895
  if (argv.openaiBaseUrl) {
461893
- process33.env.OPENAI_BASE_URL = argv.openaiBaseUrl;
461896
+ if (process33.env.CUSTOM_AUTH && settings.selectedAuthType === AuthType3.USE_OPENAI) {
461897
+ process33.env.OPENAI_BASE_URL = argv.openaiBaseUrl;
461898
+ }
461894
461899
  }
461895
461900
  if (argv.tavilyApiKey) {
461896
461901
  process33.env.TAVILY_API_KEY = argv.tavilyApiKey;
@@ -462112,7 +462117,7 @@ async function loadCliConfig(settings, extensions, sessionId2, argv, cwd3 = proc
462112
462117
  cwd: cwd3,
462113
462118
  fileDiscoveryService: fileService,
462114
462119
  bugCommand: settings.bugCommand,
462115
- model: argv.model || settings.model || process33.env.OPENAI_MODEL || DEFAULT_CODELY_MODEL,
462120
+ model: argv.model || settings.model || (process33.env.CUSTOM_AUTH && settings.selectedAuthType === AuthType3.USE_OPENAI ? process33.env.OPENAI_MODEL : void 0) || DEFAULT_CODELY_MODEL,
462116
462121
  flashModel: argv.flash || settings.flashModel,
462117
462122
  multimodalModel: argv.multimodal || settings.multimodalModel,
462118
462123
  extensionContextFilePaths,
@@ -492261,18 +492266,20 @@ async function start_sandbox(config4, nodeArgs = [], cliConfig) {
492261
492266
  if (process.env.GOOGLE_API_KEY) {
492262
492267
  args.push("--env", `GOOGLE_API_KEY=${process.env.GOOGLE_API_KEY}`);
492263
492268
  }
492264
- if (process.env.OPENAI_API_KEY) {
492265
- args.push("--env", `OPENAI_API_KEY=${process.env.OPENAI_API_KEY}`);
492269
+ if (process.env.CUSTOM_AUTH) {
492270
+ if (process.env.OPENAI_API_KEY) {
492271
+ args.push("--env", `OPENAI_API_KEY=${process.env.OPENAI_API_KEY}`);
492272
+ }
492273
+ if (process.env.OPENAI_BASE_URL) {
492274
+ args.push("--env", `OPENAI_BASE_URL=${process.env.OPENAI_BASE_URL}`);
492275
+ }
492276
+ if (process.env.OPENAI_MODEL) {
492277
+ args.push("--env", `OPENAI_MODEL=${process.env.OPENAI_MODEL}`);
492278
+ }
492266
492279
  }
492267
492280
  if (process.env.TAVILY_API_KEY) {
492268
492281
  args.push("--env", `TAVILY_API_KEY=${process.env.TAVILY_API_KEY}`);
492269
492282
  }
492270
- if (process.env.OPENAI_BASE_URL) {
492271
- args.push("--env", `OPENAI_BASE_URL=${process.env.OPENAI_BASE_URL}`);
492272
- }
492273
- if (process.env.OPENAI_MODEL) {
492274
- args.push("--env", `OPENAI_MODEL=${process.env.OPENAI_MODEL}`);
492275
- }
492276
492283
  if (process.env.GOOGLE_GENAI_USE_VERTEXAI) {
492277
492284
  args.push(
492278
492285
  "--env",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unity-china/codely-cli",
3
- "version": "1.0.0-beta.43",
3
+ "version": "1.0.0-beta.44",
4
4
  "engines": {
5
5
  "node": ">=20.0.0"
6
6
  },