Skip to content

Commit 40bf386

Browse files
v0.5.0 (#42)
* Add incudeAlternativeAiToolFiles * Add jira webhook boilerplate * Update SWE agent to optionally take the path to the project, and switch to projectInfo.dev branch if available Remove redundant call to project.initialize script in SWE agent which is called in CodeEditingAgent Add Git.pull() * Add gemini-2.0-flash-thinking support * Fix Git.pull() * Move chat folder * Update ai sdk and add initial chat attachment support * Update Groq, Together and Vertex to extend AiLLM * Update version to 0.5.0 * Update anthropic sdk versions. Add pdf support for anthropic vertex * Log workflow agent duration * Update Cerebras to Llama 3.3 70b * Save input/output tokens in AiLLM * Save input/output tokens in AiLLM * feat: Add error handling with MatSnackBar in conversation component * Increase chat LLM selector min width * feat: Add PublicWeb.takeScreenshotAndLogs function and tidy up web.ts * Update web.test.ts * Update selectFilesAgent.ts * Update chat-routes.ts comment * Add Firework DeepSeek v3 support
1 parent c5c5d46 commit 40bf386

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2369
-2358
lines changed

frontend/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sophia/ui",
3-
"version": "0.4.0",
3+
"version": "0.5.0",
44
"description": "Sophia AI platform",
55
"author": "https://themeforest.net/user/srcn, Daniel Campagnoli, TrafficGuard Pty Ltd, and contributors",
66
"license": "https://themeforest.net/licenses/standard",

frontend/src/app/app.routes.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const appRoutes: Route[] = [
6464
]
6565
},
6666

