@trydecember/cli 0.3.6 → 0.3.8
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/LICENSE +21 -202
- package/dist/december.js +121 -77
- package/package.json +6 -4
package/LICENSE
CHANGED
|
@@ -1,202 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
-
|
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
-
exercising permissions granted by this License.
|
|
26
|
-
|
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
-
including but not limited to software source code, documentation
|
|
29
|
-
source, and configuration files.
|
|
30
|
-
|
|
31
|
-
"Object" form shall mean any form resulting from mechanical
|
|
32
|
-
transformation or translation of a Source form, including but
|
|
33
|
-
not limited to compiled object code, generated documentation,
|
|
34
|
-
and conversions to other media types.
|
|
35
|
-
|
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
-
Object form, made available under the License, as indicated by a
|
|
38
|
-
copyright notice that is included in or attached to the work
|
|
39
|
-
(an example is provided in the Appendix below).
|
|
40
|
-
|
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
-
form, that is based on (or derived from) the Work and for which the
|
|
43
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
-
of this License, Derivative Works shall not include works that remain
|
|
46
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
-
the Work and Derivative Works thereof.
|
|
48
|
-
|
|
49
|
-
"Contribution" shall mean any work of authorship, including
|
|
50
|
-
the original version of the Work and any modifications or additions
|
|
51
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
-
means any form of electronic, verbal, or written communication sent
|
|
56
|
-
to the Licensor or its representatives, including but not limited to
|
|
57
|
-
communication on electronic mailing lists, source code control systems,
|
|
58
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
-
excluding communication that is conspicuously marked or otherwise
|
|
61
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
-
|
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
-
subsequently incorporated within the Work.
|
|
66
|
-
|
|
67
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
-
Work and such Derivative Works in Source or Object form.
|
|
73
|
-
|
|
74
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
-
(except as stated in this section) patent license to make, have made,
|
|
78
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
-
where such license applies only to those patent claims licensable
|
|
80
|
-
by such Contributor that are necessarily infringed by their
|
|
81
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
-
institute patent litigation against any entity (including a
|
|
84
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
-
or contributory patent infringement, then any patent licenses
|
|
87
|
-
granted to You under this License for that Work shall terminate
|
|
88
|
-
as of the date such litigation is filed.
|
|
89
|
-
|
|
90
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
-
modifications, and in Source or Object form, provided that You
|
|
93
|
-
meet the following conditions:
|
|
94
|
-
|
|
95
|
-
(a) You must give any other recipients of the Work or
|
|
96
|
-
Derivative Works a copy of this License; and
|
|
97
|
-
|
|
98
|
-
(b) You must cause any modified files to carry prominent notices
|
|
99
|
-
stating that You changed the files; and
|
|
100
|
-
|
|
101
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
-
that You distribute, all copyright, patent, trademark, and
|
|
103
|
-
attribution notices from the Source form of the Work,
|
|
104
|
-
excluding those notices that do not pertain to any part of
|
|
105
|
-
the Derivative Works; and
|
|
106
|
-
|
|
107
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
-
distribution, then any Derivative Works that You distribute must
|
|
109
|
-
include a readable copy of the attribution notices contained
|
|
110
|
-
within such NOTICE file, excluding those notices that do not
|
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
|
112
|
-
of the following places: within a NOTICE text file distributed
|
|
113
|
-
as part of the Derivative Works; within the Source form or
|
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
|
115
|
-
within a display generated by the Derivative Works, if and
|
|
116
|
-
wherever such third-party notices normally appear. The contents
|
|
117
|
-
of the NOTICE file are for informational purposes only and
|
|
118
|
-
do not modify the License. You may add Your own attribution
|
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
-
that such additional attribution notices cannot be construed
|
|
122
|
-
as modifying the License.
|
|
123
|
-
|
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
|
125
|
-
may provide additional or different license terms and conditions
|
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
-
the conditions stated in this License.
|
|
130
|
-
|
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
-
this License, without any additional terms or conditions.
|
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
-
the terms of any separate license agreement you may have executed
|
|
137
|
-
with Licensor regarding such Contributions.
|
|
138
|
-
|
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
-
except as required for reasonable and customary use in describing the
|
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
-
|
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
|
153
|
-
|
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
|
159
|
-
incidental, or consequential damages of any character arising as a
|
|
160
|
-
result of this License or out of the use or inability to use the
|
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
-
other commercial damages or losses), even if such Contributor
|
|
164
|
-
has been advised of the possibility of such damages.
|
|
165
|
-
|
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
-
or other liability obligations and/or rights consistent with this
|
|
170
|
-
License. However, in accepting such obligations, You may act only
|
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
-
of your accepting any such warranty or additional liability.
|
|
176
|
-
|
|
177
|
-
END OF TERMS AND CONDITIONS
|
|
178
|
-
|
|
179
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
-
|
|
181
|
-
To apply the Apache License to your work, attach the following
|
|
182
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
-
replaced with your own identifying information. (Don't include
|
|
184
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
-
comment syntax for the file format. We also recommend that a
|
|
186
|
-
file or class name and description of purpose be included on the
|
|
187
|
-
same "printed page" as the copyright notice for easier
|
|
188
|
-
identification within third-party archives.
|
|
189
|
-
|
|
190
|
-
Copyright [yyyy] [name of copyright owner]
|
|
191
|
-
|
|
192
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
-
you may not use this file except in compliance with the License.
|
|
194
|
-
You may obtain a copy of the License at
|
|
195
|
-
|
|
196
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
-
|
|
198
|
-
Unless required by applicable law or agreed to in writing, software
|
|
199
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
-
See the License for the specific language governing permissions and
|
|
202
|
-
limitations under the License.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Chaitanya Sonawane
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/december.js
CHANGED
|
@@ -62566,15 +62566,17 @@ function safeParseJson(text) {
|
|
|
62566
62566
|
if (cleanText.startsWith("{") && !cleanText.endsWith("}")) {
|
|
62567
62567
|
try {
|
|
62568
62568
|
return JSON.parse(cleanText + "}");
|
|
62569
|
-
} catch
|
|
62569
|
+
} catch {}
|
|
62570
62570
|
}
|
|
62571
62571
|
if (cleanText.endsWith(",}") || cleanText.endsWith(", }") || cleanText.match(/,\s*\}/)) {
|
|
62572
62572
|
try {
|
|
62573
62573
|
return JSON.parse(cleanText.replace(/,\s*\}/g, "}"));
|
|
62574
|
-
} catch
|
|
62574
|
+
} catch {}
|
|
62575
62575
|
}
|
|
62576
62576
|
throw new Error(`Failed to parse JSON tool arguments: ${err.message}
|
|
62577
|
-
Raw text: ${text}
|
|
62577
|
+
Raw text: ${text}`, {
|
|
62578
|
+
cause: err
|
|
62579
|
+
});
|
|
62578
62580
|
}
|
|
62579
62581
|
}
|
|
62580
62582
|
|
|
@@ -104162,26 +104164,26 @@ var init_open = () => {};
|
|
|
104162
104164
|
|
|
104163
104165
|
// src/auth/device.ts
|
|
104164
104166
|
async function loginViaDeviceCode(baseUrl = process.env.SERVER_URL || process.env.WEB_URL || "https://api.trydecember.com", onCodeGenerated) {
|
|
104165
|
-
|
|
104167
|
+
try {
|
|
104168
|
+
const genRes = await fetch(`${baseUrl}/api/v1/auth/device/code`, {
|
|
104169
|
+
method: "POST",
|
|
104170
|
+
headers: { "Content-Type": "application/json" }
|
|
104171
|
+
});
|
|
104172
|
+
let genData = {};
|
|
104166
104173
|
try {
|
|
104167
|
-
|
|
104168
|
-
|
|
104169
|
-
|
|
104170
|
-
});
|
|
104171
|
-
|
|
104172
|
-
|
|
104173
|
-
|
|
104174
|
-
|
|
104175
|
-
|
|
104176
|
-
|
|
104177
|
-
|
|
104178
|
-
|
|
104179
|
-
|
|
104180
|
-
setTimeout(() => {
|
|
104181
|
-
openUrl(verificationUri).catch(() => {});
|
|
104182
|
-
}, 5000);
|
|
104183
|
-
const startTime = Date.now();
|
|
104184
|
-
const pollInterval = interval * 1000 || 5000;
|
|
104174
|
+
genData = await genRes.json();
|
|
104175
|
+
} catch {}
|
|
104176
|
+
if (!genRes.ok || !genData.success) {
|
|
104177
|
+
throw new Error(genData.message || `Failed to generate device code (${genRes.status})`);
|
|
104178
|
+
}
|
|
104179
|
+
const { deviceCode, userCode, verificationUri, expiresIn, interval } = genData.data;
|
|
104180
|
+
onCodeGenerated(userCode, verificationUri);
|
|
104181
|
+
setTimeout(() => {
|
|
104182
|
+
openUrl(verificationUri).catch(() => {});
|
|
104183
|
+
}, 5000);
|
|
104184
|
+
const startTime = Date.now();
|
|
104185
|
+
const pollInterval = interval * 1000 || 5000;
|
|
104186
|
+
return await new Promise((resolve4, reject) => {
|
|
104185
104187
|
const poll = async () => {
|
|
104186
104188
|
if (Date.now() - startTime > expiresIn * 1000) {
|
|
104187
104189
|
reject(new Error("Device code expired"));
|
|
@@ -104211,15 +104213,17 @@ async function loginViaDeviceCode(baseUrl = process.env.SERVER_URL || process.en
|
|
|
104211
104213
|
}
|
|
104212
104214
|
};
|
|
104213
104215
|
setTimeout(poll, pollInterval);
|
|
104214
|
-
}
|
|
104215
|
-
|
|
104216
|
-
|
|
104217
|
-
|
|
104218
|
-
|
|
104219
|
-
|
|
104220
|
-
}
|
|
104216
|
+
});
|
|
104217
|
+
} catch (err) {
|
|
104218
|
+
const msg = err?.message || String(err);
|
|
104219
|
+
if (msg.includes("fetch failed") || msg.includes("ECONNREFUSED") || msg.includes("ENOTFOUND") || msg.includes("Failed to fetch") || msg.includes("connect")) {
|
|
104220
|
+
throw new Error("Unable to connect. Is the computer able to access the url?", {
|
|
104221
|
+
cause: err
|
|
104222
|
+
});
|
|
104223
|
+
} else {
|
|
104224
|
+
throw err;
|
|
104221
104225
|
}
|
|
104222
|
-
}
|
|
104226
|
+
}
|
|
104223
104227
|
}
|
|
104224
104228
|
var init_device = __esm(() => {
|
|
104225
104229
|
init_open();
|
|
@@ -205113,7 +205117,7 @@ function InputBar({
|
|
|
205113
205117
|
onUpdateSuccess
|
|
205114
205118
|
});
|
|
205115
205119
|
}
|
|
205116
|
-
}, [toast, dialog, agent2, resetChat, onUpdateSuccess, handleContentChange, onSubmit]);
|
|
205120
|
+
}, [toast, dialog, agent2, resetChat, onUpdateSuccess, handleContentChange, onSubmit, value2]);
|
|
205117
205121
|
const handleSubmit = import_react41.useCallback((text3) => {
|
|
205118
205122
|
if (disabled)
|
|
205119
205123
|
return;
|
|
@@ -205134,6 +205138,7 @@ function InputBar({
|
|
|
205134
205138
|
}, [
|
|
205135
205139
|
disabled,
|
|
205136
205140
|
showCommandMenu,
|
|
205141
|
+
showShortcutsMenu,
|
|
205137
205142
|
resolveCommand,
|
|
205138
205143
|
selectedIndex,
|
|
205139
205144
|
handleCommand,
|
|
@@ -249474,7 +249479,7 @@ function parseFlowchart(code) {
|
|
|
249474
249479
|
}
|
|
249475
249480
|
continue;
|
|
249476
249481
|
}
|
|
249477
|
-
const edgeRegex = /^([A-Za-z0-9_]+)(?:\[(.*?)\]|\((.*?)\)|\{(.*?)\})?\s*(
|
|
249482
|
+
const edgeRegex = /^([A-Za-z0-9_]+)(?:\[(.*?)\]|\((.*?)\)|\{(.*?)\})?\s*(-->|---|==>|-\.->)(?:\|(.*?)\|)?\s*([A-Za-z0-9_]+)(?:\[(.*?)\]|\((.*?)\)|\{(.*?)\})?/;
|
|
249478
249483
|
const match2 = line.match(edgeRegex);
|
|
249479
249484
|
if (match2) {
|
|
249480
249485
|
const fromId = match2[1];
|
|
@@ -249534,7 +249539,7 @@ function parseSequence(code) {
|
|
|
249534
249539
|
participantsSet.add(name);
|
|
249535
249540
|
continue;
|
|
249536
249541
|
}
|
|
249537
|
-
const msgMatch = line.match(/^([A-Za-z0-9_]+)\s*(
|
|
249542
|
+
const msgMatch = line.match(/^([A-Za-z0-9_]+)\s*(->>|-->>|->)\s*([A-Za-z0-9_]+)\s*:\s*(.*)$/);
|
|
249538
249543
|
if (msgMatch) {
|
|
249539
249544
|
const from = msgMatch[1];
|
|
249540
249545
|
const arrow = msgMatch[2];
|
|
@@ -249593,7 +249598,7 @@ function Mermaid({ code }) {
|
|
|
249593
249598
|
paddingX: 2,
|
|
249594
249599
|
paddingY: 1,
|
|
249595
249600
|
borderStyle: "round",
|
|
249596
|
-
borderColor: "#
|
|
249601
|
+
borderColor: "#555555",
|
|
249597
249602
|
children: [
|
|
249598
249603
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
249599
249604
|
justifyContent: "space-between",
|
|
@@ -249601,8 +249606,7 @@ function Mermaid({ code }) {
|
|
|
249601
249606
|
marginBottom: 1,
|
|
249602
249607
|
children: [
|
|
249603
249608
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
249604
|
-
color: "
|
|
249605
|
-
bold: true,
|
|
249609
|
+
color: "white",
|
|
249606
249610
|
children: [
|
|
249607
249611
|
"❖ Mermaid Diagram (",
|
|
249608
249612
|
isSequence ? "sequence" : isPie ? "pie" : isFlowchart ? "flowchart" : "diagram",
|
|
@@ -249660,10 +249664,9 @@ function RenderFlowchart({ code }) {
|
|
|
249660
249664
|
children: [
|
|
249661
249665
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
249662
249666
|
borderStyle: "round",
|
|
249663
|
-
borderColor: "
|
|
249667
|
+
borderColor: "gray",
|
|
249664
249668
|
paddingX: 1,
|
|
249665
249669
|
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
249666
|
-
bold: true,
|
|
249667
249670
|
color: "white",
|
|
249668
249671
|
children: node2.label
|
|
249669
249672
|
}, undefined, false, undefined, this)
|
|
@@ -249673,7 +249676,7 @@ function RenderFlowchart({ code }) {
|
|
|
249673
249676
|
alignItems: "center",
|
|
249674
249677
|
children: [
|
|
249675
249678
|
outgoingEdges[0].label && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
249676
|
-
color: "
|
|
249679
|
+
color: "gray",
|
|
249677
249680
|
italic: true,
|
|
249678
249681
|
children: [
|
|
249679
249682
|
"[",
|
|
@@ -249682,7 +249685,7 @@ function RenderFlowchart({ code }) {
|
|
|
249682
249685
|
]
|
|
249683
249686
|
}, undefined, true, undefined, this),
|
|
249684
249687
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
249685
|
-
color: "
|
|
249688
|
+
color: "gray",
|
|
249686
249689
|
children: outgoingEdges[0].style === "dashed" ? " ┈► " : outgoingEdges[0].style === "thick" ? " ══► " : " ──► "
|
|
249687
249690
|
}, undefined, false, undefined, this)
|
|
249688
249691
|
]
|
|
@@ -249701,10 +249704,9 @@ function RenderFlowchart({ code }) {
|
|
|
249701
249704
|
children: [
|
|
249702
249705
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
249703
249706
|
borderStyle: "round",
|
|
249704
|
-
borderColor: "
|
|
249707
|
+
borderColor: "gray",
|
|
249705
249708
|
paddingX: 1,
|
|
249706
249709
|
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
249707
|
-
bold: true,
|
|
249708
249710
|
color: "white",
|
|
249709
249711
|
children: node2.label
|
|
249710
249712
|
}, undefined, false, undefined, this)
|
|
@@ -249714,7 +249716,7 @@ function RenderFlowchart({ code }) {
|
|
|
249714
249716
|
paddingLeft: 3,
|
|
249715
249717
|
children: [
|
|
249716
249718
|
outgoingEdges[0].label && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
249717
|
-
color: "
|
|
249719
|
+
color: "gray",
|
|
249718
249720
|
italic: true,
|
|
249719
249721
|
children: [
|
|
249720
249722
|
"[",
|
|
@@ -249723,7 +249725,7 @@ function RenderFlowchart({ code }) {
|
|
|
249723
249725
|
]
|
|
249724
249726
|
}, undefined, true, undefined, this),
|
|
249725
249727
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
249726
|
-
color: "
|
|
249728
|
+
color: "gray",
|
|
249727
249729
|
children: outgoingEdges[0].style === "dashed" ? ` ┆
|
|
249728
249730
|
▼ ` : ` │
|
|
249729
249731
|
▼ `
|
|
@@ -249741,7 +249743,6 @@ function RenderFlowchart({ code }) {
|
|
|
249741
249743
|
children: [
|
|
249742
249744
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
249743
249745
|
color: "gray",
|
|
249744
|
-
bold: true,
|
|
249745
249746
|
children: "Connections:"
|
|
249746
249747
|
}, undefined, false, undefined, this),
|
|
249747
249748
|
edges.map((edge, idx) => {
|
|
@@ -249754,7 +249755,7 @@ function RenderFlowchart({ code }) {
|
|
|
249754
249755
|
fromNode,
|
|
249755
249756
|
" ",
|
|
249756
249757
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
249757
|
-
color: "
|
|
249758
|
+
color: "gray",
|
|
249758
249759
|
children: edge.style === "dashed" ? "┈►" : "──►"
|
|
249759
249760
|
}, undefined, false, undefined, this),
|
|
249760
249761
|
" ",
|
|
@@ -249785,10 +249786,9 @@ function RenderSequence({ code }) {
|
|
|
249785
249786
|
gap: 2,
|
|
249786
249787
|
children: participants.map((p) => /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
249787
249788
|
borderStyle: "single",
|
|
249788
|
-
borderColor: "
|
|
249789
|
+
borderColor: "gray",
|
|
249789
249790
|
paddingX: 1,
|
|
249790
249791
|
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
249791
|
-
bold: true,
|
|
249792
249792
|
color: "white",
|
|
249793
249793
|
children: p
|
|
249794
249794
|
}, undefined, false, undefined, this)
|
|
@@ -249802,19 +249802,17 @@ function RenderSequence({ code }) {
|
|
|
249802
249802
|
color: "#DDDDDD",
|
|
249803
249803
|
children: [
|
|
249804
249804
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
249805
|
-
color: "
|
|
249806
|
-
bold: true,
|
|
249805
|
+
color: "white",
|
|
249807
249806
|
children: msg.from
|
|
249808
249807
|
}, undefined, false, undefined, this),
|
|
249809
249808
|
" ",
|
|
249810
249809
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
249811
|
-
color:
|
|
249810
|
+
color: "gray",
|
|
249812
249811
|
children: msg.style === "dashed" ? "◄┄┄" : "──►"
|
|
249813
249812
|
}, undefined, false, undefined, this),
|
|
249814
249813
|
" ",
|
|
249815
249814
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
249816
|
-
color: "
|
|
249817
|
-
bold: true,
|
|
249815
|
+
color: "white",
|
|
249818
249816
|
children: msg.to
|
|
249819
249817
|
}, undefined, false, undefined, this),
|
|
249820
249818
|
": ",
|
|
@@ -249842,7 +249840,6 @@ function RenderPie({ code }) {
|
|
|
249842
249840
|
gap: 1,
|
|
249843
249841
|
children: [
|
|
249844
249842
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
249845
|
-
bold: true,
|
|
249846
249843
|
color: "white",
|
|
249847
249844
|
children: title
|
|
249848
249845
|
}, undefined, false, undefined, this),
|
|
@@ -249851,7 +249848,7 @@ function RenderPie({ code }) {
|
|
|
249851
249848
|
const filledWidth = Math.round(percentage / 100 * 20);
|
|
249852
249849
|
const emptyWidth = 20 - filledWidth;
|
|
249853
249850
|
const bar = "█".repeat(filledWidth) + "░".repeat(emptyWidth);
|
|
249854
|
-
const color = idx % 2 === 0 ? "
|
|
249851
|
+
const color = idx % 2 === 0 ? "white" : "gray";
|
|
249855
249852
|
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
249856
249853
|
flexDirection: "row",
|
|
249857
249854
|
gap: 2,
|
|
@@ -253259,7 +253256,7 @@ function TaskHUD({ cwd: cwd2, showTasks = true }) {
|
|
|
253259
253256
|
width: 40,
|
|
253260
253257
|
children: [
|
|
253261
253258
|
/* @__PURE__ */ jsx_dev_runtime35.jsxDEV(Text3, {
|
|
253262
|
-
color: "#
|
|
253259
|
+
color: "#89B4F8",
|
|
253263
253260
|
bold: true,
|
|
253264
253261
|
children: "Active Plan (task.md)"
|
|
253265
253262
|
}, undefined, false, undefined, this),
|
|
@@ -253438,7 +253435,8 @@ function ChatApp({
|
|
|
253438
253435
|
setStaticMessages,
|
|
253439
253436
|
setStaticKey,
|
|
253440
253437
|
setActiveMessages,
|
|
253441
|
-
setAuthMode
|
|
253438
|
+
setAuthMode,
|
|
253439
|
+
handleSubmit
|
|
253442
253440
|
} = session;
|
|
253443
253441
|
const authUI = authMode !== "none" ? authMode === "ask_question" && session.pendingQuestions ? /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(AskQuestionMenu, {
|
|
253444
253442
|
questions: session.pendingQuestions.questions,
|
|
@@ -253453,8 +253451,8 @@ function ChatApp({
|
|
|
253453
253451
|
getProviderModels: session.getProviderModels
|
|
253454
253452
|
}, undefined, false, undefined, this) : null;
|
|
253455
253453
|
const handleFormSubmit = import_react53.useCallback((text3) => {
|
|
253456
|
-
|
|
253457
|
-
}, [
|
|
253454
|
+
handleSubmit(text3);
|
|
253455
|
+
}, [handleSubmit]);
|
|
253458
253456
|
const totalTokens = [...staticMessages, ...activeMessages].reduce((acc, msg) => {
|
|
253459
253457
|
if (msg.usage) {
|
|
253460
253458
|
return acc + (msg.usage.promptTokens || 0) + (msg.usage.completionTokens || 0);
|
|
@@ -254083,7 +254081,7 @@ __export(exports_error_parser, {
|
|
|
254083
254081
|
});
|
|
254084
254082
|
import util5 from "util";
|
|
254085
254083
|
function parseErrorMessage(err) {
|
|
254086
|
-
let errMsg
|
|
254084
|
+
let errMsg;
|
|
254087
254085
|
try {
|
|
254088
254086
|
errMsg = err?.message || String(err);
|
|
254089
254087
|
if (typeof errMsg !== "string") {
|
|
@@ -255322,7 +255320,7 @@ function useAgentSession({
|
|
|
255322
255320
|
return { block: false };
|
|
255323
255321
|
};
|
|
255324
255322
|
}
|
|
255325
|
-
}, [agent2]);
|
|
255323
|
+
}, [agent2, setAuthMode, setPendingQuestions]);
|
|
255326
255324
|
import_react55.useEffect(() => {
|
|
255327
255325
|
if (authMode === "tasks_mode") {
|
|
255328
255326
|
const update3 = () => {
|
|
@@ -255378,7 +255376,19 @@ function useAgentSession({
|
|
|
255378
255376
|
} finally {
|
|
255379
255377
|
setIsStreaming(false);
|
|
255380
255378
|
}
|
|
255381
|
-
}, [
|
|
255379
|
+
}, [
|
|
255380
|
+
agent2,
|
|
255381
|
+
addToast,
|
|
255382
|
+
setActiveMessages,
|
|
255383
|
+
setAuthMode,
|
|
255384
|
+
setCurrentGrillIndex,
|
|
255385
|
+
setCustomInputMode,
|
|
255386
|
+
setGrillAnswers,
|
|
255387
|
+
setGrillPrompt,
|
|
255388
|
+
setGrillQuestions,
|
|
255389
|
+
setIsStreaming,
|
|
255390
|
+
setStaticMessages
|
|
255391
|
+
]);
|
|
255382
255392
|
const generatePlanFromGrill = import_react55.useCallback(async (answers) => {
|
|
255383
255393
|
setAuthMode("none");
|
|
255384
255394
|
const originalPrompt = grillPrompt;
|
|
@@ -255412,7 +255422,19 @@ function useAgentSession({
|
|
|
255412
255422
|
setIsStreaming(false);
|
|
255413
255423
|
setAuthMode("plan_approve");
|
|
255414
255424
|
}
|
|
255415
|
-
}, [
|
|
255425
|
+
}, [
|
|
255426
|
+
agent2,
|
|
255427
|
+
grillPrompt,
|
|
255428
|
+
grillQuestions,
|
|
255429
|
+
setActiveMessages,
|
|
255430
|
+
setAuthMode,
|
|
255431
|
+
setCurrentPlannedPrompt,
|
|
255432
|
+
setGrillAnswers,
|
|
255433
|
+
setGrillPrompt,
|
|
255434
|
+
setGrillQuestions,
|
|
255435
|
+
setIsStreaming,
|
|
255436
|
+
setStaticMessages
|
|
255437
|
+
]);
|
|
255416
255438
|
const handleGrillSelect = import_react55.useCallback(async (item) => {
|
|
255417
255439
|
if (item.value === "custom") {
|
|
255418
255440
|
setCustomInputMode(true);
|
|
@@ -255425,7 +255447,15 @@ function useAgentSession({
|
|
|
255425
255447
|
} else {
|
|
255426
255448
|
await generatePlanFromGrill(nextAnswers);
|
|
255427
255449
|
}
|
|
255428
|
-
}, [
|
|
255450
|
+
}, [
|
|
255451
|
+
grillAnswers,
|
|
255452
|
+
currentGrillIndex,
|
|
255453
|
+
grillQuestions,
|
|
255454
|
+
generatePlanFromGrill,
|
|
255455
|
+
setCurrentGrillIndex,
|
|
255456
|
+
setCustomInputMode,
|
|
255457
|
+
setGrillAnswers
|
|
255458
|
+
]);
|
|
255429
255459
|
const handleSubmit = import_react55.useCallback(async (text3) => {
|
|
255430
255460
|
if (text3.trim() === "/exit") {
|
|
255431
255461
|
setShouldExit(true);
|
|
@@ -255684,19 +255714,31 @@ Please run \`/login\` to:
|
|
|
255684
255714
|
}
|
|
255685
255715
|
}, [
|
|
255686
255716
|
agent2,
|
|
255687
|
-
activeMessages,
|
|
255688
255717
|
isAuthenticated,
|
|
255689
255718
|
isStreaming,
|
|
255690
|
-
grillQuestions,
|
|
255691
|
-
grillAnswers,
|
|
255692
|
-
customInputMode,
|
|
255693
|
-
generatePlanFromGrill,
|
|
255694
255719
|
generateGrillQuestions,
|
|
255695
255720
|
sessionRepository,
|
|
255696
|
-
authMode,
|
|
255697
|
-
currentGrillIndex,
|
|
255698
255721
|
grillMode,
|
|
255699
|
-
setQueuedPrompts
|
|
255722
|
+
setQueuedPrompts,
|
|
255723
|
+
addToast,
|
|
255724
|
+
setActiveMessages,
|
|
255725
|
+
setAuthMode,
|
|
255726
|
+
setGrillMode,
|
|
255727
|
+
setIsStreaming,
|
|
255728
|
+
setLogoutItems,
|
|
255729
|
+
setSelectedProvider,
|
|
255730
|
+
setSessionPage,
|
|
255731
|
+
setSessionRenameMode,
|
|
255732
|
+
setSessionSelectedIndex,
|
|
255733
|
+
setSessionsData,
|
|
255734
|
+
setSettingsFollowUpMode,
|
|
255735
|
+
setSettingsNonWorkspace,
|
|
255736
|
+
setSettingsShowTasks,
|
|
255737
|
+
setSettingsSteeringMode,
|
|
255738
|
+
setSettingsThinkingLevel,
|
|
255739
|
+
setSettingsToolPermission,
|
|
255740
|
+
setShouldExit,
|
|
255741
|
+
setStaticMessages
|
|
255700
255742
|
]);
|
|
255701
255743
|
const handleAbort = import_react55.useCallback(() => {
|
|
255702
255744
|
if (isStreaming && agent2) {
|
|
@@ -255729,7 +255771,7 @@ Please run \`/login\` to:
|
|
|
255729
255771
|
} else {
|
|
255730
255772
|
addToast("Plan rejected.", "error");
|
|
255731
255773
|
}
|
|
255732
|
-
}, [currentPlannedPrompt, handleSubmit, addToast, setAuthMode]);
|
|
255774
|
+
}, [currentPlannedPrompt, handleSubmit, addToast, setAuthMode, setCurrentPlannedPrompt]);
|
|
255733
255775
|
const handleContextSelect = () => {};
|
|
255734
255776
|
return {
|
|
255735
255777
|
currentPlannedPrompt,
|
|
@@ -261612,8 +261654,8 @@ var init_version_check = __esm(() => {
|
|
|
261612
261654
|
// package.json
|
|
261613
261655
|
var package_default = {
|
|
261614
261656
|
name: "@trydecember/cli",
|
|
261615
|
-
version: "0.3.
|
|
261616
|
-
description: "coding agent that runs in your terminal and the cloud.",
|
|
261657
|
+
version: "0.3.8",
|
|
261658
|
+
description: "AI coding agent that runs in your terminal and the cloud.",
|
|
261617
261659
|
homepage: "https://trydecember.com",
|
|
261618
261660
|
repository: {
|
|
261619
261661
|
type: "git",
|
|
@@ -261627,7 +261669,7 @@ var package_default = {
|
|
|
261627
261669
|
type: "module",
|
|
261628
261670
|
private: false,
|
|
261629
261671
|
author: "Chaitanya Sonawane",
|
|
261630
|
-
license: "
|
|
261672
|
+
license: "MIT",
|
|
261631
261673
|
keywords: [
|
|
261632
261674
|
"december",
|
|
261633
261675
|
"terminal",
|
|
@@ -261651,7 +261693,9 @@ var package_default = {
|
|
|
261651
261693
|
scripts: {
|
|
261652
261694
|
build: "bun build ./src/index.ts --target=node --outfile=./dist/december.js",
|
|
261653
261695
|
prepublishOnly: "bun run build",
|
|
261654
|
-
typecheck: "tsc --noEmit"
|
|
261696
|
+
typecheck: "tsc --noEmit",
|
|
261697
|
+
test: "bun test",
|
|
261698
|
+
"test:unit": "bun test"
|
|
261655
261699
|
},
|
|
261656
261700
|
devDependencies: {
|
|
261657
261701
|
"@december/agent": "workspace:*",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trydecember/cli",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "coding agent that runs in your terminal and the cloud.",
|
|
3
|
+
"version": "0.3.8",
|
|
4
|
+
"description": "AI coding agent that runs in your terminal and the cloud.",
|
|
5
5
|
"homepage": "https://trydecember.com",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"type": "module",
|
|
16
16
|
"private": false,
|
|
17
17
|
"author": "Chaitanya Sonawane",
|
|
18
|
-
"license": "
|
|
18
|
+
"license": "MIT",
|
|
19
19
|
"keywords": [
|
|
20
20
|
"december",
|
|
21
21
|
"terminal",
|
|
@@ -39,7 +39,9 @@
|
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "bun build ./src/index.ts --target=node --outfile=./dist/december.js",
|
|
41
41
|
"prepublishOnly": "bun run build",
|
|
42
|
-
"typecheck": "tsc --noEmit"
|
|
42
|
+
"typecheck": "tsc --noEmit",
|
|
43
|
+
"test": "bun test",
|
|
44
|
+
"test:unit": "bun test"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
47
|
"@december/agent": "workspace:*",
|