Skip to content

Commit d40521b

Browse files
olegklimovMarcMcIntoshalashchev17github-actions[bot]
authored
patch() next attempt (#538)
* ui(patches): remove apply and replace buttons and make the code revealable. * ui(new patches): remove new event for sending a patchto the ide. * wip(ide tool edit): send enough info to the ide to know which tool edit was manually accepted or rejected. * feat(chat): append tool call accepted message to chat when the user accepts the diff. interactive rebase in progress; onto 3efa513 Last commands done (4 commands done): pick f1102ea wip(ide tool edit): send enough info to the ide to know which tool edit was manually accepted or rejected. pick a0dbf40 feat(chat): append tool call accepted message to chat when the user accepts the diff. Next commands to do (5 remaining commands): pick be1a614 wip(manual patch): remove the tool confiormation when manually applying patches. pick 7e4e644 fix: inconstancy with auto sending when accpetting or reject a patch multiple times. You are currently rebasing branch 'ui-patch-tool-changes' on '3efa5139'. Changes to be committed: modified: refact-agent/gui/src/features/Chat/Thread/actions.ts modified: refact-agent/gui/src/features/Chat/Thread/reducer.ts modified: refact-agent/gui/src/features/History/historySlice.ts modified: refact-agent/gui/src/hooks/useEventBusForApp.ts modified: refact-agent/gui/src/services/refact/types.ts Last commands done (4 commands done): pick 97d931b wip(ide tool edit): send enough info to the ide to know which tool edit was manually accepted or rejected. pick 7b5f40f feat(chat): append tool call accepted message to chat when the user accepts the diff. Next commands to do (19 remaining commands): pick 723aaa3 wip(manual patch): remove the tool confiormation when manually applying patches. pick 70dd139 fix: inconstancy with auto sending when accpetting or reject a patch multiple times. Changes to be committed: modified: refact-agent/gui/src/features/Chat/Thread/actions.ts modified: refact-agent/gui/src/features/Chat/Thread/reducer.ts modified: refact-agent/gui/src/features/History/historySlice.ts modified: refact-agent/gui/src/hooks/useEventBusForApp.ts modified: refact-agent/gui/src/services/refact/types.ts * wip(manual patch): remove the tool confiormation when manually applying patches. Last commands done (5 commands done): pick 7b5f40f feat(chat): append tool call accepted message to chat when the user accepts the diff. pick 723aaa3 wip(manual patch): remove the tool confiormation when manually applying patches. Next commands to do (18 remaining commands): pick 70dd139 fix: inconstancy with auto sending when accpetting or reject a patch multiple times. pick b1b7910 fix(updating tool messages): handle multi model. Changes to be committed: modified: refact-agent/gui/package.json modified: refact-agent/gui/src/app/middleware.ts modified: refact-agent/gui/src/contexts/AbortControllers.tsx modified: refact-agent/gui/src/features/ToolConfirmation/confirmationSlice.ts modified: refact-agent/gui/src/hooks/useEventBusForApp.ts * fix: inconstancy with auto sending when accpetting or reject a patch multiple times. * fix(updating tool messages): handle multi model. * remove unused import. * fix(apply): auto calls when user manually presses apply then accept/reject. You are currently rebasing branch 'ui-patch-tool-changes' on '3efa5139'. Changes to be committed: modified: refact-agent/gui/src/app/middleware.ts modified: refact-agent/gui/src/features/Chat/Thread/actions.ts modified: refact-agent/gui/src/features/Chat/Thread/reducer.ts modified: refact-agent/gui/src/features/History/historySlice.ts modified: refact-agent/gui/src/hooks/useSendChatRequest.ts Last commands done (9 commands done): pick 71bb762 remove unused import. pick cc24290 fix(apply): auto calls when user manually presses apply then accept/reject. Next commands to do (14 remaining commands): pick 36c5bcf fix(apply confirmation): add the correct message if the user accepts the result. pick cb56432 fix(acceot / reject): prevent sending message no rejection. Changes to be committed: modified: refact-agent/gui/src/app/middleware.ts modified: refact-agent/gui/src/features/Chat/Thread/actions.ts modified: refact-agent/gui/src/features/Chat/Thread/reducer.ts modified: refact-agent/gui/src/features/History/historySlice.ts modified: refact-agent/gui/src/hooks/useSendChatRequest.ts * fix(apply confirmation): add the correct message if the user accepts the result. * fix(acceot / reject): prevent sending message no rejection. * fix: don't continue streaming if the user rejects the tool use. * ui(confirmation): remove loading dots. interactive rebase in progress; onto c7e90e9 Last commands done (14 commands done): pick 6989755 fix: don't continue streaming if the user rejects the tool use. pick 54d83da ui(confirmation): remove loading dots. Next commands to do (9 remaining commands): pick 61aa130 ui(markdown): remove custom stye for update textdoc pick 332ac4c ci: update version bump logic for alpha branch & npm publish in CI (#508) Changes to be committed: modified: refact-agent/gui/src/components/ChatContent/ChatContent.tsx * ui(markdown): remove custom stye for update textdoc * ci: update version bump logic for alpha branch & npm publish in CI (#508) * ci: update version bump logic for alpha branch & npm publish in CI * ci: allow publish runs for test branch * ci: debug info * ci: test alpha version publishment * ci: push to HEAD:<name-of-remote-branch> when pushing tags after publishment * ci: add check for existing versions on publish attempt * ci: jump over locked alpha.3 version since unpublishment takes up to 72 hours * ci: add notifications to slack * ci: adjust notification text of npm publishment * ci: jump over alpha.4 due to locks in 72 hours * ci: cut off slack announce & version skip of alpha.5 because of 72 hours lock when unpublishing * ci: version skip to alpha.6 & publishing alpha minor patch update if pushing to dev branch or if manually starting up in dev branch, otherwise regular patch version update * ci: working CI for publishment & version jump to alpha.7 * ci: separate build and publish workflows, committing updated package.json * ci: fix alpha version bump check * ci: pushing to branch based on ref_name instead of head_ref * ci: fix of publish with latest or alpha tags based on ref_name * Version bump 2.0.8-alpha.10 * ci: include release tag on npm in slack notification * ci: version bump GUI & fix of setup vars * Version bump 2.0.8-alpha.12 * ci: simplify checks in workflow * Version bump 2.0.8-alpha.13 * ci: removed test/workflow-alpha-version mentions * chore: restore original formatting of build ci workflow config file --------- Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com> * fix(chat): remove unused import. * a different Stop message without confirmation * fix(accept / reject): continue when accepting or rejecting the changes. Last commands done (19 commands done): pick ac80b1f a different Stop message without confirmation pick 2995aa6 fix(accept / reject): continue when accepting or rejecting the changes. Next commands to do (4 remaining commands): pick c792dcd refactor(ideToolCallResponse): remove chat id. pick 1ef2ea5 remove comment. Changes to be committed: modified: refact-agent/gui/src/app/middleware.ts modified: refact-agent/gui/src/components/ChatForm/ToolConfirmation.tsx modified: refact-agent/gui/src/features/Chat/Thread/actions.ts modified: refact-agent/gui/src/features/Chat/Thread/reducer.ts modified: refact-agent/gui/src/features/History/historySlice.ts modified: refact-agent/gui/src/hooks/useSendChatRequest.ts * refactor(ideToolCallResponse): remove chat id. * remove comment. * fix(patch): continue if accepted or allow clicked, stop if rejected of stop clicked. Last commands done (22 commands done): pick 1ef2ea5 remove comment. pick 685f095 fix(patch): continue if accepted or allow clicked, stop if rejected of stop clicked. Next command to do (1 remaining command): pick 2cc7859 feat(apply + accept): send the chat when the recent tool result has been accepted in the ide. Changes to be committed: modified: refact-agent/gui/src/app/middleware.ts modified: refact-agent/gui/src/components/ChatForm/ToolConfirmation.tsx modified: refact-agent/gui/src/features/Chat/Thread/actions.ts modified: refact-agent/gui/src/features/Chat/Thread/reducer.ts modified: refact-agent/gui/src/features/History/historySlice.ts modified: refact-agent/gui/src/hooks/useEventBusForIDE.ts modified: refact-agent/gui/src/hooks/useSendChatRequest.ts * feat(apply + accept): send the chat when the recent tool result has been accepted in the ide. --------- Co-authored-by: Marc McIntosh <[email protected]> Co-authored-by: Andrii Lashchov <[email protected]> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
1 parent c7e90e9 commit d40521b

File tree

18 files changed

+420
-77
lines changed

18 files changed

+420
-77
lines changed

refact-agent/engine/src/tools/tools_execute.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ pub async fn run_tools(
203203
let command_to_match = cmd
204204
.command_to_match_against_confirm_deny(&args)
205205
.unwrap_or("<error_command>".to_string());
206-
generated_tool.push(tool_answer(format!("tool use: command '{command_to_match}' has been denied by the user"), t_call.id.to_string()));
206+
generated_tool.push(tool_answer(format!("Whoops the user didn't like the command '{command_to_match}'. Stop and ask for correction from the user."), t_call.id.to_string()));
207207
continue;
208208
}
209209
_ => {}

refact-agent/gui/src/app/middleware.ts

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import {
1212
newIntegrationChat,
1313
chatResponse,
1414
setThreadUsage,
15+
setIsWaitingForResponse,
16+
upsertToolCall,
17+
sendCurrentChatToLspAfterToolCallUpdate,
1518
} from "../features/Chat/Thread";
1619
import { statisticsApi } from "../services/refact/statistics";
1720
import { integrationsApi } from "../services/refact/integrations";
@@ -32,12 +35,17 @@ import { resetAttachedImagesSlice } from "../features/AttachedImages";
3235
import { nextTip } from "../features/TipOfTheDay";
3336
import { telemetryApi } from "../services/refact/telemetry";
3437
import { CONFIG_PATH_URL, FULL_PATH_URL } from "../services/refact/consts";
35-
import { resetConfirmationInteractedState } from "../features/ToolConfirmation/confirmationSlice";
38+
import {
39+
resetConfirmationInteractedState,
40+
updateConfirmationAfterIdeToolUse,
41+
} from "../features/ToolConfirmation/confirmationSlice";
3642
import {
3743
updateAgentUsage,
3844
updateMaxAgentUsageAmount,
3945
} from "../features/AgentUsage/agentUsageSlice";
4046
import { isChatResponseChoice } from "../services/refact";
47+
import { ideToolCallResponse } from "../hooks/useEventBusForIDE";
48+
import { upsertToolCallIntoHistory } from "../features/History/historySlice";
4149

4250
const AUTH_ERROR_MESSAGE =
4351
"There is an issue with your API key. Check out your API Key or re-login";
@@ -501,3 +509,33 @@ startListening({
501509
}
502510
},
503511
});
512+
513+
// Tool Call results from ide.
514+
startListening({
515+
actionCreator: ideToolCallResponse,
516+
effect: (action, listenerApi) => {
517+
const state = listenerApi.getState();
518+
519+
listenerApi.dispatch(upsertToolCallIntoHistory(action.payload));
520+
listenerApi.dispatch(upsertToolCall(action.payload));
521+
listenerApi.dispatch(updateConfirmationAfterIdeToolUse(action.payload));
522+
523+
const pauseReasons = state.confirmation.pauseReasons.filter(
524+
(reason) => reason.tool_call_id !== action.payload.toolCallId,
525+
);
526+
527+
if (pauseReasons.length === 0) {
528+
listenerApi.dispatch(resetConfirmationInteractedState());
529+
listenerApi.dispatch(setIsWaitingForResponse(false));
530+
}
531+
532+
if (pauseReasons.length === 0 && action.payload.accepted) {
533+
void listenerApi.dispatch(
534+
sendCurrentChatToLspAfterToolCallUpdate({
535+
chatId: action.payload.chatId,
536+
toolCallId: action.payload.toolCallId,
537+
}),
538+
);
539+
}
540+
},
541+
});

