Run codemod for replacing BskyAgent with AtpAgent (#10862)

This commit is contained in:
DS Boyce
2026-06-11 08:46:01 -07:00
committed by GitHub
parent e3e7db2350
commit c8634105c1
37 changed files with 195 additions and 134 deletions
+7 -7
View File
@@ -7,8 +7,8 @@ import {
type AppBskyEmbedRecordWithMedia,
type AppBskyEmbedVideo,
AppBskyFeedPost,
type AtpAgent,
BlobRef,
type BskyAgent,
ChatBskyGroupDefs,
type ComAtprotoLabelDefs,
type ComAtprotoRepoApplyWrites,
@@ -55,7 +55,7 @@ interface PostOpts {
}
export async function post(
agent: BskyAgent,
agent: AtpAgent,
queryClient: QueryClient,
opts: PostOpts,
) {
@@ -197,7 +197,7 @@ export async function post(
return {uris}
}
async function resolveRT(agent: BskyAgent, richtext: RichText) {
async function resolveRT(agent: AtpAgent, richtext: RichText) {
const trimmedText = richtext.text
// Trim leading whitespace-only lines (but don't break ASCII art).
.replace(/^(\s*\n)+/, '')
@@ -217,7 +217,7 @@ export class ReplyDeletedError extends Error {
}
}
async function resolveReply(agent: BskyAgent, replyTo: string) {
async function resolveReply(agent: AtpAgent, replyTo: string) {
const {data} = await agent.app.bsky.feed.getPosts({
uris: [replyTo],
})
@@ -250,7 +250,7 @@ async function resolveReply(agent: BskyAgent, replyTo: string) {
}
async function resolveEmbed(
agent: BskyAgent,
agent: AtpAgent,
queryClient: QueryClient,
draft: PostDraft,
onStateChange: ((state: string) => void) | undefined,
@@ -309,7 +309,7 @@ async function resolveEmbed(
}
async function resolveMedia(
agent: BskyAgent,
agent: AtpAgent,
queryClient: QueryClient,
embedDraft: EmbedDraft,
onStateChange: ((state: string) => void) | undefined,
@@ -482,7 +482,7 @@ async function resolveMedia(
}
async function resolveRecord(
agent: BskyAgent,
agent: AtpAgent,
queryClient: QueryClient,
uri: string,
): Promise<ComAtprotoRepoStrongRef.Main> {