@consultancy-outfit/ai-draftsman-cli 1.3.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -50,7 +50,7 @@ function unreachableError(url, error) {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
// src/lib/version.ts
|
|
53
|
-
var VERSION = "
|
|
53
|
+
var VERSION = "2.0.1";
|
|
54
54
|
|
|
55
55
|
// src/lib/runtime.ts
|
|
56
56
|
var state = {};
|
|
@@ -4903,8 +4903,8 @@ function App(props) {
|
|
|
4903
4903
|
const connectorsRef = useRef2([]);
|
|
4904
4904
|
const [inputHistory, setInputHistory] = useState4([]);
|
|
4905
4905
|
const [customCommands, setCustomCommands] = useState4([]);
|
|
4906
|
-
const historyRef = useRef2(props.resume?.messages ?? []);
|
|
4907
4906
|
const sessionRef = useRef2(props.resume ?? newSession(cwd, agent));
|
|
4907
|
+
const historyRef = useRef2(sessionRef.current.messages);
|
|
4908
4908
|
const rulesRef = useRef2(new AllowRules());
|
|
4909
4909
|
const readFilesRef = useRef2(/* @__PURE__ */ new Set());
|
|
4910
4910
|
const abortRef = useRef2(null);
|
|
@@ -5209,9 +5209,9 @@ ${output.slice(0, 8e3)}`;
|
|
|
5209
5209
|
[info]
|
|
5210
5210
|
);
|
|
5211
5211
|
const clearConversation = useCallback(() => {
|
|
5212
|
-
historyRef.current = [];
|
|
5213
5212
|
readFilesRef.current.clear();
|
|
5214
5213
|
sessionRef.current = newSession(cwd, agentRef.current);
|
|
5214
|
+
historyRef.current = sessionRef.current.messages;
|
|
5215
5215
|
artifactsRef.current = false;
|
|
5216
5216
|
pendingContext.current = "";
|
|
5217
5217
|
warnedContext.current = false;
|
|
@@ -5247,10 +5247,12 @@ ${output.slice(0, 8e3)}`;
|
|
|
5247
5247
|
},
|
|
5248
5248
|
{ signal: ac.signal }
|
|
5249
5249
|
);
|
|
5250
|
-
historyRef.current
|
|
5250
|
+
historyRef.current.splice(
|
|
5251
|
+
0,
|
|
5252
|
+
historyRef.current.length,
|
|
5251
5253
|
{ role: "user", content: "Our conversation so far was compacted into this summary." },
|
|
5252
5254
|
{ role: "assistant", content: summary.content }
|
|
5253
|
-
|
|
5255
|
+
);
|
|
5254
5256
|
warnedContext.current = false;
|
|
5255
5257
|
setContextTokens(0);
|
|
5256
5258
|
info("Conversation compacted.", "success");
|