mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
Update memory plugin (#160)
This commit is contained in:
1 parent
be7e64b07f
commit
1248d0b9e0
50 files changed
+5363
-291
No files matched your search
@@ -3,6 +3,7 @@ import { useMemo, useRef, useEffect, useCallback, useState } from "react";
|
||||
import { OpenCodeClient } from "../api/opencode";
|
||||
import { API_BASE_URL } from "../config";
|
||||
import { fetchWrapper } from "../api/fetchWrapper";
|
||||
import { cancelRalphLoop } from "../api/memory";
|
||||
import type {
|
||||
Message,
|
||||
Part,
|
||||
@@ -421,7 +422,8 @@ const MAX_ABORT_RETRIES = 10;
|
||||
export const useAbortSession = (
|
||||
opcodeUrl: string | null | undefined,
|
||||
directory?: string,
|
||||
sessionID?: string
|
||||
sessionID?: string,
|
||||
repoId?: number
|
||||
) => {
|
||||
const client = useOpenCodeClient(opcodeUrl, directory);
|
||||
const queryClient = useQueryClient();
|
||||
@@ -541,6 +543,10 @@ export const useAbortSession = (
|
||||
|
||||
attemptAbort();
|
||||
|
||||
if (repoId) {
|
||||
cancelRalphLoop(String(repoId), targetSessionID).catch(() => {})
|
||||
}
|
||||
|
||||
retryIntervalRef.current = setInterval(() => {
|
||||
retryCountRef.current++;
|
||||
|
||||
|
||||
Reference in new issue
Block a user