mirror of
https://github.com/luckyyzh/pi-agent-integrated.git
synced 2026-10-03 02:59:35 +00:00
feat: integrate Pi backend and Pi Web
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { getSessionEntries, resolveSessionPath } from "./session-reader";
|
||||
export { isFilePathReferencedByEntries } from "./session-file-references-core";
|
||||
import {
|
||||
isBashOutputPathReferencedByEntries,
|
||||
isFilePathReferencedByEntries,
|
||||
isValidSessionId,
|
||||
} from "./session-file-references-core";
|
||||
|
||||
export async function isFilePathReferencedBySession(filePath: string, sessionId: string | null): Promise<boolean> {
|
||||
if (!isValidSessionId(sessionId)) return false;
|
||||
try {
|
||||
const sessionPath = await resolveSessionPath(sessionId);
|
||||
if (!sessionPath) return false;
|
||||
return isFilePathReferencedByEntries(filePath, getSessionEntries(sessionPath));
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export async function isBashOutputPathReferencedBySession(filePath: string, sessionId: string | null): Promise<boolean> {
|
||||
if (!isValidSessionId(sessionId)) return false;
|
||||
try {
|
||||
const sessionPath = await resolveSessionPath(sessionId);
|
||||
if (!sessionPath) return false;
|
||||
return isBashOutputPathReferencedByEntries(filePath, getSessionEntries(sessionPath));
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user