Skip to content

Commit 4095658

Browse files
committed
Merge branch 'dev'
2 parents 80491ef + b4f4d19 commit 4095658

21 files changed

Lines changed: 1527 additions & 726 deletions

File tree

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ WorkAny is a desktop AI agent application that executes tasks through natural la
4444

4545
[302.AI](https://302.ai/?utm_source=workany_github) is a pay-as-you-go AI application platform that offers the most comprehensive AI APIs and online applications available.
4646

47-
<a href='https://platform.minimax.io/subscribe/coding-plan?code=9hgHKlPO3G&source=link' target='_blank'>
48-
<img src="https://github.com/user-attachments/assets/1f925b1a-0a87-40f8-a82f-ae531181c80d" width="100%" alt="icon"/>
49-
</a>
50-
51-
[MiniMax-M2.1](https://platform.minimax.io/subscribe/coding-plan?code=9hgHKlPO3G&source=link) is an open-source SOTA model that excels at coding, navigating digital environments, and handling long, multi-step tasks. Click to get an exclusive 12% off the MiniMax Coding Plan.
52-
5347
> If you want to sponsor this project, please contact us via email: [hello@workany.ai](mailto:hello@workany.ai)
5448
5549
## Features

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "workany",
33
"private": true,
4-
"version": "0.1.18",
4+
"version": "0.1.19",
55
"type": "module",
66
"scripts": {
77
"ver": "./scripts/version.sh",

src-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "workany-api",
3-
"version": "0.1.18",
3+
"version": "0.1.19",
44
"type": "module",
55
"scripts": {
66
"dev": "node --import tsx --watch src/index.ts",

src-api/src/app/api/agent.ts

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
runExecutionPhase,
1111
runPlanningPhase,
1212
} from '@/shared/services/agent';
13-
import { runChat } from '@/shared/services/chat';
13+
import { generateTitle, runChat } from '@/shared/services/chat';
1414
import type { AgentRequest } from '@/shared/types/agent';
1515

1616
const agent = new Hono();
@@ -222,6 +222,30 @@ agent.post('/', async (c) => {
222222
return new Response(readable, { headers: SSE_HEADERS });
223223
});
224224

225+
// Generate a short title from a prompt
226+
agent.post('/title', async (c) => {
227+
const body = await c.req.json<{
228+
prompt: string;
229+
modelConfig?: { apiKey?: string; baseUrl?: string; model?: string };
230+
language?: string;
231+
}>();
232+
233+
console.log('[AgentAPI] POST /title received:', {
234+
promptLength: body.prompt?.length,
235+
promptPreview: body.prompt?.slice(0, 80),
236+
hasModelConfig: !!body.modelConfig,
237+
language: body.language,
238+
});
239+
240+
if (!body.prompt) {
241+
return c.json({ error: 'prompt is required' }, 400);
242+
}
243+
244+
const title = await generateTitle(body.prompt, body.modelConfig, body.language);
245+
console.log('[AgentAPI] POST /title result:', { title });
246+
return c.json({ title });
247+
});
248+
225249
// Stop a running agent
226250
agent.post('/stop/:sessionId', async (c) => {
227251
const sessionId = c.req.param('sessionId');

0 commit comments

Comments
 (0)