支持把目录附加到会话(临时处理)

This commit is contained in:
xintaofei
2026-03-23 18:15:30 +08:00
parent 42e7e66997
commit be08b59aa0
3 changed files with 64 additions and 1 deletions

View File

@@ -15,3 +15,21 @@ export function emitAttachFileToSession(
})
)
}
export const APPEND_TEXT_TO_SESSION_EVENT = "codeg:append-text-to-session"
export interface AppendTextToSessionDetail {
tabId: string
text: string
}
export function emitAppendTextToSession(
detail: AppendTextToSessionDetail
): void {
if (typeof window === "undefined") return
window.dispatchEvent(
new CustomEvent<AppendTextToSessionDetail>(APPEND_TEXT_TO_SESSION_EVENT, {
detail,
})
)
}