pointcode 0.1.5 → 0.1.7

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/dist/cli.mjs +76 -15
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -123114,7 +123114,7 @@ var init_metadata = __esm(() => {
123114
123114
  isClaudeAiAuth: isClaudeAISubscriber(),
123115
123115
  version: "99.0.0",
123116
123116
  versionBase: getVersionBase(),
123117
- buildTime: "2026-04-02T16:51:00.462Z",
123117
+ buildTime: "2026-04-02T17:13:55.342Z",
123118
123118
  deploymentEnvironment: env3.detectDeploymentEnvironment(),
123119
123119
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
123120
123120
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -364196,7 +364196,7 @@ function getAnthropicEnvMetadata() {
364196
364196
  function getBuildAgeMinutes() {
364197
364197
  if (false)
364198
364198
  ;
364199
- const buildTime = new Date("2026-04-02T16:51:00.462Z").getTime();
364199
+ const buildTime = new Date("2026-04-02T17:13:55.342Z").getTime();
364200
364200
  if (isNaN(buildTime))
364201
364201
  return;
364202
364202
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -428492,7 +428492,7 @@ function getRecentActivitySync() {
428492
428492
  return cachedActivity;
428493
428493
  }
428494
428494
  function getLogoDisplayData() {
428495
- const version2 = process.env.DEMO_VERSION ?? "0.1.5" ?? "99.0.0";
428495
+ const version2 = process.env.DEMO_VERSION ?? "0.1.7" ?? "99.0.0";
428496
428496
  const serverUrl = getDirectConnectServerUrl();
428497
428497
  const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
428498
428498
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -458292,7 +458292,7 @@ var init_bridge_kick = __esm(() => {
458292
458292
  var call54 = async () => {
458293
458293
  return {
458294
458294
  type: "text",
458295
- value: `${"99.0.0"} (built ${"2026-04-02T16:51:00.462Z"})`
458295
+ value: `${"99.0.0"} (built ${"2026-04-02T17:13:55.342Z"})`
458296
458296
  };
458297
458297
  }, version2, version_default;
458298
458298
  var init_version = __esm(() => {
@@ -461312,6 +461312,55 @@ var exports_model2 = {};
461312
461312
  __export(exports_model2, {
461313
461313
  call: () => call61
461314
461314
  });
461315
+ function clearThirdPartyProviderFlags() {
461316
+ delete process.env.CLAUDE_CODE_USE_OPENAI;
461317
+ delete process.env.CLAUDE_CODE_USE_GEMINI;
461318
+ delete process.env.CLAUDE_CODE_USE_BEDROCK;
461319
+ delete process.env.CLAUDE_CODE_USE_VERTEX;
461320
+ delete process.env.CLAUDE_CODE_USE_FOUNDRY;
461321
+ }
461322
+ function isAnthropicFamilyModel(model) {
461323
+ if (!model) {
461324
+ return false;
461325
+ }
461326
+ const normalized = model.toLowerCase();
461327
+ return normalized.includes("opus") || normalized.includes("sonnet") || normalized.includes("haiku") || normalized.includes("claude");
461328
+ }
461329
+ function buildCredentialMismatchHint(model, errorText) {
461330
+ const lower = (errorText ?? "").toLowerCase();
461331
+ const likelyAuthError = lower.includes("auth") || lower.includes("invalid api key") || lower.includes("api key") || lower.includes("401") || lower.includes("403");
461332
+ if (!likelyAuthError) {
461333
+ return "";
461334
+ }
461335
+ if (isAnthropicFamilyModel(model)) {
461336
+ return `Model '${model}' belongs to Claude family. Please use an Anthropic/Claude API key, or switch to qwen/deepseek/glm/mimo if you want to use OpenAI-compatible keys.`;
461337
+ }
461338
+ return `Model '${model}' uses an OpenAI-compatible provider. Please use the matching provider key (for example Qwen, DeepSeek, GLM, or MiMo key).`;
461339
+ }
461340
+ async function validateModelAccessAfterSave(modelValue) {
461341
+ if (!modelValue) {
461342
+ return {
461343
+ ok: true
461344
+ };
461345
+ }
461346
+ const modelToValidate = parseUserSpecifiedModel(modelValue);
461347
+ const {
461348
+ valid,
461349
+ error: error42
461350
+ } = await validateModel(modelToValidate);
461351
+ if (valid) {
461352
+ return {
461353
+ ok: true
461354
+ };
461355
+ }
461356
+ const hint = buildCredentialMismatchHint(modelToValidate, error42);
461357
+ return {
461358
+ ok: false,
461359
+ message: `${API_KEY_SAVED_MESSAGE}
461360
+ Validation failed for '${modelToValidate}': ${error42}${hint ? `
461361
+ ${hint}` : ""}`
461362
+ };
461363
+ }
461315
461364
  function resolveBaseUrlForModel(model) {
461316
461365
  if (!model) {
461317
461366
  return process.env.OPENAI_BASE_URL;
@@ -461324,6 +461373,17 @@ function resolveBaseUrlForModel(model) {
461324
461373
  }
461325
461374
  async function saveModelApiKey(value, onDone, modelValue) {
461326
461375
  try {
461376
+ if (isAnthropicFamilyModel(modelValue) || /^sk-ant/i.test(value)) {
461377
+ clearThirdPartyProviderFlags();
461378
+ await saveApiKey(value);
461379
+ process.env.ANTHROPIC_API_KEY = value;
461380
+ delete process.env.OPENAI_API_KEY;
461381
+ const validation2 = await validateModelAccessAfterSave(modelValue);
461382
+ onDone(validation2.ok ? API_KEY_SAVED_MESSAGE : validation2.message, {
461383
+ display: "system"
461384
+ });
461385
+ return;
461386
+ }
461327
461387
  const openAIModel = modelValue ?? process.env.OPENAI_MODEL ?? "qwen3.5-plus";
461328
461388
  const openAIBaseUrl = resolveBaseUrlForModel(openAIModel) ?? "https://dashscope.aliyuncs.com/compatible-mode/v1";
461329
461389
  const profile = saveOpenAIProviderProfile({
@@ -461335,7 +461395,8 @@ async function saveModelApiKey(value, onDone, modelValue) {
461335
461395
  process.env.CLAUDE_CODE_USE_OPENAI = "1";
461336
461396
  delete process.env.ANTHROPIC_API_KEY;
461337
461397
  await saveApiKey(value);
461338
- onDone("API key saved. You can now run /model to choose a model and start using PointCode.", {
461398
+ const validation = await validateModelAccessAfterSave(modelValue);
461399
+ onDone(validation.ok ? API_KEY_SAVED_MESSAGE : validation.message, {
461339
461400
  display: "system"
461340
461401
  });
461341
461402
  } catch (error42) {
@@ -461470,7 +461531,7 @@ function ModelPickerWrapper(t0) {
461470
461531
  return;
461471
461532
  }
461472
461533
  let selectedModel = model;
461473
- if (selectedModel !== null) {
461534
+ if (selectedModel !== null && !isAnthropicFamilyModel(selectedModel)) {
461474
461535
  selectedModel = switchOpenAIModel(selectedModel);
461475
461536
  }
461476
461537
  if (selectedModel !== null) {
@@ -461487,7 +461548,7 @@ function ModelPickerWrapper(t0) {
461487
461548
  return /* @__PURE__ */ jsx_dev_runtime352.jsxDEV(EnterApiKeyAndSave, {
461488
461549
  modelValue: pendingSelection.model,
461489
461550
  onDone: (result, options2) => {
461490
- if (!result || !result.startsWith("API key saved")) {
461551
+ if (!result || result !== API_KEY_SAVED_MESSAGE) {
461491
461552
  onDone(result, options2);
461492
461553
  return;
461493
461554
  }
@@ -461683,7 +461744,7 @@ function renderModelLabel(model) {
461683
461744
  const rendered = renderDefaultModelSetting(model ?? getDefaultMainLoopModelSetting());
461684
461745
  return model === null ? `${rendered} (default)` : rendered;
461685
461746
  }
461686
- var React110, import_react194, jsx_dev_runtime352, call61 = async (onDone, _context, args) => {
461747
+ var React110, import_react194, jsx_dev_runtime352, API_KEY_SAVED_MESSAGE = "API key saved. You can now run /model to choose a model and start using PointCode.", call61 = async (onDone, _context, args) => {
461687
461748
  args = args?.trim() || "";
461688
461749
  const missingOpenAIKeyTip = getMissingOpenAIKeyTip();
461689
461750
  if (!args && missingOpenAIKeyTip) {
@@ -531008,7 +531069,7 @@ function WelcomeV2() {
531008
531069
  dimColor: true,
531009
531070
  children: [
531010
531071
  "v",
531011
- "0.1.5",
531072
+ "0.1.7",
531012
531073
  " "
531013
531074
  ]
531014
531075
  }, undefined, true, undefined, this)
@@ -531208,7 +531269,7 @@ function WelcomeV2() {
531208
531269
  dimColor: true,
531209
531270
  children: [
531210
531271
  "v",
531211
- "0.1.5",
531272
+ "0.1.7",
531212
531273
  " "
531213
531274
  ]
531214
531275
  }, undefined, true, undefined, this)
@@ -531434,7 +531495,7 @@ function AppleTerminalWelcomeV2(t0) {
531434
531495
  dimColor: true,
531435
531496
  children: [
531436
531497
  "v",
531437
- "0.1.5",
531498
+ "0.1.7",
531438
531499
  " "
531439
531500
  ]
531440
531501
  }, undefined, true, undefined, this);
@@ -531688,7 +531749,7 @@ function AppleTerminalWelcomeV2(t0) {
531688
531749
  dimColor: true,
531689
531750
  children: [
531690
531751
  "v",
531691
- "0.1.5",
531752
+ "0.1.7",
531692
531753
  " "
531693
531754
  ]
531694
531755
  }, undefined, true, undefined, this);
@@ -552178,7 +552239,7 @@ Usage: claude --remote "your task description"`, () => gracefulShutdown(1));
552178
552239
  pendingHookMessages
552179
552240
  }, renderAndRun);
552180
552241
  }
552181
- }).version("0.1.5 (Open Claude)", "-v, --version", "Output the version number");
552242
+ }).version("0.1.7 (Open Claude)", "-v, --version", "Output the version number");
552182
552243
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
552183
552244
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
552184
552245
  if (canUserConfigureAdvisor()) {
@@ -552737,7 +552798,7 @@ function validateProviderEnvOrExit() {
552737
552798
  async function main2() {
552738
552799
  const args = process.argv.slice(2);
552739
552800
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
552740
- console.log(`${"0.1.5"} (PointCode)`);
552801
+ console.log(`${"0.1.7"} (PointCode)`);
552741
552802
  return;
552742
552803
  }
552743
552804
  validateProviderEnvOrExit();
@@ -552824,4 +552885,4 @@ async function main2() {
552824
552885
  }
552825
552886
  main2();
552826
552887
 
552827
- //# debugId=59810AFAF4F90C5464756E2164756E21
552888
+ //# debugId=C9FD42C270F6EEF064756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pointcode",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "PointCode - 可自定义UI的AI编程助手",
5
5
  "type": "module",
6
6
  "bin": {