@unity-china/codely-cli 1.0.0-beta.41 → 1.0.0-beta.42
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/bundle/gemini.js +56 -14
- package/package.json +1 -1
package/bundle/gemini.js
CHANGED
|
@@ -399554,21 +399554,21 @@ var require_tinycolor = __commonJS({
|
|
|
399554
399554
|
};
|
|
399555
399555
|
}
|
|
399556
399556
|
function rgbToHex(r4, g, b, allow3Char) {
|
|
399557
|
-
var hex = [
|
|
399557
|
+
var hex = [pad22(Math.round(r4).toString(16)), pad22(Math.round(g).toString(16)), pad22(Math.round(b).toString(16))];
|
|
399558
399558
|
if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
|
|
399559
399559
|
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
|
|
399560
399560
|
}
|
|
399561
399561
|
return hex.join("");
|
|
399562
399562
|
}
|
|
399563
399563
|
function rgbaToHex(r4, g, b, a2, allow4Char) {
|
|
399564
|
-
var hex = [
|
|
399564
|
+
var hex = [pad22(Math.round(r4).toString(16)), pad22(Math.round(g).toString(16)), pad22(Math.round(b).toString(16)), pad22(convertDecimalToHex(a2))];
|
|
399565
399565
|
if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
|
|
399566
399566
|
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
|
|
399567
399567
|
}
|
|
399568
399568
|
return hex.join("");
|
|
399569
399569
|
}
|
|
399570
399570
|
function rgbaToArgbHex(r4, g, b, a2) {
|
|
399571
|
-
var hex = [
|
|
399571
|
+
var hex = [pad22(convertDecimalToHex(a2)), pad22(Math.round(r4).toString(16)), pad22(Math.round(g).toString(16)), pad22(Math.round(b).toString(16))];
|
|
399572
399572
|
return hex.join("");
|
|
399573
399573
|
}
|
|
399574
399574
|
tinycolor.equals = function(color1, color2) {
|
|
@@ -399944,7 +399944,7 @@ var require_tinycolor = __commonJS({
|
|
|
399944
399944
|
function isPercentage(n3) {
|
|
399945
399945
|
return typeof n3 === "string" && n3.indexOf("%") != -1;
|
|
399946
399946
|
}
|
|
399947
|
-
function
|
|
399947
|
+
function pad22(c5) {
|
|
399948
399948
|
return c5.length == 1 ? "0" + c5 : "" + c5;
|
|
399949
399949
|
}
|
|
399950
399950
|
function convertToPercentage(n3) {
|
|
@@ -419214,7 +419214,7 @@ async function getPackageJson2() {
|
|
|
419214
419214
|
// packages/cli/src/utils/version.ts
|
|
419215
419215
|
async function getCliVersion() {
|
|
419216
419216
|
const pkgJson = await getPackageJson2();
|
|
419217
|
-
return "1.0.0-beta.
|
|
419217
|
+
return "1.0.0-beta.42";
|
|
419218
419218
|
}
|
|
419219
419219
|
|
|
419220
419220
|
// packages/cli/src/ui/commands/types.ts
|
|
@@ -419747,7 +419747,7 @@ import process30 from "node:process";
|
|
|
419747
419747
|
|
|
419748
419748
|
// packages/cli/src/generated/git-commit.ts
|
|
419749
419749
|
init_esbuild_polyfill();
|
|
419750
|
-
var GIT_COMMIT_INFO = "
|
|
419750
|
+
var GIT_COMMIT_INFO = "9ad807a5";
|
|
419751
419751
|
|
|
419752
419752
|
// packages/cli/src/ui/commands/bugCommand.ts
|
|
419753
419753
|
var bugCommand = {
|
|
@@ -419815,7 +419815,51 @@ init_esbuild_polyfill();
|
|
|
419815
419815
|
init_strip_ansi();
|
|
419816
419816
|
import * as fsPromises5 from "fs/promises";
|
|
419817
419817
|
import path59 from "path";
|
|
419818
|
-
var
|
|
419818
|
+
var pad2 = (n3) => String(n3).padStart(2, "0");
|
|
419819
|
+
var pad3 = (n3) => String(n3).padStart(3, "0");
|
|
419820
|
+
var formatLocalDateTime = (date5) => {
|
|
419821
|
+
if (!(date5 instanceof Date) || Number.isNaN(date5.getTime())) {
|
|
419822
|
+
return "Invalid Date";
|
|
419823
|
+
}
|
|
419824
|
+
const y = date5.getFullYear();
|
|
419825
|
+
const m2 = pad2(date5.getMonth() + 1);
|
|
419826
|
+
const d = pad2(date5.getDate());
|
|
419827
|
+
const hh = pad2(date5.getHours());
|
|
419828
|
+
const mm = pad2(date5.getMinutes());
|
|
419829
|
+
const ss = pad2(date5.getSeconds());
|
|
419830
|
+
return `${y}-${m2}-${d} ${hh}:${mm}:${ss}`;
|
|
419831
|
+
};
|
|
419832
|
+
var formatLocalTimestampWithOffset = (date5 = /* @__PURE__ */ new Date()) => {
|
|
419833
|
+
if (!(date5 instanceof Date) || Number.isNaN(date5.getTime())) {
|
|
419834
|
+
return "Invalid Date";
|
|
419835
|
+
}
|
|
419836
|
+
const y = date5.getFullYear();
|
|
419837
|
+
const m2 = pad2(date5.getMonth() + 1);
|
|
419838
|
+
const d = pad2(date5.getDate());
|
|
419839
|
+
const hh = pad2(date5.getHours());
|
|
419840
|
+
const mm = pad2(date5.getMinutes());
|
|
419841
|
+
const ss = pad2(date5.getSeconds());
|
|
419842
|
+
const ms = pad3(date5.getMilliseconds());
|
|
419843
|
+
const offsetMinutes = -date5.getTimezoneOffset();
|
|
419844
|
+
const sign = offsetMinutes >= 0 ? "+" : "-";
|
|
419845
|
+
const abs = Math.abs(offsetMinutes);
|
|
419846
|
+
const offH = pad2(Math.floor(abs / 60));
|
|
419847
|
+
const offM = pad2(abs % 60);
|
|
419848
|
+
return `${y}-${m2}-${d}T${hh}:${mm}:${ss}.${ms}${sign}${offH}:${offM}`;
|
|
419849
|
+
};
|
|
419850
|
+
var formatExportTimestampForFilename = (date5 = /* @__PURE__ */ new Date()) => {
|
|
419851
|
+
if (!(date5 instanceof Date) || Number.isNaN(date5.getTime())) {
|
|
419852
|
+
return "invalid-date";
|
|
419853
|
+
}
|
|
419854
|
+
const y = date5.getFullYear();
|
|
419855
|
+
const m2 = pad2(date5.getMonth() + 1);
|
|
419856
|
+
const d = pad2(date5.getDate());
|
|
419857
|
+
const hh = pad2(date5.getHours());
|
|
419858
|
+
const mm = pad2(date5.getMinutes());
|
|
419859
|
+
const ss = pad2(date5.getSeconds());
|
|
419860
|
+
const ms = pad3(date5.getMilliseconds());
|
|
419861
|
+
return `${y}-${m2}-${d}-${hh}-${mm}-${ss}-${ms}`;
|
|
419862
|
+
};
|
|
419819
419863
|
var formatDuration2 = (durationMs) => {
|
|
419820
419864
|
if (!durationMs) return "N/A";
|
|
419821
419865
|
if (durationMs < 1e3) {
|
|
@@ -419906,7 +419950,7 @@ var extractToolResultText = (result) => {
|
|
|
419906
419950
|
return joined.trim() ? joined : void 0;
|
|
419907
419951
|
};
|
|
419908
419952
|
var convertConversationToMarkdown = (conversation, chatName) => {
|
|
419909
|
-
const exportTimestamp = (/* @__PURE__ */ new Date())
|
|
419953
|
+
const exportTimestamp = formatLocalTimestampWithOffset(/* @__PURE__ */ new Date());
|
|
419910
419954
|
let markdown2 = `# \u{1F680} Enhanced Chat Export`;
|
|
419911
419955
|
if (chatName) {
|
|
419912
419956
|
markdown2 += ` - ${chatName}`;
|
|
@@ -420080,7 +420124,7 @@ var convertConversationToMarkdown = (conversation, chatName) => {
|
|
|
420080
420124
|
return markdown2;
|
|
420081
420125
|
};
|
|
420082
420126
|
var convertLegacyHistoryToConversationRecord = (history, _chatName) => {
|
|
420083
|
-
const now = (/* @__PURE__ */ new Date())
|
|
420127
|
+
const now = formatLocalTimestampWithOffset(/* @__PURE__ */ new Date());
|
|
420084
420128
|
return {
|
|
420085
420129
|
sessionId: "legacy-export",
|
|
420086
420130
|
projectHash: "unknown",
|
|
@@ -420226,9 +420270,7 @@ var listCommand2 = {
|
|
|
420226
420270
|
let message = "List of saved conversations:\n\n";
|
|
420227
420271
|
for (const chat of chatDetails) {
|
|
420228
420272
|
const paddedName = chat.name.padEnd(maxNameLength, " ");
|
|
420229
|
-
const
|
|
420230
|
-
const match3 = isoString.match(/(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})/);
|
|
420231
|
-
const formattedDate = match3 ? `${match3[1]} ${match3[2]}` : "Invalid Date";
|
|
420273
|
+
const formattedDate = formatLocalDateTime(chat.mtime);
|
|
420232
420274
|
message += ` - \x1B[36m${paddedName}\x1B[0m \x1B[90m(saved on ${formattedDate})\x1B[0m
|
|
420233
420275
|
`;
|
|
420234
420276
|
}
|
|
@@ -420665,7 +420707,7 @@ var sessionsCommand = {
|
|
|
420665
420707
|
let message = "Available chat recording sessions:\n\n";
|
|
420666
420708
|
for (const session of sessions.slice(0, 10)) {
|
|
420667
420709
|
const sessionDisplay = session.sessionId.substring(0, 20);
|
|
420668
|
-
const formattedDate = session.mtime
|
|
420710
|
+
const formattedDate = formatLocalDateTime(session.mtime);
|
|
420669
420711
|
message += ` - \`${sessionDisplay}...\` (${formattedDate})
|
|
420670
420712
|
`;
|
|
420671
420713
|
}
|
|
@@ -465455,7 +465497,7 @@ ${formatErrorSection(error41)}
|
|
|
465455
465497
|
}
|
|
465456
465498
|
const checkpoint = {
|
|
465457
465499
|
tag: tag2,
|
|
465458
|
-
timestamp: (/* @__PURE__ */ new Date())
|
|
465500
|
+
timestamp: formatLocalTimestampWithOffset(/* @__PURE__ */ new Date()),
|
|
465459
465501
|
type: "automatic",
|
|
465460
465502
|
history: uiHistory,
|
|
465461
465503
|
clientHistory: clientHistoryForResume,
|