reasonix 0.45.1 → 0.46.0
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/README.md +0 -8
- package/dist/cli/.-3G6VX5S7.js +327 -0
- package/dist/cli/.-6YRPB2C7.js +329 -0
- package/dist/cli/.-6YRPB2C7.js.map +1 -0
- package/dist/cli/.-EYSVINK3.js +317 -0
- package/dist/cli/.-EYSVINK3.js.map +1 -0
- package/dist/cli/acp-LGBLHBKY.js +0 -0
- package/dist/cli/{chat-I7UTQO5L.js → chat-ECK5ZGMV.js} +4 -4
- package/dist/cli/chat-ECK5ZGMV.js.map +1 -0
- package/dist/cli/chunk-2425HK6U.js +0 -0
- package/dist/cli/chunk-25T6CVUP.js +0 -0
- package/dist/cli/chunk-2UQP6H6T.js +0 -0
- package/dist/cli/chunk-4CTDEJUF.js +0 -0
- package/dist/cli/chunk-4HCP2UQW.js +0 -0
- package/dist/cli/chunk-5ACMUK4Q.js +0 -0
- package/dist/cli/chunk-5I2C4JEO.js +0 -0
- package/dist/cli/chunk-5QCB62C4.js +0 -0
- package/dist/cli/chunk-6OWJV3YW.js +0 -0
- package/dist/cli/chunk-A3TSSDS2.js +0 -0
- package/dist/cli/chunk-AVFXO2EZ.js +0 -0
- package/dist/cli/chunk-C53JQES5.js +0 -0
- package/dist/cli/chunk-CBIQWMS6.js +0 -0
- package/dist/cli/chunk-CXVWUPA3.js +0 -0
- package/dist/cli/chunk-FEZK652I.js +0 -0
- package/dist/cli/chunk-GTZTQNX5.js +0 -0
- package/dist/cli/chunk-HKWSPKMU.js +0 -0
- package/dist/cli/chunk-HNXDZGC6.js +0 -0
- package/dist/cli/chunk-HVUZWNSP.js +0 -0
- package/dist/cli/{chunk-AB2RED3C.js → chunk-I4L2GTSE.js} +15 -15
- package/dist/cli/{chunk-AB2RED3C.js.map → chunk-I4L2GTSE.js.map} +1 -1
- package/dist/cli/chunk-IJ7JA32V.js +0 -0
- package/dist/cli/chunk-J5XJHLWM.js +0 -0
- package/dist/cli/chunk-JMBMLOBP.js +0 -0
- package/dist/cli/chunk-JNAQYELD.js +0 -0
- package/dist/cli/{chunk-OLLQ76U6.js → chunk-KQU2TYIL.js} +884 -2301
- package/dist/cli/chunk-KQU2TYIL.js.map +1 -0
- package/dist/cli/chunk-LIR2HBQH.js +0 -0
- package/dist/cli/chunk-MJ6W5UN3.js +0 -0
- package/dist/cli/chunk-NVURFF27.js +0 -0
- package/dist/cli/chunk-PLHAZOLZ.js +0 -0
- package/dist/cli/chunk-QJDDIK3Z.js +0 -0
- package/dist/cli/chunk-R3CTO2HM.js +0 -0
- package/dist/cli/chunk-RDRC3XDT.js +0 -0
- package/dist/cli/chunk-S4XVGLRW.js +0 -0
- package/dist/cli/chunk-SZ5XES2N.js +0 -0
- package/dist/cli/chunk-TEUDEGX2.js +0 -0
- package/dist/cli/chunk-TUK7OWJA.js +0 -0
- package/dist/cli/chunk-V26WPN3J.js +0 -0
- package/dist/cli/chunk-W7YGWUWU.js +0 -0
- package/dist/cli/chunk-WK3UFQY3.js +0 -0
- package/dist/cli/chunk-WL6SNQ5T.js +0 -0
- package/dist/cli/chunk-X53B3JIX.js +0 -0
- package/dist/cli/chunk-XJXDHAES.js +0 -0
- package/dist/cli/chunk-XSU4QVFW.js +0 -0
- package/dist/cli/chunk-XXC2BYTV.js +0 -0
- package/dist/cli/{chunk-IBJIK2DD.js → chunk-YY227BIQ.js} +2 -2
- package/dist/cli/chunk-YY227BIQ.js.map +1 -0
- package/dist/cli/chunk-ZZM6QJ4W.js +0 -0
- package/dist/cli/chunk-ZZYBBX5N.js +0 -0
- package/dist/cli/{code-D7V2TQX2.js → code-DFHSASJ4.js} +5 -7
- package/dist/cli/code-DFHSASJ4.js.map +1 -0
- package/dist/cli/commands-OCU42XG4.js +0 -0
- package/dist/cli/commit-XCQIQCYG.js +0 -0
- package/dist/cli/desktop-ZCUG7LMF.js +0 -0
- package/dist/cli/devtools-HW3WDT3Q.js +0 -0
- package/dist/cli/diff-66B2KWOJ.js +0 -0
- package/dist/cli/doctor-Y73CPPRZ.js +0 -0
- package/dist/cli/events-NGZ2OJYH.js +0 -0
- package/dist/cli/index.js +13 -20
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/mcp-MPVGBBJF.js +0 -0
- package/dist/cli/mcp-browse-4XOTC3FJ.js +0 -0
- package/dist/cli/mcp-inspect-CEMGKKAH.js +0 -0
- package/dist/cli/prompt-2D7ID24X.js +0 -0
- package/dist/cli/prune-sessions-OJEYYLHY.js +0 -0
- package/dist/cli/{replay-HIQYWBEK.js → replay-AKYQNAQJ.js} +2 -2
- package/dist/cli/run-5DPQFSP6.js +0 -0
- package/dist/cli/server-TQ2IHYQJ.js +0 -0
- package/dist/cli/sessions-KY54NG45.js +0 -0
- package/dist/cli/{setup-DDNOMMAB.js → setup-XPIOZWS7.js} +3 -3
- package/dist/cli/stats-X2VTWKNS.js +0 -0
- package/dist/cli/update-6ITLPRDV.js +0 -0
- package/dist/cli/version-7O6A5T7Q.js +0 -0
- package/package.json +5 -16
- package/dist/cli/chunk-IBJIK2DD.js.map +0 -1
- package/dist/cli/chunk-OLLQ76U6.js.map +0 -1
- package/dist/cli/code-D7V2TQX2.js.map +0 -1
- /package/dist/cli/{chat-I7UTQO5L.js.map → .-3G6VX5S7.js.map} +0 -0
- /package/dist/cli/{replay-HIQYWBEK.js.map → replay-AKYQNAQJ.js.map} +0 -0
- /package/dist/cli/{setup-DDNOMMAB.js.map → setup-XPIOZWS7.js.map} +0 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
AT_MENTION_PATTERN,
|
|
4
|
+
AT_PICKER_PREFIX,
|
|
5
|
+
AppendOnlyLog,
|
|
6
|
+
CacheFirstLoop,
|
|
7
|
+
ChoiceRequestedError,
|
|
8
|
+
DEFAULT_AT_MENTION_MAX_BYTES,
|
|
9
|
+
DEFAULT_MAX_RESULT_CHARS,
|
|
10
|
+
DEFAULT_MAX_RESULT_TOKENS,
|
|
11
|
+
DEFAULT_PICKER_IGNORE_DIRS,
|
|
12
|
+
DeepSeekClient,
|
|
13
|
+
HOOK_EVENTS,
|
|
14
|
+
HOOK_SETTINGS_DIRNAME,
|
|
15
|
+
HOOK_SETTINGS_FILENAME,
|
|
16
|
+
ImmutablePrefix,
|
|
17
|
+
LATEST_CACHE_TTL_MS,
|
|
18
|
+
LATEST_FETCH_TIMEOUT_MS,
|
|
19
|
+
MCP_PROTOCOL_VERSION,
|
|
20
|
+
McpClient,
|
|
21
|
+
NeedsConfirmationError,
|
|
22
|
+
PlanCheckpointError,
|
|
23
|
+
PlanProposedError,
|
|
24
|
+
PlanRevisionProposedError,
|
|
25
|
+
SessionStats,
|
|
26
|
+
SseTransport,
|
|
27
|
+
StdioTransport,
|
|
28
|
+
StormBreaker,
|
|
29
|
+
StreamableHttpTransport,
|
|
30
|
+
ToolCallRepair,
|
|
31
|
+
ToolRegistry,
|
|
32
|
+
Usage,
|
|
33
|
+
VERSION,
|
|
34
|
+
VolatileScratch,
|
|
35
|
+
aggregateBranchUsage,
|
|
36
|
+
aggregateUsage,
|
|
37
|
+
analyzeSchema,
|
|
38
|
+
appendSessionMessage,
|
|
39
|
+
appendUsage,
|
|
40
|
+
applyEditBlock,
|
|
41
|
+
applyEditBlocks,
|
|
42
|
+
bridgeMcpTools,
|
|
43
|
+
bucketCacheHitRatio,
|
|
44
|
+
bucketSavingsFraction,
|
|
45
|
+
claudeEquivalentCost,
|
|
46
|
+
compareVersions,
|
|
47
|
+
computeReplayStats,
|
|
48
|
+
costUsd,
|
|
49
|
+
decideOutcome,
|
|
50
|
+
defaultSelector,
|
|
51
|
+
defaultUsageLogPath,
|
|
52
|
+
deleteSession,
|
|
53
|
+
detectAtPicker,
|
|
54
|
+
detectShellOperator,
|
|
55
|
+
diffTranscripts,
|
|
56
|
+
emptyPlanState,
|
|
57
|
+
expandAtMentions,
|
|
58
|
+
fetchWithRetry,
|
|
59
|
+
fixToolCallPairing,
|
|
60
|
+
flattenMcpResult,
|
|
61
|
+
flattenSchema,
|
|
62
|
+
forkRegistryExcluding,
|
|
63
|
+
formatCommandResult,
|
|
64
|
+
formatHookOutcomeMessage,
|
|
65
|
+
formatLogSize,
|
|
66
|
+
formatLoopError,
|
|
67
|
+
formatSearchResults,
|
|
68
|
+
getLatestVersion,
|
|
69
|
+
globalSettingsPath,
|
|
70
|
+
harvest,
|
|
71
|
+
healLoadedMessages,
|
|
72
|
+
healLoadedMessagesByTokens,
|
|
73
|
+
htmlToText,
|
|
74
|
+
injectPowerShellUtf8,
|
|
75
|
+
inputCostUsd,
|
|
76
|
+
inspectMcpServer,
|
|
77
|
+
isAllowed,
|
|
78
|
+
isJsonRpcError,
|
|
79
|
+
isNpxInstall,
|
|
80
|
+
isPlanStateEmpty,
|
|
81
|
+
listFilesSync,
|
|
82
|
+
listFilesWithStatsAsync,
|
|
83
|
+
listFilesWithStatsSync,
|
|
84
|
+
listSessions,
|
|
85
|
+
loadDotenv,
|
|
86
|
+
loadHooks,
|
|
87
|
+
loadSessionMessages,
|
|
88
|
+
matchesTool,
|
|
89
|
+
nestArguments,
|
|
90
|
+
openTranscriptFile,
|
|
91
|
+
outputCostUsd,
|
|
92
|
+
parseEditBlocks,
|
|
93
|
+
parseMcpSpec,
|
|
94
|
+
parseMojeekResults,
|
|
95
|
+
parseTranscript,
|
|
96
|
+
prepareSpawn,
|
|
97
|
+
projectSettingsPath,
|
|
98
|
+
quoteForCmdExe,
|
|
99
|
+
rankPickerCandidates,
|
|
100
|
+
readTranscript,
|
|
101
|
+
readUsageLog,
|
|
102
|
+
recordFromLoopEvent,
|
|
103
|
+
registerChoiceTool,
|
|
104
|
+
registerFilesystemTools,
|
|
105
|
+
registerMemoryTools,
|
|
106
|
+
registerPlanTool,
|
|
107
|
+
registerShellTools,
|
|
108
|
+
registerSubagentTool,
|
|
109
|
+
registerWebTools,
|
|
110
|
+
renderMarkdown,
|
|
111
|
+
renderSummaryTable,
|
|
112
|
+
repairTruncatedJson,
|
|
113
|
+
replayFromFile,
|
|
114
|
+
resolveExecutable,
|
|
115
|
+
restoreSnapshots,
|
|
116
|
+
runBranches,
|
|
117
|
+
runCommand,
|
|
118
|
+
runHooks,
|
|
119
|
+
sanitizeName,
|
|
120
|
+
scavengeToolCalls,
|
|
121
|
+
sessionPath,
|
|
122
|
+
sessionsDir,
|
|
123
|
+
similarity,
|
|
124
|
+
snapshotBeforeEdits,
|
|
125
|
+
stripHallucinatedToolMarkup,
|
|
126
|
+
tokenizeCommand,
|
|
127
|
+
truncateForModel,
|
|
128
|
+
truncateForModelByTokens,
|
|
129
|
+
webFetch,
|
|
130
|
+
webSearch,
|
|
131
|
+
withUtf8Codepage,
|
|
132
|
+
writeMeta,
|
|
133
|
+
writeRecord
|
|
134
|
+
} from "./chunk-UNTSNL5C.js";
|
|
135
|
+
import {
|
|
136
|
+
defaultConfigPath,
|
|
137
|
+
isPlausibleKey,
|
|
138
|
+
loadApiKey,
|
|
139
|
+
readConfig,
|
|
140
|
+
redactKey,
|
|
141
|
+
saveApiKey,
|
|
142
|
+
writeConfig
|
|
143
|
+
} from "./chunk-2NBVKF4L.js";
|
|
144
|
+
import {
|
|
145
|
+
CODE_SYSTEM_PROMPT,
|
|
146
|
+
MEMORY_INDEX_FILE,
|
|
147
|
+
MEMORY_INDEX_MAX_CHARS,
|
|
148
|
+
MemoryStore,
|
|
149
|
+
PROJECT_MEMORY_FILE,
|
|
150
|
+
PROJECT_MEMORY_MAX_CHARS,
|
|
151
|
+
USER_MEMORY_DIR,
|
|
152
|
+
applyMemoryStack,
|
|
153
|
+
applyProjectMemory,
|
|
154
|
+
applyUserMemory,
|
|
155
|
+
codeSystemPrompt,
|
|
156
|
+
memoryEnabled,
|
|
157
|
+
projectHash,
|
|
158
|
+
readProjectMemory,
|
|
159
|
+
sanitizeMemoryName
|
|
160
|
+
} from "./chunk-PJGGEIK3.js";
|
|
161
|
+
import "./chunk-2H7UOFLK.js";
|
|
162
|
+
export {
|
|
163
|
+
AT_MENTION_PATTERN,
|
|
164
|
+
AT_PICKER_PREFIX,
|
|
165
|
+
AppendOnlyLog,
|
|
166
|
+
CODE_SYSTEM_PROMPT,
|
|
167
|
+
CacheFirstLoop,
|
|
168
|
+
ChoiceRequestedError,
|
|
169
|
+
DEFAULT_AT_MENTION_MAX_BYTES,
|
|
170
|
+
DEFAULT_MAX_RESULT_CHARS,
|
|
171
|
+
DEFAULT_MAX_RESULT_TOKENS,
|
|
172
|
+
DEFAULT_PICKER_IGNORE_DIRS,
|
|
173
|
+
DeepSeekClient,
|
|
174
|
+
HOOK_EVENTS,
|
|
175
|
+
HOOK_SETTINGS_DIRNAME,
|
|
176
|
+
HOOK_SETTINGS_FILENAME,
|
|
177
|
+
ImmutablePrefix,
|
|
178
|
+
LATEST_CACHE_TTL_MS,
|
|
179
|
+
LATEST_FETCH_TIMEOUT_MS,
|
|
180
|
+
MCP_PROTOCOL_VERSION,
|
|
181
|
+
MEMORY_INDEX_FILE,
|
|
182
|
+
MEMORY_INDEX_MAX_CHARS,
|
|
183
|
+
McpClient,
|
|
184
|
+
MemoryStore,
|
|
185
|
+
NeedsConfirmationError,
|
|
186
|
+
PROJECT_MEMORY_FILE,
|
|
187
|
+
PROJECT_MEMORY_MAX_CHARS,
|
|
188
|
+
PlanCheckpointError,
|
|
189
|
+
PlanProposedError,
|
|
190
|
+
PlanRevisionProposedError,
|
|
191
|
+
SessionStats,
|
|
192
|
+
SseTransport,
|
|
193
|
+
StdioTransport,
|
|
194
|
+
StormBreaker,
|
|
195
|
+
StreamableHttpTransport,
|
|
196
|
+
ToolCallRepair,
|
|
197
|
+
ToolRegistry,
|
|
198
|
+
USER_MEMORY_DIR,
|
|
199
|
+
Usage,
|
|
200
|
+
VERSION,
|
|
201
|
+
VolatileScratch,
|
|
202
|
+
aggregateBranchUsage,
|
|
203
|
+
aggregateUsage,
|
|
204
|
+
analyzeSchema,
|
|
205
|
+
appendSessionMessage,
|
|
206
|
+
appendUsage,
|
|
207
|
+
applyEditBlock,
|
|
208
|
+
applyEditBlocks,
|
|
209
|
+
applyMemoryStack,
|
|
210
|
+
applyProjectMemory,
|
|
211
|
+
applyUserMemory,
|
|
212
|
+
bridgeMcpTools,
|
|
213
|
+
bucketCacheHitRatio,
|
|
214
|
+
bucketSavingsFraction,
|
|
215
|
+
claudeEquivalentCost,
|
|
216
|
+
codeSystemPrompt,
|
|
217
|
+
compareVersions,
|
|
218
|
+
computeReplayStats,
|
|
219
|
+
costUsd,
|
|
220
|
+
decideOutcome,
|
|
221
|
+
defaultConfigPath,
|
|
222
|
+
defaultSelector,
|
|
223
|
+
defaultUsageLogPath,
|
|
224
|
+
deleteSession,
|
|
225
|
+
detectAtPicker,
|
|
226
|
+
detectShellOperator,
|
|
227
|
+
diffTranscripts,
|
|
228
|
+
emptyPlanState,
|
|
229
|
+
expandAtMentions,
|
|
230
|
+
fetchWithRetry,
|
|
231
|
+
fixToolCallPairing,
|
|
232
|
+
flattenMcpResult,
|
|
233
|
+
flattenSchema,
|
|
234
|
+
forkRegistryExcluding,
|
|
235
|
+
formatCommandResult,
|
|
236
|
+
formatHookOutcomeMessage,
|
|
237
|
+
formatLogSize,
|
|
238
|
+
formatLoopError,
|
|
239
|
+
formatSearchResults,
|
|
240
|
+
getLatestVersion,
|
|
241
|
+
globalSettingsPath,
|
|
242
|
+
harvest,
|
|
243
|
+
healLoadedMessages,
|
|
244
|
+
healLoadedMessagesByTokens,
|
|
245
|
+
htmlToText,
|
|
246
|
+
injectPowerShellUtf8,
|
|
247
|
+
inputCostUsd,
|
|
248
|
+
inspectMcpServer,
|
|
249
|
+
isAllowed,
|
|
250
|
+
isJsonRpcError,
|
|
251
|
+
isNpxInstall,
|
|
252
|
+
isPlanStateEmpty,
|
|
253
|
+
isPlausibleKey,
|
|
254
|
+
listFilesSync,
|
|
255
|
+
listFilesWithStatsAsync,
|
|
256
|
+
listFilesWithStatsSync,
|
|
257
|
+
listSessions,
|
|
258
|
+
loadApiKey,
|
|
259
|
+
loadDotenv,
|
|
260
|
+
loadHooks,
|
|
261
|
+
loadSessionMessages,
|
|
262
|
+
matchesTool,
|
|
263
|
+
memoryEnabled,
|
|
264
|
+
nestArguments,
|
|
265
|
+
openTranscriptFile,
|
|
266
|
+
outputCostUsd,
|
|
267
|
+
parseEditBlocks,
|
|
268
|
+
parseMcpSpec,
|
|
269
|
+
parseMojeekResults,
|
|
270
|
+
parseTranscript,
|
|
271
|
+
prepareSpawn,
|
|
272
|
+
projectHash,
|
|
273
|
+
projectSettingsPath,
|
|
274
|
+
quoteForCmdExe,
|
|
275
|
+
rankPickerCandidates,
|
|
276
|
+
readConfig,
|
|
277
|
+
readProjectMemory,
|
|
278
|
+
readTranscript,
|
|
279
|
+
readUsageLog,
|
|
280
|
+
recordFromLoopEvent,
|
|
281
|
+
redactKey,
|
|
282
|
+
registerChoiceTool,
|
|
283
|
+
registerFilesystemTools,
|
|
284
|
+
registerMemoryTools,
|
|
285
|
+
registerPlanTool,
|
|
286
|
+
registerShellTools,
|
|
287
|
+
registerSubagentTool,
|
|
288
|
+
registerWebTools,
|
|
289
|
+
renderMarkdown as renderDiffMarkdown,
|
|
290
|
+
renderSummaryTable as renderDiffSummary,
|
|
291
|
+
repairTruncatedJson,
|
|
292
|
+
replayFromFile,
|
|
293
|
+
resolveExecutable,
|
|
294
|
+
restoreSnapshots,
|
|
295
|
+
runBranches,
|
|
296
|
+
runCommand,
|
|
297
|
+
runHooks,
|
|
298
|
+
sanitizeMemoryName,
|
|
299
|
+
sanitizeName as sanitizeSessionName,
|
|
300
|
+
saveApiKey,
|
|
301
|
+
scavengeToolCalls,
|
|
302
|
+
sessionPath,
|
|
303
|
+
sessionsDir,
|
|
304
|
+
similarity,
|
|
305
|
+
snapshotBeforeEdits,
|
|
306
|
+
stripHallucinatedToolMarkup,
|
|
307
|
+
tokenizeCommand,
|
|
308
|
+
truncateForModel,
|
|
309
|
+
truncateForModelByTokens,
|
|
310
|
+
webFetch,
|
|
311
|
+
webSearch,
|
|
312
|
+
withUtf8Codepage,
|
|
313
|
+
writeConfig,
|
|
314
|
+
writeMeta,
|
|
315
|
+
writeRecord
|
|
316
|
+
};
|
|
317
|
+
//# sourceMappingURL=.-EYSVINK3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/cli/acp-LGBLHBKY.js
CHANGED
|
File without changes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire as __cr } from 'node:module'; if (typeof globalThis.require === 'undefined') { globalThis.require = __cr(import.meta.url); }
|
|
3
3
|
import {
|
|
4
4
|
chatCommand
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KQU2TYIL.js";
|
|
6
6
|
import "./chunk-CXVWUPA3.js";
|
|
7
7
|
import "./chunk-JMBMLOBP.js";
|
|
8
8
|
import "./chunk-GTZTQNX5.js";
|
|
@@ -16,8 +16,8 @@ import "./chunk-C53JQES5.js";
|
|
|
16
16
|
import "./chunk-XSU4QVFW.js";
|
|
17
17
|
import "./chunk-JNAQYELD.js";
|
|
18
18
|
import "./chunk-FEZK652I.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-YY227BIQ.js";
|
|
20
|
+
import "./chunk-I4L2GTSE.js";
|
|
21
21
|
import "./chunk-X53B3JIX.js";
|
|
22
22
|
import "./chunk-2425HK6U.js";
|
|
23
23
|
import "./chunk-HKWSPKMU.js";
|
|
@@ -48,4 +48,4 @@ import "./chunk-TUK7OWJA.js";
|
|
|
48
48
|
export {
|
|
49
49
|
chatCommand
|
|
50
50
|
};
|
|
51
|
-
//# sourceMappingURL=chat-
|
|
51
|
+
//# sourceMappingURL=chat-ECK5ZGMV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -119,17 +119,17 @@ function useColor() {
|
|
|
119
119
|
var GRADIENT = proxyThemeValue(() => gradientFromTheme(currentTheme()));
|
|
120
120
|
var COLOR = proxyThemeValue(() => colorFromTheme(currentTheme()));
|
|
121
121
|
var GLYPH = {
|
|
122
|
-
brand: "\
|
|
123
|
-
user: "\
|
|
124
|
-
assistant: "\
|
|
125
|
-
toolOk: "\
|
|
126
|
-
toolErr: "\
|
|
127
|
-
warn: "\
|
|
128
|
-
err: "\
|
|
129
|
-
arrow: "\
|
|
122
|
+
brand: "\u25CF",
|
|
123
|
+
user: "\u25CF",
|
|
124
|
+
assistant: "\u25CF",
|
|
125
|
+
toolOk: "\u2713",
|
|
126
|
+
toolErr: "\u2717",
|
|
127
|
+
warn: "\u26A0",
|
|
128
|
+
err: "\u2717",
|
|
129
|
+
arrow: "\u25B8",
|
|
130
130
|
bullet: "\xB7",
|
|
131
|
-
bar: "\
|
|
132
|
-
thinBar: "\
|
|
131
|
+
bar: "\u2502",
|
|
132
|
+
thinBar: "\u2502",
|
|
133
133
|
block: "\u2588",
|
|
134
134
|
shade1: "\u2591",
|
|
135
135
|
shade2: "\u2592",
|
|
@@ -139,11 +139,11 @@ var GLYPH = {
|
|
|
139
139
|
pending: "\u25CB",
|
|
140
140
|
fail: "\u2717",
|
|
141
141
|
running: "\u25CF",
|
|
142
|
-
branch: "\
|
|
143
|
-
branchEnd: "\
|
|
144
|
-
branchStub: "\
|
|
142
|
+
branch: "\u251C",
|
|
143
|
+
branchEnd: "\u2514",
|
|
144
|
+
branchStub: "\u2502",
|
|
145
145
|
rule: "\u2500",
|
|
146
|
-
spinFrames: ["\
|
|
146
|
+
spinFrames: ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827"]
|
|
147
147
|
};
|
|
148
148
|
var SURFACE2 = proxyThemeValue(() => surfaceFromTheme(currentTheme()));
|
|
149
149
|
var FG2 = proxyThemeValue(() => fgFromTheme(currentTheme()));
|
|
@@ -157,4 +157,4 @@ export {
|
|
|
157
157
|
COLOR,
|
|
158
158
|
GLYPH
|
|
159
159
|
};
|
|
160
|
-
//# sourceMappingURL=chunk-
|
|
160
|
+
//# sourceMappingURL=chunk-I4L2GTSE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/ui/theme/context.tsx","../../src/cli/ui/theme.ts"],"sourcesContent":["import React from \"react\";\nimport {\n DEFAULT_THEME_NAME,\n THEMES,\n type ThemeName,\n type ThemeTokens,\n resolveThemeName,\n setActiveTheme,\n} from \"./tokens.js\";\n\nconst ThemeContext = React.createContext<ThemeTokens>(THEMES[DEFAULT_THEME_NAME]);\n\nexport function ThemeProvider({\n children,\n name,\n}: {\n children: React.ReactNode;\n name?: string | null;\n}): React.ReactElement {\n const theme = THEMES[resolveThemeName(name)];\n const restoreActiveTheme = setActiveTheme(theme);\n\n React.useLayoutEffect(() => restoreActiveTheme, [restoreActiveTheme]);\n\n return <ThemeContext.Provider value={theme}>{children}</ThemeContext.Provider>;\n}\n\nexport function useThemeTokens(): ThemeTokens {\n return React.useContext(ThemeContext);\n}\n\nexport function useTheme(): ThemeTokens {\n return useThemeTokens();\n}\n\nexport type { ThemeName, ThemeTokens };\n","import React from \"react\";\nimport { useThemeTokens } from \"./theme/context.js\";\nimport {\n CARD,\n FG as TOKEN_FG,\n SURFACE as TOKEN_SURFACE,\n TONE,\n TONE_ACTIVE,\n type ThemeTokens,\n} from \"./theme/tokens.js\";\n\nexport type UiColor = ReturnType<typeof colorFromTheme>;\nexport type UiGradient = ReturnType<typeof gradientFromTheme>;\nexport type UiSurface = ReturnType<typeof surfaceFromTheme>;\nexport type UiFg = ReturnType<typeof fgFromTheme>;\n\nexport function gradientFromTheme(theme: ThemeTokens): ReadonlyArray<string> {\n return [\n theme.tone.ok,\n theme.tone.brand,\n theme.tone.info,\n theme.toneActive.brand,\n theme.toneActive.violet,\n theme.tone.accent,\n theme.toneActive.accent,\n theme.tone.err,\n ];\n}\n\nexport function colorFromTheme(theme: ThemeTokens) {\n return {\n primary: theme.tone.brand,\n accent: theme.tone.accent,\n brand: theme.tone.ok,\n\n user: theme.tone.brand,\n assistant: theme.tone.ok,\n tool: theme.tone.warn,\n toolErr: theme.tone.err,\n info: theme.fg.sub,\n warn: theme.tone.warn,\n err: theme.tone.err,\n ok: theme.tone.ok,\n } as const;\n}\n\nexport function surfaceFromTheme(theme: ThemeTokens) {\n return {\n canvas: theme.surface.bg,\n shell: theme.surface.bgInput,\n card: theme.surface.bgElev,\n elev: theme.surface.bgElev,\n sel: theme.surface.bgInput,\n line: theme.fg.faint,\n lineSoft: theme.fg.meta,\n } as const;\n}\n\nexport function fgFromTheme(theme: ThemeTokens) {\n return {\n strong: theme.fg.strong,\n default: theme.fg.body,\n dim: theme.fg.sub,\n faint: theme.fg.meta,\n ghost: theme.fg.faint,\n } as const;\n}\n\nfunction proxyThemeValue<T extends object>(build: () => T): T {\n const target = build();\n return new Proxy(target, {\n get(_target, prop: string | symbol) {\n return build()[prop as keyof T];\n },\n getOwnPropertyDescriptor(_target, prop: string | symbol) {\n return Reflect.getOwnPropertyDescriptor(build(), prop);\n },\n has(_target, prop: string | symbol) {\n return prop in build();\n },\n ownKeys() {\n return Reflect.ownKeys(build());\n },\n });\n}\n\nfunction currentTheme(): ThemeTokens {\n return {\n fg: TOKEN_FG,\n tone: TONE,\n toneActive: TONE_ACTIVE,\n surface: TOKEN_SURFACE,\n card: CARD,\n };\n}\n\nexport function useGradient(): UiGradient {\n const theme = useThemeTokens();\n return React.useMemo(() => gradientFromTheme(theme), [theme]);\n}\n\nexport function useColor(): UiColor {\n const theme = useThemeTokens();\n return React.useMemo(() => colorFromTheme(theme), [theme]);\n}\n\nexport function useUiSurface(): UiSurface {\n const theme = useThemeTokens();\n return React.useMemo(() => surfaceFromTheme(theme), [theme]);\n}\n\nexport function useUiFg(): UiFg {\n const theme = useThemeTokens();\n return React.useMemo(() => fgFromTheme(theme), [theme]);\n}\n\nexport const GRADIENT = proxyThemeValue(() => gradientFromTheme(currentTheme()));\nexport const COLOR = proxyThemeValue(() => colorFromTheme(currentTheme()));\n\nexport const GLYPH = {\n brand: \"
|
|
1
|
+
{"version":3,"sources":["../../src/cli/ui/theme/context.tsx","../../src/cli/ui/theme.ts"],"sourcesContent":["import React from \"react\";\nimport {\n DEFAULT_THEME_NAME,\n THEMES,\n type ThemeName,\n type ThemeTokens,\n resolveThemeName,\n setActiveTheme,\n} from \"./tokens.js\";\n\nconst ThemeContext = React.createContext<ThemeTokens>(THEMES[DEFAULT_THEME_NAME]);\n\nexport function ThemeProvider({\n children,\n name,\n}: {\n children: React.ReactNode;\n name?: string | null;\n}): React.ReactElement {\n const theme = THEMES[resolveThemeName(name)];\n const restoreActiveTheme = setActiveTheme(theme);\n\n React.useLayoutEffect(() => restoreActiveTheme, [restoreActiveTheme]);\n\n return <ThemeContext.Provider value={theme}>{children}</ThemeContext.Provider>;\n}\n\nexport function useThemeTokens(): ThemeTokens {\n return React.useContext(ThemeContext);\n}\n\nexport function useTheme(): ThemeTokens {\n return useThemeTokens();\n}\n\nexport type { ThemeName, ThemeTokens };\n","import React from \"react\";\nimport { useThemeTokens } from \"./theme/context.js\";\nimport {\n CARD,\n FG as TOKEN_FG,\n SURFACE as TOKEN_SURFACE,\n TONE,\n TONE_ACTIVE,\n type ThemeTokens,\n} from \"./theme/tokens.js\";\n\nexport type UiColor = ReturnType<typeof colorFromTheme>;\nexport type UiGradient = ReturnType<typeof gradientFromTheme>;\nexport type UiSurface = ReturnType<typeof surfaceFromTheme>;\nexport type UiFg = ReturnType<typeof fgFromTheme>;\n\nexport function gradientFromTheme(theme: ThemeTokens): ReadonlyArray<string> {\n return [\n theme.tone.ok,\n theme.tone.brand,\n theme.tone.info,\n theme.toneActive.brand,\n theme.toneActive.violet,\n theme.tone.accent,\n theme.toneActive.accent,\n theme.tone.err,\n ];\n}\n\nexport function colorFromTheme(theme: ThemeTokens) {\n return {\n primary: theme.tone.brand,\n accent: theme.tone.accent,\n brand: theme.tone.ok,\n\n user: theme.tone.brand,\n assistant: theme.tone.ok,\n tool: theme.tone.warn,\n toolErr: theme.tone.err,\n info: theme.fg.sub,\n warn: theme.tone.warn,\n err: theme.tone.err,\n ok: theme.tone.ok,\n } as const;\n}\n\nexport function surfaceFromTheme(theme: ThemeTokens) {\n return {\n canvas: theme.surface.bg,\n shell: theme.surface.bgInput,\n card: theme.surface.bgElev,\n elev: theme.surface.bgElev,\n sel: theme.surface.bgInput,\n line: theme.fg.faint,\n lineSoft: theme.fg.meta,\n } as const;\n}\n\nexport function fgFromTheme(theme: ThemeTokens) {\n return {\n strong: theme.fg.strong,\n default: theme.fg.body,\n dim: theme.fg.sub,\n faint: theme.fg.meta,\n ghost: theme.fg.faint,\n } as const;\n}\n\nfunction proxyThemeValue<T extends object>(build: () => T): T {\n const target = build();\n return new Proxy(target, {\n get(_target, prop: string | symbol) {\n return build()[prop as keyof T];\n },\n getOwnPropertyDescriptor(_target, prop: string | symbol) {\n return Reflect.getOwnPropertyDescriptor(build(), prop);\n },\n has(_target, prop: string | symbol) {\n return prop in build();\n },\n ownKeys() {\n return Reflect.ownKeys(build());\n },\n });\n}\n\nfunction currentTheme(): ThemeTokens {\n return {\n fg: TOKEN_FG,\n tone: TONE,\n toneActive: TONE_ACTIVE,\n surface: TOKEN_SURFACE,\n card: CARD,\n };\n}\n\nexport function useGradient(): UiGradient {\n const theme = useThemeTokens();\n return React.useMemo(() => gradientFromTheme(theme), [theme]);\n}\n\nexport function useColor(): UiColor {\n const theme = useThemeTokens();\n return React.useMemo(() => colorFromTheme(theme), [theme]);\n}\n\nexport function useUiSurface(): UiSurface {\n const theme = useThemeTokens();\n return React.useMemo(() => surfaceFromTheme(theme), [theme]);\n}\n\nexport function useUiFg(): UiFg {\n const theme = useThemeTokens();\n return React.useMemo(() => fgFromTheme(theme), [theme]);\n}\n\nexport const GRADIENT = proxyThemeValue(() => gradientFromTheme(currentTheme()));\nexport const COLOR = proxyThemeValue(() => colorFromTheme(currentTheme()));\n\nexport const GLYPH = {\n brand: \"●\",\n user: \"●\",\n assistant: \"●\",\n toolOk: \"✓\",\n toolErr: \"✗\",\n warn: \"⚠\",\n err: \"✗\",\n arrow: \"▸\",\n bullet: \"·\",\n bar: \"│\",\n thinBar: \"│\",\n block: \"█\",\n shade1: \"░\",\n shade2: \"▒\",\n shade3: \"▓\",\n\n done: \"✓\",\n cur: \"▸\",\n pending: \"○\",\n fail: \"✗\",\n running: \"●\",\n\n branch: \"├\",\n branchEnd: \"└\",\n branchStub: \"│\",\n rule: \"─\",\n\n spinFrames: [\"⠋\", \"⠙\", \"⠹\", \"⠸\", \"⠼\", \"⠴\", \"⠦\", \"⠧\"] as readonly string[],\n} as const;\n\nexport const SURFACE = proxyThemeValue(() => surfaceFromTheme(currentTheme()));\nexport const FG = proxyThemeValue(() => fgFromTheme(currentTheme()));\n\nexport function gradientCells(\n width: number,\n glyph: string = GLYPH.block,\n gradient: ReadonlyArray<string> = GRADIENT,\n): Array<{ ch: string; color: string }> {\n const cells: Array<{ ch: string; color: string }> = [];\n if (width <= 0) return cells;\n const last = gradient.length - 1;\n for (let i = 0; i < width; i++) {\n if (last <= 0) {\n cells.push({ ch: glyph, color: gradient[0] ?? COLOR.primary });\n continue;\n }\n const t = width === 1 ? 0 : (i * last) / (width - 1);\n const lo = Math.floor(t);\n const hi = Math.min(last, lo + 1);\n const color = t - lo < 0.5 ? gradient[lo]! : gradient[hi]!;\n cells.push({ ch: glyph, color });\n }\n return cells;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,mBAAkB;AAUlB,IAAM,eAAe,aAAAA,QAAM,cAA2B,OAAO,kBAAkB,CAAC;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AAQ;AAAA,EACR,KAAK;AAAA,EACL,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EAER,MAAM;AAAA,EACN,KAAK;AAAA,EACL,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EAET,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,MAAM;AAAA,EAEN,YAAY,CAAC,UAAK,UAAK,UAAK,UAAK,UAAK,UAAK,UAAK,QAAG;AACrD;AAEO,IAAMC,WAAU,gBAAgB,MAAM,iBAAiB,aAAa,CAAC,CAAC;AACtE,IAAMC,MAAK,gBAAgB,MAAM,YAAY,aAAa,CAAC,CAAC;","names":["React","import_react","React","SURFACE","FG"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|