Skip to content

Commit db034a5

Browse files
authored
Rename AskAI action to AI Step (#1639)
Fixes OPS-3105. ## Additional Notes 1. Changed the action name and description 2. Changed the action file name to be consistent with the action name ## UI Changes <img width="1494" height="679" alt="Screenshot 2025-11-20 at 1 26 36 PM" src="https://github.com/user-attachments/assets/7062badf-d833-4ab8-8e76-6ba49aaa30da" />
1 parent 36def1b commit db034a5

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

packages/blocks/ai/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createBlock } from '@openops/blocks-framework';
22
import { aiAuth } from '@openops/common';
33
import { BlockCategory } from '@openops/shared';
4-
import { askAi } from './lib/actions/askAi';
4+
import { aiStep } from './lib/actions/ai-step';
55

66
export const ai = createBlock({
77
displayName: 'AI',
@@ -10,6 +10,6 @@ export const ai = createBlock({
1010
minimumSupportedRelease: '0.7.1',
1111
logoUrl: 'https://static.openops.com/blocks/openops-ai.svg',
1212
authors: [],
13-
actions: [askAi],
13+
actions: [aiStep],
1414
triggers: [],
1515
});

packages/blocks/ai/src/lib/actions/askAi.ts renamed to packages/blocks/ai/src/lib/actions/ai-step.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import {
1313
import { AiProviderEnum, analysisLLMSchema } from '@openops/shared';
1414
import { generateObject, generateText } from 'ai';
1515

16-
export const askAi = createAction({
17-
displayName: 'Ask AI',
16+
export const aiStep = createAction({
17+
displayName: 'AI Step',
1818
description:
19-
'Ask AI a question or transform input using an LLM based on a prompt',
19+
'Transform an input into a desired output through an AI analysis',
2020
name: 'analyze',
2121
auth: aiAuth,
2222
isWriteAction: false,

packages/blocks/ai/test/askAi-action.test.ts renamed to packages/blocks/ai/test/ai-step-action.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jest.mock('ai', () => ({
1313

1414
import { AiProviderEnum, analysisLLMSchema } from '@openops/shared';
1515
import { generateObject, generateText } from 'ai';
16-
import { askAi } from '../src/lib/actions/askAi';
16+
import { aiStep } from '../src/lib/actions/ai-step';
1717

1818
describe('analyze action', () => {
1919
beforeEach(() => {
2020
jest.clearAllMocks();
2121
});
2222

2323
test('should expose correct props', () => {
24-
expect(askAi.props).toMatchObject({
24+
expect(aiStep.props).toMatchObject({
2525
model: {
2626
type: 'DYNAMIC',
2727
displayName: 'Model',
@@ -59,7 +59,7 @@ describe('analyze action', () => {
5959

6060
const context = createContext(auth, { prompt: 'Hello' });
6161

62-
const result = await askAi.run(context as any);
62+
const result = await aiStep.run(context as any);
6363

6464
expect(generateObject).toHaveBeenCalledWith(
6565
expect.objectContaining({
@@ -100,7 +100,7 @@ describe('analyze action', () => {
100100
additionalInput: ['s1', 's2'],
101101
});
102102

103-
const result = await askAi.run(context as any);
103+
const result = await aiStep.run(context as any);
104104

105105
expect(generateObject).toHaveBeenCalledTimes(1);
106106
const args = (generateObject as jest.Mock).mock.calls[0][0];
@@ -134,7 +134,7 @@ describe('analyze action', () => {
134134

135135
const context = createContext(auth, { prompt: 'Hi' });
136136

137-
const result = await askAi.run(context as any);
137+
const result = await aiStep.run(context as any);
138138

139139
expect(getAiProviderLanguageModel).toHaveBeenCalledWith({
140140
provider: AiProviderEnum.OPENAI,
@@ -174,7 +174,7 @@ describe('analyze action', () => {
174174
model: { model: 'gpt-from-props' },
175175
});
176176

177-
const result = await askAi.run(context as any);
177+
const result = await aiStep.run(context as any);
178178

179179
expect(getAiProviderLanguageModel).toHaveBeenCalledWith({
180180
provider: AiProviderEnum.OPENAI,
@@ -217,7 +217,7 @@ describe('analyze action', () => {
217217
const context = createContext(auth, { prompt: 'P' });
218218

219219
isLLMTelemetryEnabled.mockReturnValueOnce(isLLMTelemetryEnabledValue);
220-
await askAi.run(context as any);
220+
await aiStep.run(context as any);
221221

222222
expect(generateObject).toHaveBeenCalledWith(
223223
expect.objectContaining({
@@ -247,7 +247,7 @@ describe('analyze action', () => {
247247

248248
const context = createContext(auth, { prompt: 'Q' });
249249

250-
const result = await askAi.run(context as any);
250+
const result = await aiStep.run(context as any);
251251

252252
expect(generateText).toHaveBeenCalledWith(
253253
expect.objectContaining({ model: 'lm', prompt: 'Q' }),

0 commit comments

Comments
 (0)