67-
// Admin routes
67+
// Module routes
6868
{
6969
path: 'ui',
7070
canActivate: [AuthGuard],
@@ -74,9 +74,9 @@ export const appRoutes: Route[] = [
7474
initialData: initialDataResolver
7575
},
7676
children: [
77-
{path: 'example', loadChildren: () => import('app/modules/admin/home/home.routes')},
77+
//{path: 'example', loadChildren: () => import('app/modules/admin/home/home.routes')},
7878
{path: 'profile', loadChildren: () => import('app/modules/profile/profile.routes')},
79-
{path: 'chat', loadChildren: () => import('app/modules/admin/apps/chat/chat.routes')},
79+
{path: 'chat', loadChildren: () => import('app/modules/chat/chat.routes')},
8080
{path: 'agents', loadChildren: () => import('app/modules/agents/agent.routes')},
8181
{path: 'code-reviews', loadChildren: () => import('app/modules/code-review/code-review.routes')},
8282
{path: 'actions', loadChildren: () => import('app/modules/actions/actions.routes')},

frontend/src/app/modules/admin/apps/chat/chat.types.ts

-69
This file was deleted.
+224
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
// Types copied from the "ai" npm package so we don't need to install the entire package
2+
// filename is added to FilePart and ImagePart
3+
4+
export type AiMessage = CoreSystemMessage | CoreUserMessage | CoreAssistantMessage | CoreToolMessage;
5+
6+
type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
7+
type JSONObject = {
8+
[key: string]: JSONValue;
9+
};
10+
type JSONArray = JSONValue[];
11+
12+
type LanguageModelV1ProviderMetadata = Record<string, Record<string, JSONValue>>;
13+
type ProviderMetadata = LanguageModelV1ProviderMetadata;
14+
15+
/**
16+
Data content. Can either be a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer.
17+
*/
18+
type DataContent = string | Uint8Array | ArrayBuffer;
19+
20+
/**
21+
Text content part of a prompt. It contains a string of text.
22+
*/
23+
export interface TextPart {
24+
type: 'text';
25+
/**
26+
The text content.
27+
*/
28+
text: string;
29+
/**
30+
Additional provider-specific metadata. They are passed through
31+
to the provider from the AI SDK and enable provider-specific
32+
functionality that can be fully encapsulated in the provider.
33+
*/
34+
experimental_providerMetadata?: ProviderMetadata;
35+
}
36+
/**
37+
Image content part of a prompt. It contains an image.
38+
*/
39+
export interface ImagePart {
40+
type: 'image';
41+
/**
42+
Image data. Can either be:
43+
44+
- data: a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer
45+
- URL: a URL that points to the image
46+
*/
47+
image: DataContent | URL;
48+
/**
49+
Optional mime type of the image.
50+
*/
51+
mimeType?: string;
52+
/** File name */
53+
filename: string;
54+
/**
55+
Additional provider-specific metadata. They are passed through
56+
to the provider from the AI SDK and enable provider-specific
57+
functionality that can be fully encapsulated in the provider.
58+
*/
59+
experimental_providerMetadata?: ProviderMetadata;
60+
}
61+
/**
62+
File content part of a prompt. It contains a file.
63+
*/
64+
export interface FilePart {
65+
type: 'file';
66+
/**
67+
File data. Can either be:
68+
69+
- data: a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer
70+
- URL: a URL that points to the image
71+
*/
72+
data: DataContent | URL;
73+
/**
74+
Mime type of the file.
75+
*/
76+
mimeType: string;
77+
/** File name */
78+
filename: string;
79+
/**
80+
Additional provider-specific metadata. They are passed through
81+
to the provider from the AI SDK and enable provider-specific
82+
functionality that can be fully encapsulated in the provider.
83+
*/
84+
experimental_providerMetadata?: ProviderMetadata;
85+
}
86+
87+
type ToolResultContent = Array<{
88+
type: 'text';
89+
text: string;
90+
} | {
91+
type: 'image';
92+
data: string;
93+
mimeType?: string;
94+
}>;
95+
/**
96+
Tool call content part of a prompt. It contains a tool call (usually generated by the AI model).
97+
*/
98+
export interface ToolCallPart {
99+
type: 'tool-call';
100+
/**
101+
ID of the tool call. This ID is used to match the tool call with the tool result.
102+
*/
103+
toolCallId: string;
104+
/**
105+
Name of the tool that is being called.
106+
*/
107+
toolName: string;
108+
/**
109+
Arguments of the tool call. This is a JSON-serializable object that matches the tool's input schema.
110+
*/
111+
args: unknown;
112+
/**
113+
Additional provider-specific metadata. They are passed through
114+
to the provider from the AI SDK and enable provider-specific
115+
functionality that can be fully encapsulated in the provider.
116+
*/
117+
experimental_providerMetadata?: ProviderMetadata;
118+
}
119+
/**
120+
Tool result content part of a prompt. It contains the result of the tool call with the matching ID.
121+
*/
122+
interface ToolResultPart {
123+
type: 'tool-result';
124+
/**
125+
ID of the tool call that this result is associated with.
126+
*/
127+
toolCallId: string;
128+
/**
129+
Name of the tool that generated this result.
130+
*/
131+
toolName: string;
132+
/**
133+
Result of the tool call. This is a JSON-serializable object.
134+
*/
135+
result: unknown;
136+
/**
137+
Multi-part content of the tool result. Only for tools that support multipart results.
138+
*/
139+
experimental_content?: ToolResultContent;
140+
/**
141+
Optional flag if the result is an error or an error message.
142+
*/
143+
isError?: boolean;
144+
/**
145+
Additional provider-specific metadata. They are passed through
146+
to the provider from the AI SDK and enable provider-specific
147+
functionality that can be fully encapsulated in the provider.
148+
*/
149+
experimental_providerMetadata?: ProviderMetadata;
150+
}
151+
152+
/**
153+
A system message. It can contain system information.
154+
155+
Note: using the "system" part of the prompt is strongly preferred
156+
to increase the resilience against prompt injection attacks,
157+
and because not all providers support several system messages.
158+
*/
159+
type CoreSystemMessage = {
160+
role: 'system';
161+
content: string;
162+
/**
163+
Additional provider-specific metadata. They are passed through
164+
to the provider from the AI SDK and enable provider-specific
165+
functionality that can be fully encapsulated in the provider.
166+
*/
167+
experimental_providerMetadata?: ProviderMetadata;
168+
};
169+
/**
170+
A user message. It can contain text or a combination of text and images.
171+
*/
172+
type CoreUserMessage = {
173+
role: 'user';
174+
content: UserContent;
175+
/**
176+
Additional provider-specific metadata. They are passed through
177+
to the provider from the AI SDK and enable provider-specific
178+
functionality that can be fully encapsulated in the provider.
179+
*/
180+
experimental_providerMetadata?: ProviderMetadata;
181+
};
182+
/**
183+
Content of a user message. It can be a string or an array of text and image parts.
184+
*/
185+
type UserContent = string | Array<TextPart | ImagePart | FilePart>;
186+
/**
187+
An assistant message. It can contain text, tool calls, or a combination of text and tool calls.
188+
*/
189+
type CoreAssistantMessage = {
190+
role: 'assistant';
191+
content: AssistantContent;
192+
/**
193+
Additional provider-specific metadata. They are passed through
194+
to the provider from the AI SDK and enable provider-specific
195+
functionality that can be fully encapsulated in the provider.
196+
*/
197+
experimental_providerMetadata?: ProviderMetadata;
198+
};
199+
/**
200+
Content of an assistant message. It can be a string or an array of text and tool call parts.
201+
*/
202+
type AssistantContent = string | Array<TextPart | ToolCallPart>;
203+
/**
204+
A tool message. It contains the result of one or more tool calls.
205+
*/
206+
type CoreToolMessage = {
207+
role: 'tool';
208+
content: ToolContent;
209+
/**
210+
Additional provider-specific metadata. They are passed through
211+
to the provider from the AI SDK and enable provider-specific
212+
functionality that can be fully encapsulated in the provider.
213+
*/
214+
experimental_providerMetadata?: ProviderMetadata;
215+
};
216+
/**
217+
Content of a tool message. It is an array of tool result parts.
218+
*/
219+
type ToolContent = Array<ToolResultPart>;
220+
/**
221+
A message that can be used in the `messages` field of a prompt.
222+
It can be a user message, an assistant message, or a tool message.
223+
*/
224+
type CoreMessage = CoreSystemMessage | CoreUserMessage | CoreAssistantMessage | CoreToolMessage;

frontend/src/app/modules/admin/apps/chat/chat-info/chat-info.component.ts frontend/src/app/modules/chat/chat-info/chat-info.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
import { MatButtonModule } from '@angular/material/button';
88
import { MatIconModule } from '@angular/material/icon';
99
import { MatDrawer } from '@angular/material/sidenav';
10-
import { Chat } from 'app/modules/admin/apps/chat/chat.types';
10+
import { Chat } from 'app/modules/chat/chat.types';
1111

1212
@Component({
1313
selector: 'chat-info',

frontend/src/app/modules/admin/apps/chat/chat.routes.ts frontend/src/app/modules/chat/chat.routes.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import {
55
RouterStateSnapshot,
66
Routes,
77
} from '@angular/router';
8-
import { ChatComponent } from 'app/modules/admin/apps/chat/chat.component';
9-
import { ChatService } from 'app/modules/admin/apps/chat/chat.service';
10-
import { ChatsComponent } from 'app/modules/admin/apps/chat/chats/chats.component';
11-
import { ConversationComponent } from 'app/modules/admin/apps/chat/conversation/conversation.component';
12-
import { EmptyConversationComponent } from 'app/modules/admin/apps/chat/empty-conversation/empty-conversation.component';
8+
import { ChatComponent } from 'app/modules/chat/chat.component';
9+
import { ChatService } from 'app/modules/chat/chat.service';
10+
import { ChatsComponent } from 'app/modules/chat/chats/chats.component';
11+
import { ConversationComponent } from 'app/modules/chat/conversation/conversation.component';
12+
import { EmptyConversationComponent } from 'app/modules/chat/empty-conversation/empty-conversation.component';
1313
import { catchError, throwError } from 'rxjs';
1414

1515
/**

0 commit comments

Comments
 (0)