refact-agent/gui/src/components/ChatContent/ChatContent.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { ChatLinks, UncommittedChangesWarning } from "../ChatLinks";
3434
import { telemetryApi } from "../../services/refact/telemetry";
3535
import { PlaceHolderText } from "./PlaceHolderText";
3636
import { UsageCounter } from "../UsageCounter";
37+
import { getConfirmationPauseStatus } from "../../features/ToolConfirmation/confirmationSlice";
3738

3839
export type ChatContentProps = {
3940
onRetry: (index: number, question: UserMessage["content"]) => void;
@@ -55,6 +56,7 @@ export const ChatContent: React.FC<ChatContentProps> = ({
5556
const [sendTelemetryEvent] =
5657
telemetryApi.useLazySendTelemetryChatEventQuery();
5758
const integrationMeta = useAppSelector(selectIntegration);
59+
const isWaitingForConfirmation = useAppSelector(getConfirmationPauseStatus);
5860

5961
const {
6062
handleScroll,
@@ -119,7 +121,7 @@ export const ChatContent: React.FC<ChatContentProps> = ({
119121
{threadUsage && <UsageCounter usage={threadUsage} />}
120122

121123
<Container py="4">
122-
<Spinner spinning={isWaiting} />
124+
<Spinner spinning={isWaiting && !isWaitingForConfirmation} />
123125
</Container>
124126
</Flex>
125127
{showFollowButton && (

refact-agent/gui/src/components/ChatForm/ToolConfirmation.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useMemo } from "react";
1+
import React, { useCallback, useMemo } from "react";
22
import {
33
PATCH_LIKE_FUNCTIONS,
44
useAppDispatch,
@@ -88,6 +88,10 @@ export const ToolConfirmation: React.FC<ToolConfirmationProps> = ({
8888
confirmToolUsage();
8989
};
9090

91+
const handleReject = useCallback(() => {
92+
rejectToolUsage(toolCallIds);
93+
}, [rejectToolUsage, toolCallIds]);
94+
9195
const message = getConfirmationMessage(
9296
commands,
9397
rules,
@@ -101,7 +105,7 @@ export const ToolConfirmation: React.FC<ToolConfirmationProps> = ({
101105
return (
102106
<PatchConfirmation
103107
handleAllowForThisChat={handleAllowForThisChat}
104-
rejectToolUsage={rejectToolUsage}
108+
rejectToolUsage={handleReject}
105109
confirmToolUsage={confirmToolUsage}
106110
/>
107111
);
@@ -167,9 +171,9 @@ export const ToolConfirmation: React.FC<ToolConfirmationProps> = ({
167171
color="red"
168172
variant="surface"
169173
size="1"
170-
onClick={rejectToolUsage}
174+
onClick={handleReject}
171175
>
172-
Deny
176+
Stop
173177
</Button>
174178
)}
175179
</Flex>
@@ -258,7 +262,7 @@ const PatchConfirmation: React.FC<PatchConfirmationProps> = ({
258262
size="1"
259263
onClick={rejectToolUsage}
260264
>
261-
Deny
265+
Stop
262266
</Button>
263267
</Flex>
264268
</Flex>

refact-agent/gui/src/components/Tools/Texdoc.module.css

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,9 @@
1818
margin-top: 0;
1919
}
2020

21-
:global(.radix-themes) .textdoc.textdoc__update :global(.hljs.language-diff) {
21+
/* :global(.radix-themes) .textdoc.textdoc__update :global(.hljs.language-diff) {
2222
--hlbg: var(--gray-3);
2323
--hlcolor1: var(--gray-12);
24-
/* --hlcolor2: #000000;
25-
--hlcolor3: #000080;
26-
--hlcolor4: #800080;
27-
--hlcolor5: #808000;
28-
--hlcolor6: #800000;
29-
--hlcolor7: #0055af; */
3024
--hlcolor8: var(--green-9);
3125
--hlcolor9: var(--red-9);
3226
}
@@ -44,4 +38,4 @@
4438
4539
.textdoc__update .textdoc__diffbox {
4640
box-shadow: var(--shadow-1);
47-
}
41+
} */

refact-agent/gui/src/components/Tools/Textdoc.tsx

Lines changed: 55 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ import {
1212
isUpdateTextDocToolCall,
1313
parseRawTextDocToolCall,
1414
} from "./types";
15-
import { Box, Button, Card, Flex } from "@radix-ui/themes";
15+
import { Box, Card, Flex, Button } from "@radix-ui/themes";
1616
import { TruncateLeft } from "../Text";
1717
import { Link } from "../Link";
1818
import { useEventsBusForIDE } from "../../hooks/useEventBusForIDE";
1919
import { Markdown } from "../Markdown";
2020
import { filename } from "../../utils/filename";
2121
import styles from "./Texdoc.module.css";
22-
import { createPatch } from "diff";
23-
import classNames from "classnames";
22+
import { useCopyToClipboard } from "../../hooks/useCopyToClipboard";
23+
import { Reveal } from "../Reveal";
2424
import { useAppSelector } from "../../hooks";
25-
import { selectCanPaste } from "../../features/Chat";
25+
import { selectCanPaste, selectChatId } from "../../features/Chat";
2626
import { toolsApi } from "../../services/refact";
2727
import { ErrorCallout } from "../Callout";
2828
import { isRTKResponseErrorWithDetailMessage } from "../../utils";
@@ -56,12 +56,14 @@ export const TextDocTool: React.FC<{ toolCall: RawTextDocTool }> = ({
5656
const TextDocHeader: React.FC<{
5757
toolCall: TextDocToolCall;
5858
}> = ({ toolCall }) => {
59-
const { openFile, diffPasteBack, sendToolEditToIde } = useEventsBusForIDE();
59+
const { openFile, diffPasteBack, sendToolCallToIde } = useEventsBusForIDE();
6060
const [requestDryRun, dryRunResult] = toolsApi.useDryRunForEditToolMutation();
6161
const [errorMessage, setErrorMessage] = useState<string>("");
6262
const canPaste = useAppSelector(selectCanPaste);
63+
const chatId = useAppSelector(selectChatId);
6364

6465
const clearErrorMessage = useCallback(() => setErrorMessage(""), []);
66+
6567
// move this
6668
const handleOpenFile = useCallback(() => {
6769
if (!toolCall.function.arguments.path) return;
@@ -70,9 +72,9 @@ const TextDocHeader: React.FC<{
7072

7173
const handleReplace = useCallback(
7274
(content: string) => {
73-
diffPasteBack(content);
75+
diffPasteBack(content, chatId, toolCall.id);
7476
},
75-
[diffPasteBack],
77+
[chatId, diffPasteBack, toolCall.id],
7678
);
7779

7880
const replaceContent = useMemo(() => {
@@ -90,7 +92,7 @@ const TextDocHeader: React.FC<{
9092
})
9193
.then((results) => {
9294
if (results.data) {
93-
sendToolEditToIde(toolCall.function.arguments.path, results.data);
95+
sendToolCallToIde(toolCall, results.data, chatId);
9496
} else if (isRTKResponseErrorWithDetailMessage(results)) {
9597
setErrorMessage(results.error.data.detail);
9698
}
@@ -107,12 +109,7 @@ const TextDocHeader: React.FC<{
107109
setErrorMessage("Error with patch: " + JSON.stringify(error));
108110
}
109111
});
110-
}, [
111-
requestDryRun,
112-
sendToolEditToIde,
113-
toolCall.function.arguments,
114-
toolCall.function.name,
115-
]);
112+
}, [chatId, requestDryRun, sendToolCallToIde, toolCall]);
116113

117114
return (
118115
<Card size="1" variant="surface" mt="4" className={styles.textdoc__header}>
@@ -140,6 +137,7 @@ const TextDocHeader: React.FC<{
140137
{replaceContent && (
141138
<Button
142139
size="1"
140+
// this one can directly dismiss the tool confirmation.
143141
onClick={() => handleReplace(replaceContent)}
144142
disabled={dryRunResult.isLoading || !canPaste}
145143
title="Replace the current selection in the ide."
@@ -166,11 +164,17 @@ const CreateTextDoc: React.FC<{
166164
"```" + extension + "\n" + toolCall.function.arguments.content + "\n```"
167165
);
168166
}, [toolCall.function.arguments.content, toolCall.function.arguments.path]);
167+
const handleCopy = useCopyToClipboard();
168+
169+
const lineCount = useMemo(() => code.split("\n").length, [code]);
170+
169171
return (
170172
// TODO: move this box up a bit, or make it generic
171173
<Box className={styles.textdoc}>
172174
<TextDocHeader toolCall={toolCall} />
173-
<Markdown>{code}</Markdown>
175+
<Reveal isRevealingCode defaultOpen={lineCount < 9}>
176+
<Markdown onCopyClick={handleCopy}>{code}</Markdown>
177+
</Reveal>
174178
</Box>
175179
);
176180
};
@@ -191,11 +195,20 @@ const ReplaceTextDoc: React.FC<{
191195
toolCall.function.arguments.path,
192196
toolCall.function.arguments.replacement,
193197
]);
198+
199+
const copyToClipBoard = useCopyToClipboard();
200+
const handleCopy = useCallback(() => {
201+
copyToClipBoard(toolCall.function.arguments.replacement);
202+
}, [copyToClipBoard, toolCall.function.arguments.replacement]);
203+
204+
const lineCount = useMemo(() => code.split("\n").length, [code]);
194205
return (
195206
// TODO: move this box up a bit, or make it generic
196207
<Box className={styles.textdoc}>
197208
<TextDocHeader toolCall={toolCall} />
198-
<Markdown>{code}</Markdown>
209+
<Reveal isRevealingCode defaultOpen={lineCount < 9}>
210+
<Markdown onCopyClick={handleCopy}>{code}</Markdown>
211+
</Reveal>
199212
</Box>
200213
);
201214
};
@@ -219,37 +232,48 @@ const UpdateRegexTextDoc: React.FC<{
219232
toolCall.function.arguments.replacement,
220233
]);
221234

235+
const lineCount = useMemo(() => code.split("\n").length, [code]);
236+
222237
return (
223238
<Box className={styles.textdoc}>
224239
<TextDocHeader toolCall={toolCall} />
225-
<Markdown>{code}</Markdown>
240+
<Reveal isRevealingCode defaultOpen={lineCount < 9}>
241+
<Markdown>{code}</Markdown>
242+
</Reveal>
226243
</Box>
227244
);
228245
};
229246

230247
const UpdateTextDoc: React.FC<{
231248
toolCall: UpdateTextDocToolCall;
232249
}> = ({ toolCall }) => {
233-
const diff = useMemo(() => {
234-
const patch = createPatch(
235-
toolCall.function.arguments.path,
236-
toolCall.function.arguments.old_str,
237-
toolCall.function.arguments.replacement,
250+
const code = useMemo(() => {
251+
const extension = getFileExtension(toolCall.function.arguments.path);
252+
return (
253+
"```" +
254+
extension +
255+
"\n" +
256+
toolCall.function.arguments.replacement +
257+
"\n```"
238258
);
239-
240-
return "```diff\n" + patch + "\n```";
241259
}, [
242-
toolCall.function.arguments.replacement,
243-
toolCall.function.arguments.old_str,
244260
toolCall.function.arguments.path,
261+
toolCall.function.arguments.replacement,
245262
]);
246-
// TODO: don't use markdown for this, it's two bright
263+
264+
const lineCount = useMemo(() => code.split("\n").length, [code]);
265+
266+
const copyToClipBoard = useCopyToClipboard();
267+
const handleCopy = useCallback(() => {
268+
copyToClipBoard(toolCall.function.arguments.replacement);
269+
}, [copyToClipBoard, toolCall.function.arguments.replacement]);
270+
247271
return (
248-
<Box className={classNames(styles.textdoc, styles.textdoc__update)}>
272+
<Box className={styles.textdoc}>
249273
<TextDocHeader toolCall={toolCall} />
250-
<Box className={classNames(styles.textdoc__diffbox)}>
251-
<Markdown useInlineStyles={false}>{diff}</Markdown>
252-
</Box>
274+
<Reveal isRevealingCode defaultOpen={lineCount < 9}>
275+
<Markdown onCopyClick={handleCopy}>{code}</Markdown>
276+
</Reveal>
253277
</Box>
254278
);
255279
};

refact-agent/gui/src/contexts/AbortControllers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const AbortControllerProvider: React.FC<{
3535
const abort = (key: string, reason?: string) => {
3636
if (key in abortControllers) {
3737
const fn = abortControllers[key];
38-
fn(reason);
38+
fn(reason ?? "aborted");
3939
removeController(key);
4040
}
4141
};

refact-agent/gui/src/events/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export {
3232
setCurrentProjectInfo,
3333
type CurrentProjectInfo,
3434
} from "../features/Chat/currentProject";
35+
export type { TextDocToolCall } from "../components/Tools/types";
3536

3637
export type {
3738
ToolCommand,
@@ -73,7 +74,8 @@ export {
7374
ideEscapeKeyPressed,
7475
ideIsChatStreaming,
7576
ideIsChatReady,
76-
ideToolEdit,
77+
ideToolCall,
78+
ideToolCallResponse,
7779
} from "../hooks/useEventBusForIDE";
7880

7981
export const fim = {

0 commit comments

Comments
 (0)