@bike4mind/cli 0.2.10-fix-b4m-cli-flicker.17243 → 0.2.10-ja-fix-confluence-table-data-5752.17265
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/{artifactExtractor-JAGU7QRL.js → artifactExtractor-WFUONETP.js} +1 -1
- package/dist/{chunk-GCVIRGIN.js → chunk-3I4UTS5N.js} +1 -1
- package/dist/{chunk-GO75FMLY.js → chunk-BFYTGKUM.js} +2 -2
- package/dist/{chunk-VZU4Z7WI.js → chunk-KPZSR7LA.js} +2 -2
- package/dist/{chunk-DJPXSSP4.js → chunk-THQIBKD4.js} +115 -30
- package/dist/{chunk-AQBZVAYO.js → chunk-Y7TWJGN7.js} +2 -2
- package/dist/{create-ZDOTF7XD.js → create-QKBTX2SB.js} +3 -3
- package/dist/index.js +128 -147
- package/dist/{llmMarkdownGenerator-LXUGJ7QH.js → llmMarkdownGenerator-NALGM3SY.js} +1 -1
- package/dist/{markdownGenerator-IMDG6OX6.js → markdownGenerator-GUZ3H2KM.js} +1 -1
- package/dist/{mementoService-TURUS3OH.js → mementoService-DVN7VNSJ.js} +3 -3
- package/dist/{src-YNY32ELR.js → src-KKM67YED.js} +7 -3
- package/dist/{src-6ZRXGE5J.js → src-Q25OMI3Y.js} +2 -2
- package/dist/{subtractCredits-GOVKM3IR.js → subtractCredits-YCAHUW6W.js} +3 -3
- package/package.json +6 -6
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
dayjsConfig_default,
|
|
17
17
|
extractSnippetMeta,
|
|
18
18
|
settingsMap
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-THQIBKD4.js";
|
|
20
20
|
|
|
21
21
|
// ../../b4m-core/packages/utils/dist/src/storage/S3Storage.js
|
|
22
22
|
import { S3Client, PutObjectCommand, DeleteObjectCommand, GetObjectCommand, HeadObjectCommand } from "@aws-sdk/client-s3";
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
getSettingsByNames,
|
|
7
7
|
obfuscateApiKey,
|
|
8
8
|
secureParameters
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3I4UTS5N.js";
|
|
10
10
|
import {
|
|
11
11
|
ApiKeyType,
|
|
12
12
|
MementoTier,
|
|
13
13
|
isSupportedEmbeddingModel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-THQIBKD4.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BadRequestError,
|
|
4
4
|
secureParameters
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3I4UTS5N.js";
|
|
6
6
|
import {
|
|
7
7
|
GenericCreditDeductTransaction,
|
|
8
8
|
ImageEditUsageTransaction,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
RealtimeVoiceUsageTransaction,
|
|
11
11
|
TextGenerationUsageTransaction,
|
|
12
12
|
TransferCreditTransaction
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-THQIBKD4.js";
|
|
14
14
|
|
|
15
15
|
// ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
|
|
16
16
|
import { z } from "zod";
|
|
@@ -5052,6 +5052,74 @@ function formatUserList(users) {
|
|
|
5052
5052
|
}
|
|
5053
5053
|
|
|
5054
5054
|
// ../../b4m-core/packages/common/dist/src/jira/api.js
|
|
5055
|
+
function wikiMarkupToAdf(text) {
|
|
5056
|
+
const lines = text.split("\n");
|
|
5057
|
+
const content = [];
|
|
5058
|
+
let currentTableRows = [];
|
|
5059
|
+
let inTable = false;
|
|
5060
|
+
for (const line of lines) {
|
|
5061
|
+
const trimmedLine = line.trim();
|
|
5062
|
+
if (trimmedLine.startsWith("||") && trimmedLine.endsWith("||")) {
|
|
5063
|
+
inTable = true;
|
|
5064
|
+
const cells = trimmedLine.slice(2, -2).split("||").map((cell) => cell.trim());
|
|
5065
|
+
const headerRow = {
|
|
5066
|
+
type: "tableRow",
|
|
5067
|
+
content: cells.map((cell) => ({
|
|
5068
|
+
type: "tableHeader",
|
|
5069
|
+
attrs: {},
|
|
5070
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: cell || " " }] }]
|
|
5071
|
+
}))
|
|
5072
|
+
};
|
|
5073
|
+
currentTableRows.push(headerRow);
|
|
5074
|
+
continue;
|
|
5075
|
+
}
|
|
5076
|
+
if (trimmedLine.startsWith("|") && trimmedLine.endsWith("|") && !trimmedLine.startsWith("||")) {
|
|
5077
|
+
inTable = true;
|
|
5078
|
+
const cells = trimmedLine.slice(1, -1).split("|").map((cell) => cell.trim());
|
|
5079
|
+
const dataRow = {
|
|
5080
|
+
type: "tableRow",
|
|
5081
|
+
content: cells.map((cell) => ({
|
|
5082
|
+
type: "tableCell",
|
|
5083
|
+
attrs: {},
|
|
5084
|
+
content: [{ type: "paragraph", content: [{ type: "text", text: cell || " " }] }]
|
|
5085
|
+
}))
|
|
5086
|
+
};
|
|
5087
|
+
currentTableRows.push(dataRow);
|
|
5088
|
+
continue;
|
|
5089
|
+
}
|
|
5090
|
+
if (inTable && currentTableRows.length > 0) {
|
|
5091
|
+
const table = {
|
|
5092
|
+
type: "table",
|
|
5093
|
+
attrs: { isNumberColumnEnabled: false, layout: "default" },
|
|
5094
|
+
content: currentTableRows
|
|
5095
|
+
};
|
|
5096
|
+
content.push(table);
|
|
5097
|
+
currentTableRows = [];
|
|
5098
|
+
inTable = false;
|
|
5099
|
+
}
|
|
5100
|
+
if (trimmedLine) {
|
|
5101
|
+
content.push({
|
|
5102
|
+
type: "paragraph",
|
|
5103
|
+
content: [{ type: "text", text: trimmedLine }]
|
|
5104
|
+
});
|
|
5105
|
+
}
|
|
5106
|
+
}
|
|
5107
|
+
if (currentTableRows.length > 0) {
|
|
5108
|
+
const table = {
|
|
5109
|
+
type: "table",
|
|
5110
|
+
attrs: { isNumberColumnEnabled: false, layout: "default" },
|
|
5111
|
+
content: currentTableRows
|
|
5112
|
+
};
|
|
5113
|
+
content.push(table);
|
|
5114
|
+
}
|
|
5115
|
+
if (content.length === 0) {
|
|
5116
|
+
content.push({ type: "paragraph", content: [{ type: "text", text: " " }] });
|
|
5117
|
+
}
|
|
5118
|
+
return { type: "doc", version: 1, content };
|
|
5119
|
+
}
|
|
5120
|
+
function containsWikiTable(text) {
|
|
5121
|
+
return /^\|\|.+\|\|$/m.test(text) || /^\|(?!\|).+\|$/m.test(text);
|
|
5122
|
+
}
|
|
5055
5123
|
var JiraApi = class {
|
|
5056
5124
|
config;
|
|
5057
5125
|
constructor(config) {
|
|
@@ -5131,16 +5199,21 @@ var JiraApi = class {
|
|
|
5131
5199
|
...customFields
|
|
5132
5200
|
};
|
|
5133
5201
|
if (description) {
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5202
|
+
if (containsWikiTable(description)) {
|
|
5203
|
+
console.log("[JIRA-ADF] Converting wiki table to ADF", { length: description.length });
|
|
5204
|
+
fields.description = wikiMarkupToAdf(description);
|
|
5205
|
+
} else {
|
|
5206
|
+
fields.description = {
|
|
5207
|
+
type: "doc",
|
|
5208
|
+
version: 1,
|
|
5209
|
+
content: [
|
|
5210
|
+
{
|
|
5211
|
+
type: "paragraph",
|
|
5212
|
+
content: [{ type: "text", text: description }]
|
|
5213
|
+
}
|
|
5214
|
+
]
|
|
5215
|
+
};
|
|
5216
|
+
}
|
|
5144
5217
|
}
|
|
5145
5218
|
if (assignee) {
|
|
5146
5219
|
fields.assignee = { id: assignee };
|
|
@@ -5166,16 +5239,21 @@ var JiraApi = class {
|
|
|
5166
5239
|
fields.summary = summary;
|
|
5167
5240
|
}
|
|
5168
5241
|
if (description) {
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5242
|
+
if (containsWikiTable(description)) {
|
|
5243
|
+
console.log("[JIRA-ADF] Converting wiki table to ADF (update)", { length: description.length });
|
|
5244
|
+
fields.description = wikiMarkupToAdf(description);
|
|
5245
|
+
} else {
|
|
5246
|
+
fields.description = {
|
|
5247
|
+
type: "doc",
|
|
5248
|
+
version: 1,
|
|
5249
|
+
content: [
|
|
5250
|
+
{
|
|
5251
|
+
type: "paragraph",
|
|
5252
|
+
content: [{ type: "text", text: description }]
|
|
5253
|
+
}
|
|
5254
|
+
]
|
|
5255
|
+
};
|
|
5256
|
+
}
|
|
5179
5257
|
}
|
|
5180
5258
|
if (labels) {
|
|
5181
5259
|
fields.labels = labels;
|
|
@@ -5335,16 +5413,21 @@ var JiraApi = class {
|
|
|
5335
5413
|
issuetype: { name: issueTypeName }
|
|
5336
5414
|
};
|
|
5337
5415
|
if (description) {
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5416
|
+
if (containsWikiTable(description)) {
|
|
5417
|
+
console.log("[JIRA-ADF] Converting wiki table to ADF (bulk)", { length: description.length });
|
|
5418
|
+
fields.description = wikiMarkupToAdf(description);
|
|
5419
|
+
} else {
|
|
5420
|
+
fields.description = {
|
|
5421
|
+
type: "doc",
|
|
5422
|
+
version: 1,
|
|
5423
|
+
content: [
|
|
5424
|
+
{
|
|
5425
|
+
type: "paragraph",
|
|
5426
|
+
content: [{ type: "text", text: description }]
|
|
5427
|
+
}
|
|
5428
|
+
]
|
|
5429
|
+
};
|
|
5430
|
+
}
|
|
5348
5431
|
}
|
|
5349
5432
|
if (assignee) {
|
|
5350
5433
|
fields.assignee = { id: assignee };
|
|
@@ -6161,6 +6244,8 @@ export {
|
|
|
6161
6244
|
formatUser,
|
|
6162
6245
|
formatTransitionResult,
|
|
6163
6246
|
formatUserList,
|
|
6247
|
+
wikiMarkupToAdf,
|
|
6248
|
+
containsWikiTable,
|
|
6164
6249
|
JiraApi,
|
|
6165
6250
|
getErrorMessage,
|
|
6166
6251
|
getAtlassianConfig,
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
getSettingsMap,
|
|
8
8
|
getSettingsValue,
|
|
9
9
|
secureParameters
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3I4UTS5N.js";
|
|
11
11
|
import {
|
|
12
12
|
KnowledgeType,
|
|
13
13
|
SupportedFabFileMimeTypes
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-THQIBKD4.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/fabFileService/create.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createFabFile,
|
|
4
4
|
createFabFileSchema
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-Y7TWJGN7.js";
|
|
6
|
+
import "./chunk-3I4UTS5N.js";
|
|
7
7
|
import "./chunk-AMDXHL6S.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-THQIBKD4.js";
|
|
9
9
|
import "./chunk-PDX44BCA.js";
|
|
10
10
|
export {
|
|
11
11
|
createFabFile,
|
package/dist/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
getEffectiveApiKey,
|
|
5
5
|
getOpenWeatherKey,
|
|
6
6
|
getSerperKey
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-BFYTGKUM.js";
|
|
8
|
+
import "./chunk-KPZSR7LA.js";
|
|
9
|
+
import "./chunk-Y7TWJGN7.js";
|
|
10
10
|
import {
|
|
11
11
|
BFLImageService,
|
|
12
12
|
BaseStorage,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
OpenAIBackend,
|
|
16
16
|
OpenAIImageService,
|
|
17
17
|
XAIImageService
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3I4UTS5N.js";
|
|
19
19
|
import {
|
|
20
20
|
Logger
|
|
21
21
|
} from "./chunk-AMDXHL6S.js";
|
|
@@ -73,30 +73,30 @@ import {
|
|
|
73
73
|
XAI_IMAGE_MODELS,
|
|
74
74
|
b4mLLMTools,
|
|
75
75
|
getMcpProviderMetadata
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-THQIBKD4.js";
|
|
77
77
|
import {
|
|
78
78
|
__require
|
|
79
79
|
} from "./chunk-PDX44BCA.js";
|
|
80
80
|
|
|
81
81
|
// src/index.tsx
|
|
82
|
-
import
|
|
83
|
-
import { render, Box as
|
|
82
|
+
import React16, { useState as useState8, useEffect as useEffect3, useCallback, useRef } from "react";
|
|
83
|
+
import { render, Box as Box15, Text as Text15, useApp, useInput as useInput6 } from "ink";
|
|
84
84
|
import { execSync } from "child_process";
|
|
85
85
|
import { v4 as uuidv49 } from "uuid";
|
|
86
86
|
|
|
87
87
|
// src/components/App.tsx
|
|
88
|
-
import
|
|
89
|
-
import { Box as
|
|
88
|
+
import React10, { useState as useState4 } from "react";
|
|
89
|
+
import { Box as Box9, Text as Text9 } from "ink";
|
|
90
90
|
|
|
91
91
|
// src/components/StatusBar.tsx
|
|
92
92
|
import React from "react";
|
|
93
93
|
import { Box, Text } from "ink";
|
|
94
94
|
var StatusBar = React.memo(function StatusBar2({ sessionName, model, tokenUsage }) {
|
|
95
|
-
return /* @__PURE__ */ React.createElement(Box, { flexDirection: "row", justifyContent: "space-between", width: "100%",
|
|
95
|
+
return /* @__PURE__ */ React.createElement(Box, { borderStyle: "single", borderColor: "green", paddingX: 1 }, /* @__PURE__ */ React.createElement(Box, { flexDirection: "row", justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React.createElement(Box, { gap: 2 }, /* @__PURE__ */ React.createElement(Text, { color: "green", bold: true }, "\u{1F4DD} Session:"), /* @__PURE__ */ React.createElement(Text, null, sessionName)), /* @__PURE__ */ React.createElement(Box, { gap: 2 }, /* @__PURE__ */ React.createElement(Text, { color: "blue", bold: true }, "\u{1F916} Model:"), /* @__PURE__ */ React.createElement(Text, null, model)), /* @__PURE__ */ React.createElement(Box, { gap: 2 }, /* @__PURE__ */ React.createElement(Text, { color: "yellow", bold: true }, "\u{1F4CA} Tokens:"), /* @__PURE__ */ React.createElement(Text, null, tokenUsage.toLocaleString()))));
|
|
96
96
|
});
|
|
97
97
|
|
|
98
98
|
// src/components/InputPrompt.tsx
|
|
99
|
-
import React5, { useState as useState2, useMemo, useEffect
|
|
99
|
+
import React5, { useState as useState2, useMemo, useEffect } from "react";
|
|
100
100
|
import { Box as Box4, Text as Text5, useInput as useInput2 } from "ink";
|
|
101
101
|
|
|
102
102
|
// src/components/CustomTextInput.tsx
|
|
@@ -745,7 +745,7 @@ function InputPrompt({
|
|
|
745
745
|
const [selectedIndex, setSelectedIndex] = useState2(0);
|
|
746
746
|
const [historyIndex, setHistoryIndex] = useState2(-1);
|
|
747
747
|
const [tempInput, setTempInput] = useState2("");
|
|
748
|
-
const inputKey =
|
|
748
|
+
const [inputKey, setInputKey] = useState2(0);
|
|
749
749
|
useEffect(() => {
|
|
750
750
|
if (prefillInput) {
|
|
751
751
|
setValue(prefillInput);
|
|
@@ -912,7 +912,7 @@ function InputPrompt({
|
|
|
912
912
|
return /* @__PURE__ */ React5.createElement(Box4, { flexDirection: "column" }, /* @__PURE__ */ React5.createElement(Box4, null, /* @__PURE__ */ React5.createElement(Text5, { bold: true, color: isBashMode ? "yellow" : "cyan" }, isBashMode ? "$ " : "> "), /* @__PURE__ */ React5.createElement(
|
|
913
913
|
CustomTextInput,
|
|
914
914
|
{
|
|
915
|
-
key: inputKey
|
|
915
|
+
key: inputKey,
|
|
916
916
|
value,
|
|
917
917
|
onChange: handleChange,
|
|
918
918
|
onSubmit: handleSubmit,
|
|
@@ -950,29 +950,6 @@ var useCliStore = create((set) => ({
|
|
|
950
950
|
}
|
|
951
951
|
};
|
|
952
952
|
}),
|
|
953
|
-
// Pending messages
|
|
954
|
-
pendingMessages: [],
|
|
955
|
-
addPendingMessage: (message) => set((state) => ({ pendingMessages: [...state.pendingMessages, message] })),
|
|
956
|
-
updatePendingMessage: (index, message) => set((state) => {
|
|
957
|
-
const updated = [...state.pendingMessages];
|
|
958
|
-
updated[index] = message;
|
|
959
|
-
return { pendingMessages: updated };
|
|
960
|
-
}),
|
|
961
|
-
clearPendingMessages: () => set({ pendingMessages: [] }),
|
|
962
|
-
completePendingMessage: (index, finalMessage) => set((state) => {
|
|
963
|
-
const pending = [...state.pendingMessages];
|
|
964
|
-
pending.splice(index, 1);
|
|
965
|
-
const session = state.session;
|
|
966
|
-
if (!session) return { pendingMessages: pending };
|
|
967
|
-
return {
|
|
968
|
-
pendingMessages: pending,
|
|
969
|
-
session: {
|
|
970
|
-
...session,
|
|
971
|
-
messages: [...session.messages, finalMessage],
|
|
972
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
973
|
-
}
|
|
974
|
-
};
|
|
975
|
-
}),
|
|
976
953
|
// UI state
|
|
977
954
|
isThinking: false,
|
|
978
955
|
setIsThinking: (thinking) => set({ isThinking: thinking }),
|
|
@@ -1272,26 +1249,6 @@ function ConfigEditor({ config, availableModels, onSave, onClose }) {
|
|
|
1272
1249
|
})), /* @__PURE__ */ React9.createElement(Box8, { borderStyle: "single", borderColor: "gray", paddingX: 1 }, /* @__PURE__ */ React9.createElement(Text8, { dimColor: true }, "\u2191/\u2193: Navigate | Space/\u2190/\u2192: Change | q/Esc: Save & Exit")));
|
|
1273
1250
|
}
|
|
1274
1251
|
|
|
1275
|
-
// src/components/MessageItem.tsx
|
|
1276
|
-
import React10 from "react";
|
|
1277
|
-
import { Box as Box9, Text as Text9 } from "ink";
|
|
1278
|
-
function MessageItem({ message }) {
|
|
1279
|
-
const isUser = message.role === "user";
|
|
1280
|
-
return /* @__PURE__ */ React10.createElement(Box9, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ React10.createElement(Box9, null, /* @__PURE__ */ React10.createElement(Text9, { bold: true, color: isUser ? "cyan" : "green" }, isUser ? "\u{1F464} You" : "\u{1F916} Assistant"), isUser && /* @__PURE__ */ React10.createElement(Text9, { dimColor: true }, " \u2022 ", new Date(message.timestamp).toLocaleTimeString())), isUser && message.content && /* @__PURE__ */ React10.createElement(Box9, { paddingLeft: 2 }, /* @__PURE__ */ React10.createElement(Text9, { backgroundColor: "whiteBright", color: "black" }, " ", message.content, " ")), !isUser && message.metadata?.steps && message.metadata.steps.length > 0 && /* @__PURE__ */ React10.createElement(Box9, { paddingLeft: 2, marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React10.createElement(Text9, { dimColor: true, bold: true }, "\u{1F527} Agent Reasoning Trace (", message.metadata.steps.filter((s) => s.type === "action").length, " ", "tools used, ", message.metadata.steps.length, " total steps)", message.metadata.tokenUsage && ` \u2022 ${message.metadata.tokenUsage.total} tokens`), /* @__PURE__ */ React10.createElement(Text9, { dimColor: true }, "Step types: ", message.metadata.steps.map((s) => s.type).join(", ")), message.metadata.steps.map((step, idx) => {
|
|
1281
|
-
if (step.type === "thought") {
|
|
1282
|
-
return /* @__PURE__ */ React10.createElement(Box9, { key: idx, paddingLeft: 2, marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React10.createElement(Text9, { color: "blue" }, "\u{1F4AD} Thought:"), /* @__PURE__ */ React10.createElement(Text9, { dimColor: true }, ` ${step.content.slice(0, 200)}${step.content.length > 200 ? "..." : ""}`));
|
|
1283
|
-
}
|
|
1284
|
-
if (step.type === "action") {
|
|
1285
|
-
const toolName = step.metadata?.toolName || "unknown";
|
|
1286
|
-
const toolInput = step.metadata?.toolInput;
|
|
1287
|
-
const observationStep = message.metadata.steps[idx + 1];
|
|
1288
|
-
const result = observationStep?.type === "observation" ? observationStep.content : null;
|
|
1289
|
-
return /* @__PURE__ */ React10.createElement(Box9, { key: idx, paddingLeft: 2, marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React10.createElement(Text9, { color: "yellow" }, "\u{1F527} Action: ", toolName), toolInput && /* @__PURE__ */ React10.createElement(Text9, { dimColor: true }, ` Input: ${typeof toolInput === "string" ? toolInput : JSON.stringify(toolInput).slice(0, 100)}`), result && /* @__PURE__ */ React10.createElement(Text9, { dimColor: true }, ` Result: ${typeof result === "string" ? result.slice(0, 200) : JSON.stringify(result).slice(0, 200)}${(typeof result === "string" ? result.length : JSON.stringify(result).length) > 200 ? "..." : ""}`));
|
|
1290
|
-
}
|
|
1291
|
-
return null;
|
|
1292
|
-
}).filter(Boolean)), !isUser && message.content !== "..." && /* @__PURE__ */ React10.createElement(Box9, { paddingLeft: 2, marginTop: message.metadata?.steps?.length ? 1 : 0 }, message.metadata?.permissionDenied ? /* @__PURE__ */ React10.createElement(Text9, { color: "yellow" }, "\u26A0\uFE0F ", message.content) : /* @__PURE__ */ React10.createElement(Text9, null, message.content)), message.metadata?.tokenUsage && (!message.metadata.steps || message.metadata.steps.length === 0) && /* @__PURE__ */ React10.createElement(Box9, { paddingLeft: 2 }, /* @__PURE__ */ React10.createElement(Text9, { dimColor: true }, `${message.metadata.tokenUsage.total} tokens`)));
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
1252
|
// src/utils/processFileReferences.ts
|
|
1296
1253
|
import * as fs2 from "fs";
|
|
1297
1254
|
import * as path2 from "path";
|
|
@@ -1421,7 +1378,6 @@ function App({
|
|
|
1421
1378
|
onPrefillConsumed
|
|
1422
1379
|
}) {
|
|
1423
1380
|
const messages = useCliStore((state) => state.session?.messages || []);
|
|
1424
|
-
const pendingMessages = useCliStore((state) => state.pendingMessages);
|
|
1425
1381
|
const sessionName = useCliStore((state) => state.session?.name || "New Session");
|
|
1426
1382
|
const currentModel = useCliStore((state) => state.session?.model || "claude-sonnet-4-5-20250929");
|
|
1427
1383
|
const totalTokens = useCliStore((state) => state.session?.metadata.totalTokens || 0);
|
|
@@ -1432,7 +1388,7 @@ function App({
|
|
|
1432
1388
|
const exitRequested = useCliStore((state) => state.exitRequested);
|
|
1433
1389
|
const setIsThinking = useCliStore((state) => state.setIsThinking);
|
|
1434
1390
|
const [isBashMode, setIsBashMode] = useState4(false);
|
|
1435
|
-
const handleSubmit =
|
|
1391
|
+
const handleSubmit = React10.useCallback(
|
|
1436
1392
|
async (input) => {
|
|
1437
1393
|
const trimmed = input.trim();
|
|
1438
1394
|
if (!trimmed) return;
|
|
@@ -1461,7 +1417,7 @@ ${errorBlock}`;
|
|
|
1461
1417
|
},
|
|
1462
1418
|
[onMessage, onCommand, setIsThinking]
|
|
1463
1419
|
);
|
|
1464
|
-
return /* @__PURE__ */
|
|
1420
|
+
return /* @__PURE__ */ React10.createElement(Box9, { flexDirection: "column" }, /* @__PURE__ */ React10.createElement(StatusBar, { sessionName, model: currentModel, tokenUsage: totalTokens }), showConfigEditor && config && onSaveConfig ? /* @__PURE__ */ React10.createElement(Box9, { flexDirection: "column", paddingX: 1 }, /* @__PURE__ */ React10.createElement(
|
|
1465
1421
|
ConfigEditor,
|
|
1466
1422
|
{
|
|
1467
1423
|
config,
|
|
@@ -1469,7 +1425,7 @@ ${errorBlock}`;
|
|
|
1469
1425
|
onSave: onSaveConfig,
|
|
1470
1426
|
onClose: () => setShowConfigEditor(false)
|
|
1471
1427
|
}
|
|
1472
|
-
)) : permissionPrompt ? /* @__PURE__ */
|
|
1428
|
+
)) : permissionPrompt ? /* @__PURE__ */ React10.createElement(Box9, { flexDirection: "column", paddingX: 1 }, /* @__PURE__ */ React10.createElement(
|
|
1473
1429
|
PermissionPrompt,
|
|
1474
1430
|
{
|
|
1475
1431
|
toolName: permissionPrompt.toolName,
|
|
@@ -1478,7 +1434,7 @@ ${errorBlock}`;
|
|
|
1478
1434
|
canBeTrusted: permissionPrompt.canBeTrusted,
|
|
1479
1435
|
onResponse: onPermissionResponse
|
|
1480
1436
|
}
|
|
1481
|
-
)) : /* @__PURE__ */
|
|
1437
|
+
)) : /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Box9, { flexDirection: "column" }, messages.map((message, index) => /* @__PURE__ */ React10.createElement(Box9, { key: `${message.timestamp}-${message.role}-${index}`, flexDirection: "column", paddingX: 1 }, /* @__PURE__ */ React10.createElement(MessageItem, { message })))), /* @__PURE__ */ React10.createElement(AgentThinking, null), exitRequested && /* @__PURE__ */ React10.createElement(Box9, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React10.createElement(Text9, { color: "yellow", bold: true }, "Press Ctrl+C again to exit")), /* @__PURE__ */ React10.createElement(Box9, { borderStyle: "single", borderColor: isBashMode ? "yellow" : "cyan", paddingX: 1 }, /* @__PURE__ */ React10.createElement(
|
|
1482
1438
|
InputPrompt,
|
|
1483
1439
|
{
|
|
1484
1440
|
onSubmit: handleSubmit,
|
|
@@ -1490,24 +1446,40 @@ ${errorBlock}`;
|
|
|
1490
1446
|
onPrefillConsumed,
|
|
1491
1447
|
onBashModeChange: setIsBashMode
|
|
1492
1448
|
}
|
|
1493
|
-
))
|
|
1449
|
+
))));
|
|
1450
|
+
}
|
|
1451
|
+
function MessageItem({ message }) {
|
|
1452
|
+
const isUser = message.role === "user";
|
|
1453
|
+
return /* @__PURE__ */ React10.createElement(Box9, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ React10.createElement(Box9, null, /* @__PURE__ */ React10.createElement(Text9, { bold: true, color: isUser ? "cyan" : "green" }, isUser ? "\u{1F464} You" : "\u{1F916} Assistant"), /* @__PURE__ */ React10.createElement(Text9, { dimColor: true }, " \u2022 ", new Date(message.timestamp).toLocaleTimeString())), isUser && message.content && /* @__PURE__ */ React10.createElement(Box9, { paddingLeft: 2 }, /* @__PURE__ */ React10.createElement(Text9, { backgroundColor: "whiteBright", color: "black" }, " ", message.content, " ")), !isUser && message.metadata?.steps && message.metadata.steps.length > 0 && /* @__PURE__ */ React10.createElement(Box9, { paddingLeft: 2, marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React10.createElement(Text9, { dimColor: true, bold: true }, "\u{1F527} Agent Reasoning Trace (", message.metadata.steps.filter((s) => s.type === "action").length, " ", "tools used, ", message.metadata.steps.length, " total steps)", message.metadata.tokenUsage && ` \u2022 ${message.metadata.tokenUsage.total} tokens`), /* @__PURE__ */ React10.createElement(Text9, { dimColor: true }, "Step types: ", message.metadata.steps.map((s) => s.type).join(", ")), message.metadata.steps.map((step, idx) => {
|
|
1454
|
+
if (step.type === "thought") {
|
|
1455
|
+
return /* @__PURE__ */ React10.createElement(Box9, { key: idx, paddingLeft: 2, marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React10.createElement(Text9, { color: "blue" }, "\u{1F4AD} Thought:"), /* @__PURE__ */ React10.createElement(Text9, { dimColor: true }, ` ${step.content.slice(0, 200)}${step.content.length > 200 ? "..." : ""}`));
|
|
1456
|
+
}
|
|
1457
|
+
if (step.type === "action") {
|
|
1458
|
+
const toolName = step.metadata?.toolName || "unknown";
|
|
1459
|
+
const toolInput = step.metadata?.toolInput;
|
|
1460
|
+
const observationStep = message.metadata.steps[idx + 1];
|
|
1461
|
+
const result = observationStep?.type === "observation" ? observationStep.content : null;
|
|
1462
|
+
return /* @__PURE__ */ React10.createElement(Box9, { key: idx, paddingLeft: 2, marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React10.createElement(Text9, { color: "yellow" }, "\u{1F527} Action: ", toolName), toolInput && /* @__PURE__ */ React10.createElement(Text9, { dimColor: true }, ` Input: ${typeof toolInput === "string" ? toolInput : JSON.stringify(toolInput).slice(0, 100)}`), result && /* @__PURE__ */ React10.createElement(Text9, { dimColor: true }, ` Result: ${typeof result === "string" ? result.slice(0, 200) : JSON.stringify(result).slice(0, 200)}${(typeof result === "string" ? result.length : JSON.stringify(result).length) > 200 ? "..." : ""}`));
|
|
1463
|
+
}
|
|
1464
|
+
return null;
|
|
1465
|
+
}).filter(Boolean)), !isUser && message.content !== "..." && /* @__PURE__ */ React10.createElement(Box9, { paddingLeft: 2, marginTop: message.metadata?.steps?.length ? 1 : 0 }, message.metadata?.permissionDenied ? /* @__PURE__ */ React10.createElement(Text9, { color: "yellow" }, "\u26A0\uFE0F ", message.content) : /* @__PURE__ */ React10.createElement(Text9, null, message.content)), message.metadata?.tokenUsage && (!message.metadata.steps || message.metadata.steps.length === 0) && /* @__PURE__ */ React10.createElement(Box9, { paddingLeft: 2 }, /* @__PURE__ */ React10.createElement(Text9, { dimColor: true }, `${message.metadata.tokenUsage.total} tokens`)));
|
|
1494
1466
|
}
|
|
1495
1467
|
|
|
1496
1468
|
// src/components/MessageList.tsx
|
|
1497
|
-
import
|
|
1498
|
-
import { Box as
|
|
1469
|
+
import React11 from "react";
|
|
1470
|
+
import { Box as Box10, Text as Text10 } from "ink";
|
|
1499
1471
|
function stripThinkingTags(content) {
|
|
1500
1472
|
return content.replace(/<think>[\s\S]*?<\/think>/g, "").trim();
|
|
1501
1473
|
}
|
|
1502
|
-
var MessageList =
|
|
1474
|
+
var MessageList = React11.memo(
|
|
1503
1475
|
function MessageList2({ messages }) {
|
|
1504
1476
|
if (messages.length === 0) {
|
|
1505
|
-
return /* @__PURE__ */
|
|
1477
|
+
return /* @__PURE__ */ React11.createElement(Box10, { paddingY: 1 }, /* @__PURE__ */ React11.createElement(Text10, { dimColor: true }, "No messages yet. Type a message to start!"));
|
|
1506
1478
|
}
|
|
1507
|
-
return /* @__PURE__ */
|
|
1479
|
+
return /* @__PURE__ */ React11.createElement(Box10, { flexDirection: "column", gap: 1, paddingY: 1 }, messages.map((message, index) => /* @__PURE__ */ React11.createElement(Box10, { key: index, flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ React11.createElement(Box10, null, /* @__PURE__ */ React11.createElement(Text10, { bold: true, color: message.role === "user" ? "cyan" : "green" }, message.role === "user" ? "\u{1F464} You" : "\u{1F916} Assistant"), /* @__PURE__ */ React11.createElement(Text10, { dimColor: true }, " \u2022 ", new Date(message.timestamp).toLocaleTimeString())), /* @__PURE__ */ React11.createElement(Box10, { paddingLeft: 2 }, message.metadata?.permissionDenied ? /* @__PURE__ */ React11.createElement(Text10, { color: "yellow" }, "\u26A0\uFE0F ", stripThinkingTags(message.content)) : /* @__PURE__ */ React11.createElement(Text10, null, stripThinkingTags(message.content))), message.metadata?.steps && message.metadata.steps.length > 0 && /* @__PURE__ */ React11.createElement(Box10, { paddingLeft: 2, marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React11.createElement(Text10, { dimColor: true, bold: true }, "\u{1F527} Agent Reasoning Trace (", message.metadata.steps.filter((s) => s.type === "action").length, " tools used,", " ", message.metadata.steps.length, " total steps)", message.metadata.tokenUsage && ` \u2022 ${message.metadata.tokenUsage.total} tokens`), /* @__PURE__ */ React11.createElement(Text10, { dimColor: true }, "Step types: ", message.metadata.steps.map((s) => s.type).join(", ")), message.metadata.steps.map((step, idx) => {
|
|
1508
1480
|
if (step.type === "thought") {
|
|
1509
|
-
return /* @__PURE__ */
|
|
1510
|
-
|
|
1481
|
+
return /* @__PURE__ */ React11.createElement(Box10, { key: idx, paddingLeft: 2, marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React11.createElement(Text10, { color: "blue" }, "\u{1F4AD} Thought:"), /* @__PURE__ */ React11.createElement(
|
|
1482
|
+
Text10,
|
|
1511
1483
|
{
|
|
1512
1484
|
dimColor: true
|
|
1513
1485
|
},
|
|
@@ -1519,10 +1491,10 @@ var MessageList = React12.memo(
|
|
|
1519
1491
|
const toolInput = step.metadata?.toolInput;
|
|
1520
1492
|
const observationStep = message.metadata.steps[idx + 1];
|
|
1521
1493
|
const result = observationStep?.type === "observation" ? observationStep.content : null;
|
|
1522
|
-
return /* @__PURE__ */
|
|
1494
|
+
return /* @__PURE__ */ React11.createElement(Box10, { key: idx, paddingLeft: 2, marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React11.createElement(Text10, { color: "yellow" }, "\u{1F527} Action: ", toolName), toolInput && /* @__PURE__ */ React11.createElement(Text10, { dimColor: true }, ` Input: ${typeof toolInput === "string" ? toolInput : JSON.stringify(toolInput).slice(0, 100)}`), result && /* @__PURE__ */ React11.createElement(Text10, { dimColor: true }, ` Result: ${typeof result === "string" ? result.slice(0, 200) : JSON.stringify(result).slice(0, 200)}${(typeof result === "string" ? result.length : JSON.stringify(result).length) > 200 ? "..." : ""}`));
|
|
1523
1495
|
}
|
|
1524
1496
|
return null;
|
|
1525
|
-
}).filter(Boolean)), message.metadata?.tokenUsage && (!message.metadata.steps || message.metadata.steps.length === 0) && /* @__PURE__ */
|
|
1497
|
+
}).filter(Boolean)), message.metadata?.tokenUsage && (!message.metadata.steps || message.metadata.steps.length === 0) && /* @__PURE__ */ React11.createElement(Box10, { paddingLeft: 2 }, /* @__PURE__ */ React11.createElement(Text10, { dimColor: true }, `${message.metadata.tokenUsage.total} tokens`)))));
|
|
1526
1498
|
},
|
|
1527
1499
|
(prevProps, nextProps) => {
|
|
1528
1500
|
if (prevProps.messages.length !== nextProps.messages.length) {
|
|
@@ -1533,8 +1505,8 @@ var MessageList = React12.memo(
|
|
|
1533
1505
|
);
|
|
1534
1506
|
|
|
1535
1507
|
// src/components/TrustLocationSelector.tsx
|
|
1536
|
-
import
|
|
1537
|
-
import { Box as
|
|
1508
|
+
import React12 from "react";
|
|
1509
|
+
import { Box as Box11, Text as Text11 } from "ink";
|
|
1538
1510
|
import SelectInput2 from "ink-select-input";
|
|
1539
1511
|
function TrustLocationSelector({ inProject, onSelect, onCancel }) {
|
|
1540
1512
|
const items = [];
|
|
@@ -1555,19 +1527,19 @@ function TrustLocationSelector({ inProject, onSelect, onCancel }) {
|
|
|
1555
1527
|
const handleSelect = (item) => {
|
|
1556
1528
|
onSelect(item.value);
|
|
1557
1529
|
};
|
|
1558
|
-
return /* @__PURE__ */
|
|
1530
|
+
return /* @__PURE__ */ React12.createElement(Box11, { flexDirection: "column", marginY: 1 }, /* @__PURE__ */ React12.createElement(Box11, { marginBottom: 1 }, /* @__PURE__ */ React12.createElement(Text11, { bold: true }, "Where should this rule be saved?")), /* @__PURE__ */ React12.createElement(
|
|
1559
1531
|
SelectInput2,
|
|
1560
1532
|
{
|
|
1561
1533
|
items,
|
|
1562
1534
|
onSelect: handleSelect,
|
|
1563
|
-
itemComponent: ({ isSelected, label }) => /* @__PURE__ */
|
|
1535
|
+
itemComponent: ({ isSelected, label }) => /* @__PURE__ */ React12.createElement(Box11, null, /* @__PURE__ */ React12.createElement(Text11, { color: isSelected ? "cyan" : void 0 }, isSelected ? "\u276F " : " ", label))
|
|
1564
1536
|
}
|
|
1565
|
-
), /* @__PURE__ */
|
|
1537
|
+
), /* @__PURE__ */ React12.createElement(Box11, { marginTop: 1 }, /* @__PURE__ */ React12.createElement(Text11, { dimColor: true }, "Use \u2191\u2193 arrows to navigate, Enter to select, Ctrl+C to cancel")));
|
|
1566
1538
|
}
|
|
1567
1539
|
|
|
1568
1540
|
// src/components/RewindSelector.tsx
|
|
1569
|
-
import
|
|
1570
|
-
import { Box as
|
|
1541
|
+
import React13, { useState as useState5 } from "react";
|
|
1542
|
+
import { Box as Box12, Text as Text12, useInput as useInput4 } from "ink";
|
|
1571
1543
|
import SelectInput3 from "ink-select-input";
|
|
1572
1544
|
function RewindSelector({ messages, onSelect, onCancel }) {
|
|
1573
1545
|
const [step, setStep] = useState5("selection");
|
|
@@ -1609,14 +1581,14 @@ function RewindSelector({ messages, onSelect, onCancel }) {
|
|
|
1609
1581
|
return sum2 + (msg.metadata?.tokenUsage?.total || 0);
|
|
1610
1582
|
}, 0);
|
|
1611
1583
|
if (step === "selection") {
|
|
1612
|
-
return /* @__PURE__ */
|
|
1584
|
+
return /* @__PURE__ */ React13.createElement(Box12, { flexDirection: "column", marginY: 1 }, /* @__PURE__ */ React13.createElement(Box12, { marginBottom: 1 }, /* @__PURE__ */ React13.createElement(Text12, { bold: true }, "Select a point to rewind to:")), /* @__PURE__ */ React13.createElement(
|
|
1613
1585
|
SelectInput3,
|
|
1614
1586
|
{
|
|
1615
1587
|
items,
|
|
1616
1588
|
onSelect: handleSelectionSelect,
|
|
1617
|
-
itemComponent: ({ isSelected, label }) => /* @__PURE__ */
|
|
1589
|
+
itemComponent: ({ isSelected, label }) => /* @__PURE__ */ React13.createElement(Box12, null, /* @__PURE__ */ React13.createElement(Text12, { color: isSelected ? "cyan" : void 0 }, isSelected ? "\u276F " : " ", label))
|
|
1618
1590
|
}
|
|
1619
|
-
), /* @__PURE__ */
|
|
1591
|
+
), /* @__PURE__ */ React13.createElement(Box12, { marginTop: 1 }, /* @__PURE__ */ React13.createElement(Text12, { dimColor: true }, "Use \u2191\u2193 arrows to navigate, Enter to select, Esc to cancel")));
|
|
1620
1592
|
}
|
|
1621
1593
|
const confirmationItems = [
|
|
1622
1594
|
{ label: "Yes, rewind to this point", value: "confirm" },
|
|
@@ -1624,19 +1596,19 @@ function RewindSelector({ messages, onSelect, onCancel }) {
|
|
|
1624
1596
|
];
|
|
1625
1597
|
const selectedMessage = selectedMessageIndex !== null && selectedMessageIndex >= 0 && selectedMessageIndex < messages.length ? messages[selectedMessageIndex] : null;
|
|
1626
1598
|
const selectedPreview = selectedMessage ? selectedMessage.content.length > 50 ? selectedMessage.content.substring(0, 50) + "..." : selectedMessage.content : "";
|
|
1627
|
-
return /* @__PURE__ */
|
|
1599
|
+
return /* @__PURE__ */ React13.createElement(Box12, { flexDirection: "column", marginY: 1 }, /* @__PURE__ */ React13.createElement(Box12, { marginBottom: 1, flexDirection: "column" }, /* @__PURE__ */ React13.createElement(Text12, { bold: true }, "Confirm rewind operation:"), /* @__PURE__ */ React13.createElement(Text12, { dimColor: true }, "Message: ", selectedPreview), /* @__PURE__ */ React13.createElement(Text12, { color: "yellow" }, "This will remove ", messagesToRemove.length, " message(s) (", tokensToRemove.toLocaleString(), " tokens)"), /* @__PURE__ */ React13.createElement(Text12, { color: "cyan" }, "The selected message will be placed in your input for editing.")), /* @__PURE__ */ React13.createElement(
|
|
1628
1600
|
SelectInput3,
|
|
1629
1601
|
{
|
|
1630
1602
|
items: confirmationItems,
|
|
1631
1603
|
onSelect: handleConfirmationSelect,
|
|
1632
|
-
itemComponent: ({ isSelected, label }) => /* @__PURE__ */
|
|
1604
|
+
itemComponent: ({ isSelected, label }) => /* @__PURE__ */ React13.createElement(Box12, null, /* @__PURE__ */ React13.createElement(Text12, { color: isSelected ? "cyan" : void 0 }, isSelected ? "\u276F " : " ", label))
|
|
1633
1605
|
}
|
|
1634
|
-
), /* @__PURE__ */
|
|
1606
|
+
), /* @__PURE__ */ React13.createElement(Box12, { marginTop: 1 }, /* @__PURE__ */ React13.createElement(Text12, { dimColor: true }, "Use \u2191\u2193 arrows to navigate, Enter to select, Esc to go back")));
|
|
1635
1607
|
}
|
|
1636
1608
|
|
|
1637
1609
|
// src/components/SessionSelector.tsx
|
|
1638
|
-
import
|
|
1639
|
-
import { Box as
|
|
1610
|
+
import React14, { useState as useState6 } from "react";
|
|
1611
|
+
import { Box as Box13, Text as Text13, useInput as useInput5 } from "ink";
|
|
1640
1612
|
import SelectInput4 from "ink-select-input";
|
|
1641
1613
|
function SessionSelector({ sessions, currentSession, onSelect, onCancel }) {
|
|
1642
1614
|
const [step, setStep] = useState6("selection");
|
|
@@ -1674,32 +1646,32 @@ function SessionSelector({ sessions, currentSession, onSelect, onCancel }) {
|
|
|
1674
1646
|
}
|
|
1675
1647
|
};
|
|
1676
1648
|
if (step === "selection") {
|
|
1677
|
-
return /* @__PURE__ */
|
|
1649
|
+
return /* @__PURE__ */ React14.createElement(Box13, { flexDirection: "column", marginY: 1 }, /* @__PURE__ */ React14.createElement(Box13, { marginBottom: 1 }, /* @__PURE__ */ React14.createElement(Text13, { bold: true }, "Select a session to resume:")), /* @__PURE__ */ React14.createElement(
|
|
1678
1650
|
SelectInput4,
|
|
1679
1651
|
{
|
|
1680
1652
|
items,
|
|
1681
1653
|
onSelect: handleSelectionSelect,
|
|
1682
|
-
itemComponent: ({ isSelected, label }) => /* @__PURE__ */
|
|
1654
|
+
itemComponent: ({ isSelected, label }) => /* @__PURE__ */ React14.createElement(Box13, null, /* @__PURE__ */ React14.createElement(Text13, { color: isSelected ? "cyan" : void 0 }, isSelected ? "\u276F " : " ", label))
|
|
1683
1655
|
}
|
|
1684
|
-
), /* @__PURE__ */
|
|
1656
|
+
), /* @__PURE__ */ React14.createElement(Box13, { marginTop: 1 }, /* @__PURE__ */ React14.createElement(Text13, { dimColor: true }, "Use \u2191\u2193 arrows to navigate, Enter to select, Esc to cancel")));
|
|
1685
1657
|
}
|
|
1686
1658
|
const confirmationItems = [
|
|
1687
1659
|
{ label: "Yes, resume this session", value: "confirm" },
|
|
1688
1660
|
{ label: "No, go back to selection", value: "cancel" }
|
|
1689
1661
|
];
|
|
1690
|
-
return /* @__PURE__ */
|
|
1662
|
+
return /* @__PURE__ */ React14.createElement(Box13, { flexDirection: "column", marginY: 1 }, /* @__PURE__ */ React14.createElement(Box13, { marginBottom: 1, flexDirection: "column" }, /* @__PURE__ */ React14.createElement(Text13, { bold: true }, 'Resume session: "', selectedSession?.name, '"'), /* @__PURE__ */ React14.createElement(Text13, { dimColor: true }, selectedSession?.messages.length, " messages | ", selectedSession?.model, " |", " ", selectedSession?.metadata?.totalTokens?.toLocaleString() ?? 0, " tokens"), hasUnsavedWork && /* @__PURE__ */ React14.createElement(Text13, { color: "yellow" }, "Warning: Your current session has unsaved messages. Use /save first if needed.")), /* @__PURE__ */ React14.createElement(
|
|
1691
1663
|
SelectInput4,
|
|
1692
1664
|
{
|
|
1693
1665
|
items: confirmationItems,
|
|
1694
1666
|
onSelect: handleConfirmationSelect,
|
|
1695
|
-
itemComponent: ({ isSelected, label }) => /* @__PURE__ */
|
|
1667
|
+
itemComponent: ({ isSelected, label }) => /* @__PURE__ */ React14.createElement(Box13, null, /* @__PURE__ */ React14.createElement(Text13, { color: isSelected ? "cyan" : void 0 }, isSelected ? "\u276F " : " ", label))
|
|
1696
1668
|
}
|
|
1697
|
-
), /* @__PURE__ */
|
|
1669
|
+
), /* @__PURE__ */ React14.createElement(Box13, { marginTop: 1 }, /* @__PURE__ */ React14.createElement(Text13, { dimColor: true }, "Use \u2191\u2193 arrows to navigate, Enter to select, Esc to go back")));
|
|
1698
1670
|
}
|
|
1699
1671
|
|
|
1700
1672
|
// src/components/LoginFlow.tsx
|
|
1701
|
-
import
|
|
1702
|
-
import { Box as
|
|
1673
|
+
import React15, { useState as useState7, useEffect as useEffect2 } from "react";
|
|
1674
|
+
import { Box as Box14, Text as Text14 } from "ink";
|
|
1703
1675
|
import Spinner2 from "ink-spinner";
|
|
1704
1676
|
import jwt from "jsonwebtoken";
|
|
1705
1677
|
import open from "open";
|
|
@@ -1862,15 +1834,15 @@ function LoginFlow({ apiUrl = "http://localhost:3000", configStore, onSuccess, o
|
|
|
1862
1834
|
}
|
|
1863
1835
|
}, [deviceFlow, status]);
|
|
1864
1836
|
if (status === "initiating") {
|
|
1865
|
-
return /* @__PURE__ */
|
|
1837
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", padding: 1 }, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Text14, { color: "cyan" }, /* @__PURE__ */ React15.createElement(Spinner2, { type: "dots" }), " Initiating device authorization...")));
|
|
1866
1838
|
}
|
|
1867
1839
|
if (status === "error") {
|
|
1868
|
-
return /* @__PURE__ */
|
|
1840
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", padding: 1 }, /* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text14, { color: "red", bold: true }, "\u2716 Authentication Failed")), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Text14, { color: "red" }, error)));
|
|
1869
1841
|
}
|
|
1870
1842
|
if (status === "success") {
|
|
1871
|
-
return /* @__PURE__ */
|
|
1843
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", padding: 1 }, /* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text14, { color: "green", bold: true }, "\u2714 Successfully authenticated!")), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Text14, { dimColor: true }, "You can now use B4M CLI with your account.")));
|
|
1872
1844
|
}
|
|
1873
|
-
return /* @__PURE__ */
|
|
1845
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", padding: 1, borderStyle: "round", borderColor: "cyan" }, /* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text14, { color: "cyan", bold: true }, "\u{1F510} Device Authorization")), /* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text14, null, "Opening browser automatically... If it doesn't open, please visit:")), /* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1, paddingLeft: 2 }, /* @__PURE__ */ React15.createElement(Text14, { color: "blue", bold: true }, deviceFlow?.verification_uri)), /* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text14, null, "And enter this code when prompted:")), /* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1, paddingLeft: 2 }, /* @__PURE__ */ React15.createElement(Text14, { color: "yellow", bold: true }, deviceFlow?.user_code)), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text14, { color: "cyan" }, /* @__PURE__ */ React15.createElement(Spinner2, { type: "dots" }), " ", statusMessage)), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text14, { dimColor: true }, "Expires in ", deviceFlow ? Math.floor(deviceFlow.expires_in / 60) : 0, " minutes")));
|
|
1874
1846
|
}
|
|
1875
1847
|
|
|
1876
1848
|
// src/storage/SessionStore.ts
|
|
@@ -9721,7 +9693,6 @@ var Logger2 = class _Logger {
|
|
|
9721
9693
|
}
|
|
9722
9694
|
};
|
|
9723
9695
|
var logger = Logger2.getInstance();
|
|
9724
|
-
logger.setVerbose(process.env.B4M_VERBOSE === "1");
|
|
9725
9696
|
|
|
9726
9697
|
// src/llm/ServerToolExecutor.ts
|
|
9727
9698
|
var ServerToolExecutor = class {
|
|
@@ -11150,7 +11121,7 @@ import { isAxiosError as isAxiosError2 } from "axios";
|
|
|
11150
11121
|
// package.json
|
|
11151
11122
|
var package_default = {
|
|
11152
11123
|
name: "@bike4mind/cli",
|
|
11153
|
-
version: "0.2.10-fix-
|
|
11124
|
+
version: "0.2.10-ja-fix-confluence-table-data-5752.17265+62618d815",
|
|
11154
11125
|
type: "module",
|
|
11155
11126
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
11156
11127
|
license: "UNLICENSED",
|
|
@@ -11253,10 +11224,10 @@ var package_default = {
|
|
|
11253
11224
|
},
|
|
11254
11225
|
devDependencies: {
|
|
11255
11226
|
"@bike4mind/agents": "0.1.0",
|
|
11256
|
-
"@bike4mind/common": "2.39.1-fix-
|
|
11257
|
-
"@bike4mind/mcp": "1.20.4-fix-
|
|
11258
|
-
"@bike4mind/services": "2.34.2-fix-
|
|
11259
|
-
"@bike4mind/utils": "2.1.4-fix-
|
|
11227
|
+
"@bike4mind/common": "2.39.1-ja-fix-confluence-table-data-5752.17265+62618d815",
|
|
11228
|
+
"@bike4mind/mcp": "1.20.4-ja-fix-confluence-table-data-5752.17265+62618d815",
|
|
11229
|
+
"@bike4mind/services": "2.34.2-ja-fix-confluence-table-data-5752.17265+62618d815",
|
|
11230
|
+
"@bike4mind/utils": "2.1.4-ja-fix-confluence-table-data-5752.17265+62618d815",
|
|
11260
11231
|
"@types/better-sqlite3": "^7.6.13",
|
|
11261
11232
|
"@types/diff": "^5.0.9",
|
|
11262
11233
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -11269,7 +11240,7 @@ var package_default = {
|
|
|
11269
11240
|
typescript: "^5.9.3",
|
|
11270
11241
|
vitest: "^3.2.4"
|
|
11271
11242
|
},
|
|
11272
|
-
gitHead: "
|
|
11243
|
+
gitHead: "62618d81572e966248e26ca6450ed2aeedc0df74"
|
|
11273
11244
|
};
|
|
11274
11245
|
|
|
11275
11246
|
// src/config/constants.ts
|
|
@@ -11311,7 +11282,7 @@ function CliApp() {
|
|
|
11311
11282
|
const [isInitialized, setIsInitialized] = useState8(false);
|
|
11312
11283
|
const [initError, setInitError] = useState8(null);
|
|
11313
11284
|
const [commandHistory, setCommandHistory] = useState8([]);
|
|
11314
|
-
const imageStoreInitPromise =
|
|
11285
|
+
const imageStoreInitPromise = useRef(null);
|
|
11315
11286
|
const setStoreSession = useCliStore((state2) => state2.setSession);
|
|
11316
11287
|
const setPermissionPrompt = useCliStore((state2) => state2.setPermissionPrompt);
|
|
11317
11288
|
const setShowConfigEditor = useCliStore((state2) => state2.setShowConfigEditor);
|
|
@@ -11433,11 +11404,13 @@ function CliApp() {
|
|
|
11433
11404
|
if (models.length === 0) {
|
|
11434
11405
|
throw new Error("No models available from server.");
|
|
11435
11406
|
}
|
|
11436
|
-
|
|
11407
|
+
console.log(`\u{1F4CB} Available models: ${models.map((m) => m.id).join(", ")}`);
|
|
11437
11408
|
const modelInfo = models.find((m) => m.id === config.defaultModel) || models[0];
|
|
11438
11409
|
if (modelInfo.id !== config.defaultModel) {
|
|
11439
|
-
|
|
11440
|
-
|
|
11410
|
+
console.log(`\u26A0\uFE0F Requested model '${config.defaultModel}' not available`);
|
|
11411
|
+
console.log(`\u{1F916} Using fallback model: ${modelInfo.id}`);
|
|
11412
|
+
} else {
|
|
11413
|
+
console.log(`\u{1F916} Using model: ${modelInfo.id}`);
|
|
11441
11414
|
}
|
|
11442
11415
|
llm.currentModel = modelInfo.id;
|
|
11443
11416
|
const newSession = {
|
|
@@ -11456,6 +11429,9 @@ function CliApp() {
|
|
|
11456
11429
|
};
|
|
11457
11430
|
await logger.initialize(newSession.id);
|
|
11458
11431
|
logger.setVerbose(process.env.B4M_VERBOSE === "1");
|
|
11432
|
+
logger.info(`API: ${apiBaseURL}`);
|
|
11433
|
+
logger.info(`Environment: ${envName}`);
|
|
11434
|
+
logger.info(`Model: ${modelInfo.id}`);
|
|
11459
11435
|
logger.debug("=== Session Configuration Complete ===");
|
|
11460
11436
|
logger.cleanupOldLogs().catch(() => {
|
|
11461
11437
|
});
|
|
@@ -11504,7 +11480,7 @@ function CliApp() {
|
|
|
11504
11480
|
state.configStore,
|
|
11505
11481
|
apiClient
|
|
11506
11482
|
);
|
|
11507
|
-
console.log(`\u{1F6E0}\uFE0F
|
|
11483
|
+
console.log(`\u{1F6E0}\uFE0F Loaded ${b4mTools.length} B4M tool(s)`);
|
|
11508
11484
|
const mcpManager = new McpManager(config);
|
|
11509
11485
|
await mcpManager.initialize();
|
|
11510
11486
|
const mcpTools = mcpManager.getTools();
|
|
@@ -11515,6 +11491,7 @@ function CliApp() {
|
|
|
11515
11491
|
});
|
|
11516
11492
|
}
|
|
11517
11493
|
const allTools = [...b4mTools, ...mcpTools];
|
|
11494
|
+
console.log(`\u2705 Total: ${allTools.length} tool(s) available`);
|
|
11518
11495
|
const projectDir = state.configStore.getProjectConfigDir();
|
|
11519
11496
|
const contextResult = await loadContextFiles(projectDir);
|
|
11520
11497
|
if (contextResult.globalContext) {
|
|
@@ -11590,7 +11567,6 @@ Remember: Use context from previous messages to understand follow-up questions.$
|
|
|
11590
11567
|
}));
|
|
11591
11568
|
setStoreSession(newSession);
|
|
11592
11569
|
setIsInitialized(true);
|
|
11593
|
-
console.log("\n");
|
|
11594
11570
|
} catch (error) {
|
|
11595
11571
|
console.error("Initialization error:", error);
|
|
11596
11572
|
setInitError(error instanceof Error ? error.message : "Unknown error");
|
|
@@ -11621,16 +11597,23 @@ Remember: Use context from previous messages to understand follow-up questions.$
|
|
|
11621
11597
|
const currentSteps = [];
|
|
11622
11598
|
const stepHandler = (step) => {
|
|
11623
11599
|
currentSteps.push(step);
|
|
11624
|
-
const
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
|
|
11628
|
-
|
|
11629
|
-
|
|
11630
|
-
...
|
|
11631
|
-
|
|
11632
|
-
|
|
11633
|
-
|
|
11600
|
+
const currentSession = useCliStore.getState().session;
|
|
11601
|
+
if (currentSession) {
|
|
11602
|
+
const messages = [...currentSession.messages];
|
|
11603
|
+
const lastMessage = messages[messages.length - 1];
|
|
11604
|
+
if (lastMessage && lastMessage.role === "assistant") {
|
|
11605
|
+
messages[messages.length - 1] = {
|
|
11606
|
+
...lastMessage,
|
|
11607
|
+
metadata: {
|
|
11608
|
+
...lastMessage.metadata,
|
|
11609
|
+
steps: [...currentSteps]
|
|
11610
|
+
}
|
|
11611
|
+
};
|
|
11612
|
+
setStoreSession({
|
|
11613
|
+
...currentSession,
|
|
11614
|
+
messages
|
|
11615
|
+
});
|
|
11616
|
+
}
|
|
11634
11617
|
}
|
|
11635
11618
|
};
|
|
11636
11619
|
state.agent.on("action", stepHandler);
|
|
@@ -11655,14 +11638,13 @@ Remember: Use context from previous messages to understand follow-up questions.$
|
|
|
11655
11638
|
steps: []
|
|
11656
11639
|
}
|
|
11657
11640
|
};
|
|
11658
|
-
const
|
|
11641
|
+
const sessionWithMessages = {
|
|
11659
11642
|
...state.session,
|
|
11660
|
-
messages: [...state.session.messages, userMessage],
|
|
11643
|
+
messages: [...state.session.messages, userMessage, pendingAssistantMessage],
|
|
11661
11644
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
11662
11645
|
};
|
|
11663
|
-
setState((prev) => ({ ...prev, session:
|
|
11664
|
-
setStoreSession(
|
|
11665
|
-
useCliStore.getState().addPendingMessage(pendingAssistantMessage);
|
|
11646
|
+
setState((prev) => ({ ...prev, session: sessionWithMessages }));
|
|
11647
|
+
setStoreSession(sessionWithMessages);
|
|
11666
11648
|
const recentMessages = state.session.messages.slice(-20);
|
|
11667
11649
|
const previousMessages = recentMessages.filter((msg) => msg.role === "user" || msg.role === "assistant").map((msg) => ({
|
|
11668
11650
|
role: msg.role,
|
|
@@ -11676,6 +11658,9 @@ Remember: Use context from previous messages to understand follow-up questions.$
|
|
|
11676
11658
|
console.log("\n\u26A0\uFE0F Action denied by user\n");
|
|
11677
11659
|
}
|
|
11678
11660
|
const successfulToolCalls = result.steps.filter((s) => s.type === "observation").length;
|
|
11661
|
+
const currentSession = useCliStore.getState().session;
|
|
11662
|
+
if (!currentSession) return;
|
|
11663
|
+
const finalMessages = [...currentSession.messages];
|
|
11679
11664
|
const finalAssistantMessage = {
|
|
11680
11665
|
role: "assistant",
|
|
11681
11666
|
content: result.finalAnswer,
|
|
@@ -11691,22 +11676,21 @@ Remember: Use context from previous messages to understand follow-up questions.$
|
|
|
11691
11676
|
permissionDenied
|
|
11692
11677
|
}
|
|
11693
11678
|
};
|
|
11694
|
-
|
|
11695
|
-
const currentSession = useCliStore.getState().session;
|
|
11696
|
-
if (!currentSession) return;
|
|
11679
|
+
finalMessages[finalMessages.length - 1] = finalAssistantMessage;
|
|
11697
11680
|
const updatedSession = {
|
|
11698
11681
|
...currentSession,
|
|
11682
|
+
messages: finalMessages,
|
|
11683
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
11699
11684
|
metadata: {
|
|
11700
|
-
...
|
|
11701
|
-
totalTokens:
|
|
11702
|
-
toolCallCount:
|
|
11685
|
+
...state.session.metadata,
|
|
11686
|
+
totalTokens: state.session.metadata.totalTokens + result.completionInfo.totalTokens,
|
|
11687
|
+
toolCallCount: state.session.metadata.toolCallCount + successfulToolCalls
|
|
11703
11688
|
}
|
|
11704
11689
|
};
|
|
11705
11690
|
setState((prev) => ({ ...prev, session: updatedSession }));
|
|
11706
11691
|
setStoreSession(updatedSession);
|
|
11707
11692
|
await state.sessionStore.save(updatedSession);
|
|
11708
11693
|
} catch (error) {
|
|
11709
|
-
useCliStore.getState().clearPendingMessages();
|
|
11710
11694
|
if (error instanceof Error) {
|
|
11711
11695
|
if (error.message.includes("Authentication failed") || error.message.includes("Authentication expired")) {
|
|
11712
11696
|
console.log("\n\u274C Authentication failed");
|
|
@@ -11883,7 +11867,6 @@ Project Configuration:
|
|
|
11883
11867
|
setState((prev) => ({ ...prev, session: loadedSession }));
|
|
11884
11868
|
setStoreSession(loadedSession);
|
|
11885
11869
|
useCliStore.getState().clearAgentSteps();
|
|
11886
|
-
useCliStore.getState().clearPendingMessages();
|
|
11887
11870
|
usageCache = null;
|
|
11888
11871
|
console.log(`
|
|
11889
11872
|
\u2705 Session resumed: "${loadedSession.name}"`);
|
|
@@ -12119,7 +12102,6 @@ Project Configuration:
|
|
|
12119
12102
|
setState((prev) => ({ ...prev, session: newSession }));
|
|
12120
12103
|
setStoreSession(newSession);
|
|
12121
12104
|
useCliStore.getState().clearAgentSteps();
|
|
12122
|
-
useCliStore.getState().clearPendingMessages();
|
|
12123
12105
|
usageCache = null;
|
|
12124
12106
|
console.log("New session started.");
|
|
12125
12107
|
console.log(`
|
|
@@ -12172,7 +12154,6 @@ Project Configuration:
|
|
|
12172
12154
|
prefillInput: prefillContent
|
|
12173
12155
|
}));
|
|
12174
12156
|
setStoreSession(rewindedSession);
|
|
12175
|
-
useCliStore.getState().clearPendingMessages();
|
|
12176
12157
|
await state.sessionStore.save(rewindedSession);
|
|
12177
12158
|
console.log("\u2705 Conversation rewound successfully");
|
|
12178
12159
|
console.log(`\u{1F4CA} Current state: ${rewindedMessages.length} messages, ${newMetadata.totalTokens} tokens`);
|
|
@@ -12340,12 +12321,12 @@ No usage data available for the last ${USAGE_DAYS} days.`);
|
|
|
12340
12321
|
setState((prev) => ({ ...prev, config: updatedConfig }));
|
|
12341
12322
|
};
|
|
12342
12323
|
if (initError) {
|
|
12343
|
-
return /* @__PURE__ */
|
|
12324
|
+
return /* @__PURE__ */ React16.createElement(Box15, { flexDirection: "column", padding: 1 }, /* @__PURE__ */ React16.createElement(Text15, { color: "red", bold: true }, "\u274C Initialization Error"), /* @__PURE__ */ React16.createElement(Text15, null, initError), /* @__PURE__ */ React16.createElement(Text15, { dimColor: true }, "\n", "Tip: Run /config to set up your API keys"));
|
|
12344
12325
|
}
|
|
12345
12326
|
if (state.trustLocationSelector) {
|
|
12346
12327
|
const projectDir = state.configStore.getProjectConfigDir();
|
|
12347
12328
|
const inProject = projectDir !== null;
|
|
12348
|
-
return /* @__PURE__ */
|
|
12329
|
+
return /* @__PURE__ */ React16.createElement(
|
|
12349
12330
|
TrustLocationSelector,
|
|
12350
12331
|
{
|
|
12351
12332
|
inProject,
|
|
@@ -12363,7 +12344,7 @@ No usage data available for the last ${USAGE_DAYS} days.`);
|
|
|
12363
12344
|
);
|
|
12364
12345
|
}
|
|
12365
12346
|
if (state.rewindSelector && state.session) {
|
|
12366
|
-
return /* @__PURE__ */
|
|
12347
|
+
return /* @__PURE__ */ React16.createElement(
|
|
12367
12348
|
RewindSelector,
|
|
12368
12349
|
{
|
|
12369
12350
|
messages: state.session.messages,
|
|
@@ -12381,7 +12362,7 @@ No usage data available for the last ${USAGE_DAYS} days.`);
|
|
|
12381
12362
|
);
|
|
12382
12363
|
}
|
|
12383
12364
|
if (state.sessionSelector) {
|
|
12384
|
-
return /* @__PURE__ */
|
|
12365
|
+
return /* @__PURE__ */ React16.createElement(
|
|
12385
12366
|
SessionSelector,
|
|
12386
12367
|
{
|
|
12387
12368
|
sessions: state.sessionSelector.sessions,
|
|
@@ -12401,7 +12382,7 @@ No usage data available for the last ${USAGE_DAYS} days.`);
|
|
|
12401
12382
|
}
|
|
12402
12383
|
if (state.showLoginFlow) {
|
|
12403
12384
|
const loginApiUrl = getApiUrl(state.config?.apiConfig);
|
|
12404
|
-
return /* @__PURE__ */
|
|
12385
|
+
return /* @__PURE__ */ React16.createElement(
|
|
12405
12386
|
LoginFlow,
|
|
12406
12387
|
{
|
|
12407
12388
|
apiUrl: loginApiUrl,
|
|
@@ -12424,9 +12405,9 @@ No usage data available for the last ${USAGE_DAYS} days.`);
|
|
|
12424
12405
|
);
|
|
12425
12406
|
}
|
|
12426
12407
|
if (!isInitialized) {
|
|
12427
|
-
return /* @__PURE__ */
|
|
12408
|
+
return /* @__PURE__ */ React16.createElement(Box15, { flexDirection: "column", padding: 1 }, /* @__PURE__ */ React16.createElement(Text15, null, "\u{1F680} Initializing..."));
|
|
12428
12409
|
}
|
|
12429
|
-
return /* @__PURE__ */
|
|
12410
|
+
return /* @__PURE__ */ React16.createElement(
|
|
12430
12411
|
App,
|
|
12431
12412
|
{
|
|
12432
12413
|
onMessage: handleMessage,
|
|
@@ -12460,12 +12441,12 @@ var BANNER = `
|
|
|
12460
12441
|
\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D
|
|
12461
12442
|
`;
|
|
12462
12443
|
console.log("\x1B[36m\x1B[1m%s\x1B[0m", BANNER);
|
|
12463
|
-
console.log(`\x1B[2m v${package_default.version} - AI-Powered CLI\x1B[0m
|
|
12464
|
-
|
|
12444
|
+
console.log(`\x1B[2m v${package_default.version} - AI-Powered CLI\x1B[0m
|
|
12445
|
+
`);
|
|
12465
12446
|
var isDevMode = import.meta.url.includes("/src/") || process.env.NODE_ENV === "development";
|
|
12466
12447
|
if (isDevMode) {
|
|
12467
|
-
|
|
12448
|
+
console.log("\u{1F527} Running in development mode (using TypeScript source)\n");
|
|
12468
12449
|
}
|
|
12469
|
-
render(/* @__PURE__ */
|
|
12450
|
+
render(/* @__PURE__ */ React16.createElement(CliApp, null), {
|
|
12470
12451
|
exitOnCtrlC: false
|
|
12471
12452
|
});
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
findMostSimilarMemento,
|
|
4
4
|
getRelevantMementos
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-BFYTGKUM.js";
|
|
6
|
+
import "./chunk-3I4UTS5N.js";
|
|
7
7
|
import "./chunk-AMDXHL6S.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-THQIBKD4.js";
|
|
9
9
|
import "./chunk-PDX44BCA.js";
|
|
10
10
|
export {
|
|
11
11
|
findMostSimilarMemento,
|
|
@@ -229,6 +229,7 @@ import {
|
|
|
229
229
|
canUserDeleteArtifact,
|
|
230
230
|
canUserReadArtifact,
|
|
231
231
|
canUserWriteArtifact,
|
|
232
|
+
containsWikiTable,
|
|
232
233
|
createArtifactId,
|
|
233
234
|
createDefaultPermissions,
|
|
234
235
|
dayjsConfig_default,
|
|
@@ -292,8 +293,9 @@ import {
|
|
|
292
293
|
validateQuest,
|
|
293
294
|
validateQuestMasterArtifactV2,
|
|
294
295
|
validateReactArtifactV2,
|
|
295
|
-
validateSvgArtifactV2
|
|
296
|
-
|
|
296
|
+
validateSvgArtifactV2,
|
|
297
|
+
wikiMarkupToAdf
|
|
298
|
+
} from "./chunk-THQIBKD4.js";
|
|
297
299
|
import "./chunk-PDX44BCA.js";
|
|
298
300
|
export {
|
|
299
301
|
ALL_IMAGE_MODELS,
|
|
@@ -525,6 +527,7 @@ export {
|
|
|
525
527
|
canUserDeleteArtifact,
|
|
526
528
|
canUserReadArtifact,
|
|
527
529
|
canUserWriteArtifact,
|
|
530
|
+
containsWikiTable,
|
|
528
531
|
createArtifactId,
|
|
529
532
|
createDefaultPermissions,
|
|
530
533
|
dayjsConfig_default as dayjs,
|
|
@@ -588,5 +591,6 @@ export {
|
|
|
588
591
|
validateQuest,
|
|
589
592
|
validateQuestMasterArtifactV2,
|
|
590
593
|
validateReactArtifactV2,
|
|
591
|
-
validateSvgArtifactV2
|
|
594
|
+
validateSvgArtifactV2,
|
|
595
|
+
wikiMarkupToAdf
|
|
592
596
|
};
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
validateMermaidSyntax,
|
|
121
121
|
warmUpSettingsCache,
|
|
122
122
|
withRetry
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-3I4UTS5N.js";
|
|
124
124
|
import {
|
|
125
125
|
Logger,
|
|
126
126
|
NotificationDeduplicator,
|
|
@@ -129,7 +129,7 @@ import {
|
|
|
129
129
|
postLowCreditsNotificationToSlack,
|
|
130
130
|
postMessageToSlack
|
|
131
131
|
} from "./chunk-AMDXHL6S.js";
|
|
132
|
-
import "./chunk-
|
|
132
|
+
import "./chunk-THQIBKD4.js";
|
|
133
133
|
import "./chunk-PDX44BCA.js";
|
|
134
134
|
export {
|
|
135
135
|
AWSBackend,
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
SubtractCreditsSchema,
|
|
4
4
|
subtractCredits
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-KPZSR7LA.js";
|
|
6
|
+
import "./chunk-3I4UTS5N.js";
|
|
7
7
|
import "./chunk-AMDXHL6S.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-THQIBKD4.js";
|
|
9
9
|
import "./chunk-PDX44BCA.js";
|
|
10
10
|
export {
|
|
11
11
|
SubtractCreditsSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/cli",
|
|
3
|
-
"version": "0.2.10-fix-
|
|
3
|
+
"version": "0.2.10-ja-fix-confluence-table-data-5752.17265+62618d815",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -103,10 +103,10 @@
|
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"@bike4mind/agents": "0.1.0",
|
|
106
|
-
"@bike4mind/common": "2.39.1-fix-
|
|
107
|
-
"@bike4mind/mcp": "1.20.4-fix-
|
|
108
|
-
"@bike4mind/services": "2.34.2-fix-
|
|
109
|
-
"@bike4mind/utils": "2.1.4-fix-
|
|
106
|
+
"@bike4mind/common": "2.39.1-ja-fix-confluence-table-data-5752.17265+62618d815",
|
|
107
|
+
"@bike4mind/mcp": "1.20.4-ja-fix-confluence-table-data-5752.17265+62618d815",
|
|
108
|
+
"@bike4mind/services": "2.34.2-ja-fix-confluence-table-data-5752.17265+62618d815",
|
|
109
|
+
"@bike4mind/utils": "2.1.4-ja-fix-confluence-table-data-5752.17265+62618d815",
|
|
110
110
|
"@types/better-sqlite3": "^7.6.13",
|
|
111
111
|
"@types/diff": "^5.0.9",
|
|
112
112
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
"typescript": "^5.9.3",
|
|
120
120
|
"vitest": "^3.2.4"
|
|
121
121
|
},
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "62618d81572e966248e26ca6450ed2aeedc0df74"
|
|
123
123
|
}
|