Skip to content

Commit

Permalink
fix type written style
Browse files Browse the repository at this point in the history
  • Loading branch information
Xm0onh committed Jan 4, 2025
1 parent 71f4bda commit 575c1b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
dsnData,
dsnGeneratedTweetData,
dsnResponseData,
dsnSkippedEngagementData,
DsnGeneratedTweetData,
DsnResponseData,
DsnSkippedEngagementData,
EngagementDecision,
WorkflowConfig,
dsnDataType,
Expand Down Expand Up @@ -112,21 +112,21 @@ export const createGenerateTweetNode =
shouldEngage: true,
reason: response.engagementDecision.reason,
},
}) as dsnResponseData,
}) as DsnResponseData,
),
...shouldNotEngage.map(
item =>
({
type: dsnDataType.SKIPPED_ENGAGEMENT,
decision: item.decision,
tweet: item.tweet,
}) as dsnSkippedEngagementData,
}) as DsnSkippedEngagementData,
),
{
type: dsnDataType.GENERATED_TWEET,
content: generatedTweet.tweet,
tweetId: postedTweet ? postedTweet.postedTweetId : null,
} as dsnGeneratedTweetData,
} as DsnGeneratedTweetData,
];

return {
Expand Down
8 changes: 4 additions & 4 deletions auto-agents-framework/src/agents/workflows/kol/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@ export type EngagementDecision = {
tweet: Tweet;
};

export type dsnResponseData = {
export type DsnResponseData = {
type: dsnDataType.RESPONSE;
tweet: z.infer<typeof dsnTweet>;
decision: z.infer<typeof engagementSchema>;
} & z.infer<typeof responseSchema>;

export type dsnSkippedEngagementData = {
export type DsnSkippedEngagementData = {
type: dsnDataType.SKIPPED_ENGAGEMENT;
tweet: z.infer<typeof dsnTweet>;
} & z.infer<typeof skippedEngagementSchema>;

export type dsnGeneratedTweetData = {
export type DsnGeneratedTweetData = {
type: dsnDataType.GENERATED_TWEET;
content: string;
tweetId: string | null;
};

export type dsnData = dsnResponseData | dsnSkippedEngagementData | dsnGeneratedTweetData;
export type dsnData = DsnResponseData | DsnSkippedEngagementData | DsnGeneratedTweetData;

0 comments on commit 575c1b2

Please sign in to comment.