@meistrari/tela-cli 1.9.2 → 1.9.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/dist/index.js +39 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -374139,7 +374139,7 @@ var require_remote_api2 = __commonJS({
|
|
|
374139
374139
|
title: input.title,
|
|
374140
374140
|
projectId: input.projectId,
|
|
374141
374141
|
workspaceId: input.workspaceId,
|
|
374142
|
-
layoutVersion: "
|
|
374142
|
+
layoutVersion: "v2",
|
|
374143
374143
|
customTags: ["workflow-code"],
|
|
374144
374144
|
version: {
|
|
374145
374145
|
title: input.updates.title,
|
|
@@ -382514,6 +382514,8 @@ var require_commit_message = __commonJS({
|
|
|
382514
382514
|
"../../packages/agent/dist/commit-message.js"(exports2) {
|
|
382515
382515
|
"use strict";
|
|
382516
382516
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
382517
|
+
exports2.normalizeClaudeCommitFallbackReason = normalizeClaudeCommitFallbackReason;
|
|
382518
|
+
exports2.getClaudeCommitFallbackReason = getClaudeCommitFallbackReason;
|
|
382517
382519
|
exports2.isConventionalCommitMessage = isConventionalCommitMessage;
|
|
382518
382520
|
exports2.normalizeConventionalCommitMessage = normalizeConventionalCommitMessage;
|
|
382519
382521
|
exports2.generateCommitMessageWithClaude = generateCommitMessageWithClaude;
|
|
@@ -382521,6 +382523,40 @@ var require_commit_message = __commonJS({
|
|
|
382521
382523
|
var node_path_1 = require("node:path");
|
|
382522
382524
|
var process_1 = require_process();
|
|
382523
382525
|
var conventionalCommitPattern = /^(?:build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(?:\([^)]+\))?!?:\s+\S/;
|
|
382526
|
+
var claudeCommitFallbackReasons = {
|
|
382527
|
+
unavailable: "Claude Code is not available. Set it up or review the fallback commit message.",
|
|
382528
|
+
empty: "Claude returned an empty commit message. Review the fallback message or retry.",
|
|
382529
|
+
unsupported: "Claude Code does not support the selected model. Update Claude Code, then retry.",
|
|
382530
|
+
authentication: "Claude authentication failed. Sign in to Claude Code, then retry.",
|
|
382531
|
+
limit: "Claude usage limit reached. Review the fallback message or retry after the limit resets.",
|
|
382532
|
+
timeout: "Claude took too long to generate a commit message. Review the fallback message or retry.",
|
|
382533
|
+
failed: "Claude could not generate the commit message. Review the fallback message or retry."
|
|
382534
|
+
};
|
|
382535
|
+
function normalizeClaudeCommitFallbackReason(reason) {
|
|
382536
|
+
if (Object.values(claudeCommitFallbackReasons).includes(reason))
|
|
382537
|
+
return reason;
|
|
382538
|
+
if (["Claude CLI is not available", "Claude unavailable"].includes(reason))
|
|
382539
|
+
return claudeCommitFallbackReasons.unavailable;
|
|
382540
|
+
if (/^Claude returned an empty commit message\.?$/.test(reason))
|
|
382541
|
+
return claudeCommitFallbackReasons.empty;
|
|
382542
|
+
return claudeCommitFallbackReasons.failed;
|
|
382543
|
+
}
|
|
382544
|
+
function getClaudeCommitFallbackReason(error48) {
|
|
382545
|
+
if (error48 instanceof process_1.CommandError) {
|
|
382546
|
+
const output = `${error48.result.stderr}
|
|
382547
|
+
${error48.result.stdout}`;
|
|
382548
|
+
if (/does not support this model|unsupported model/i.test(output))
|
|
382549
|
+
return claudeCommitFallbackReasons.unsupported;
|
|
382550
|
+
if (/not logged in|authentication failed|invalid api key|login required/i.test(output))
|
|
382551
|
+
return claudeCommitFallbackReasons.authentication;
|
|
382552
|
+
if (/rate limit|usage limit|limit reached/i.test(output))
|
|
382553
|
+
return claudeCommitFallbackReasons.limit;
|
|
382554
|
+
if (/timed out/i.test(output))
|
|
382555
|
+
return claudeCommitFallbackReasons.timeout;
|
|
382556
|
+
return claudeCommitFallbackReasons.failed;
|
|
382557
|
+
}
|
|
382558
|
+
return normalizeClaudeCommitFallbackReason(error48 instanceof Error ? error48.message : "");
|
|
382559
|
+
}
|
|
382524
382560
|
function firstNonEmptyLine(input) {
|
|
382525
382561
|
return input.split(/\r?\n/).map((line) => line.trim()).find(Boolean) ?? "";
|
|
382526
382562
|
}
|
|
@@ -382660,13 +382696,13 @@ var require_push = __commonJS({
|
|
|
382660
382696
|
return {
|
|
382661
382697
|
message: fallbackMessage,
|
|
382662
382698
|
source: "fallback",
|
|
382663
|
-
fallbackReason:
|
|
382699
|
+
fallbackReason: (0, commit_message_1.getClaudeCommitFallbackReason)(error48)
|
|
382664
382700
|
};
|
|
382665
382701
|
}
|
|
382666
382702
|
return {
|
|
382667
382703
|
message: (0, commit_message_1.fallbackCommitMessageFromFiles)(files) || (0, git_1.buildFallbackCommitMessage)(files),
|
|
382668
382704
|
source: "fallback",
|
|
382669
|
-
fallbackReason: "Claude returned an empty commit message."
|
|
382705
|
+
fallbackReason: (0, commit_message_1.normalizeClaudeCommitFallbackReason)("Claude returned an empty commit message.")
|
|
382670
382706
|
};
|
|
382671
382707
|
}
|
|
382672
382708
|
function isDetachedHeadError(error48) {
|