refactor: finish the microagent→skill rename in the frontend (#16672)

This commit is contained in:
Vasco Schiavo
2026-08-18 11:03:26 +02:00
committed by GitHub
parent c41bda23d6
commit 6dcc9f5b3e
33 changed files with 50 additions and 744 deletions
@@ -207,7 +207,7 @@ describe("ChatInterface - Chat Suggestions", () => {
role: "user",
content: [{ type: "text", text: "Hello" }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
};
@@ -348,7 +348,7 @@ describe("ChatInterface - Scroll-up loads older events", () => {
role: "user",
content: [{ type: "text", text: "Existing message" }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
};
useEventStore.setState({
@@ -485,7 +485,7 @@ describe("ChatInterface - Scroll-up loads older events", () => {
role: "user",
content: [{ type: "text", text: "Existing message" }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
};
useEventStore.setState({
@@ -35,7 +35,7 @@ const userMessage: MessageEvent = {
role: "user",
content: [{ type: "text", text: "Create a basic webpage." }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
};
@@ -164,7 +164,7 @@ describe("issue #1534 — streamed intermediate message duplication", () => {
role: "assistant",
content: [{ type: "text", text: THOUGHT }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
critic_result: {
score: 0.72,
@@ -202,7 +202,7 @@ describe("issue #1534 — streamed intermediate message duplication", () => {
role: "assistant",
content: [{ type: "text", text: THOUGHT }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
};
const allEvents = [userMessage, leadingWhitespaceDelta, finalMessage];
@@ -13,7 +13,7 @@ const makeMessageEvent = (
timestamp: "2024-01-01T00:00:00Z",
source: "user",
message: { role: "user", content: [{ type: "text", text: "test" }] },
activated_microagents: [],
activated_skills: [],
extended_content: [],
...overrides,
}) as MessageEvent;
@@ -21,7 +21,7 @@ const makeMessageEvent = (
describe("createSkillReadyEvent", () => {
it("includes _skillReadyItems with structured skill data", () => {
const event = makeMessageEvent({
activated_microagents: ["docker"],
activated_skills: ["docker"],
extended_content: [
{ type: "text", text: "<EXTRA_INFO>Docker guide</EXTRA_INFO>" },
],
@@ -37,7 +37,7 @@ describe("createSkillReadyEvent", () => {
it("sets correct id and source", () => {
const event = makeMessageEvent({
id: "msg-42",
activated_microagents: ["skill1"],
activated_skills: ["skill1"],
extended_content: [
{ type: "text", text: "<EXTRA_INFO>content</EXTRA_INFO>" },
],
@@ -62,7 +62,7 @@ describe("createSkillReadyEvent", () => {
describe("isSkillReadyEvent", () => {
it("returns true for valid SkillReadyEvent", () => {
const event = makeMessageEvent({
activated_microagents: ["skill1"],
activated_skills: ["skill1"],
extended_content: [
{ type: "text", text: "<EXTRA_INFO>content</EXTRA_INFO>" },
],
@@ -84,7 +84,7 @@ const makeUserMessage = (id: string): MessageEvent => ({
role: "user",
content: [{ type: "text", text: "hi" }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
});
@@ -20,7 +20,7 @@ const createUserMessageEvent = (id: string): MessageEvent => ({
role: "user",
content: [{ type: "text", text: "User message" }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
});
@@ -22,6 +22,7 @@ const makeItem = (
skill: {
name,
type: "agentskills" as const,
source: null,
content,
triggers: [command],
},
@@ -83,7 +83,7 @@ const makeAgentReply = (): MessageEvent => ({
timestamp: new Date(Date.now() + 1000).toISOString(),
source: "agent",
llm_message: { role: "assistant", content: [{ type: "text", text: "Hi!" }] },
activated_microagents: [],
activated_skills: [],
extended_content: [],
});
@@ -54,7 +54,7 @@ const createUserMessageEvent = (id: string) => ({
role: "user" as const,
content: [{ type: "text" as const, text: "User message" }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
});
+1 -1
View File
@@ -15,7 +15,7 @@ function createUserMessage(id: string): MessageEvent {
role: "user",
content: [{ type: "text", text: `User message ${id}` }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
};
}
@@ -180,7 +180,7 @@ describe("useLoadOlderEvents", () => {
timestamp: "2024-05-01T00:00:00Z",
source: "user",
llm_message: { role: "user", content: [{ type: "text", text: "hi" }] },
activated_microagents: [],
activated_skills: [],
extended_content: [],
} as unknown as OpenHandsEvent;
const switchObs = {
+1 -1
View File
@@ -39,7 +39,7 @@ function createUserMessage(id: string): MessageEvent {
role: "user",
content: [{ type: "text", text: "Hello" }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
};
}
+1 -1
View File
@@ -17,7 +17,7 @@ const mockUserMessageEvent: MessageEvent = {
role: "user",
content: [{ type: "text", text: "Hello, world!" }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
};
+2 -2
View File
@@ -73,7 +73,7 @@ describe("handleEventForUI", () => {
role: "user",
content: [{ type: "text", text: "Hello, world!" }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
};
@@ -111,7 +111,7 @@ describe("handleEventForUI", () => {
role: "assistant",
content: [{ type: "text", text: "I'll start working on that. Done." }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
};
-23
View File
@@ -128,34 +128,11 @@ export interface InputMetadata {
description: string;
}
export interface Microagent {
name: string;
type: "repo" | "knowledge" | "agentskills";
content: string;
triggers: string[];
}
export interface GetMicroagentsResponse {
microagents: Microagent[];
}
export interface GetMicroagentPromptResponse {
status: string;
prompt: string;
}
export interface IOption<T> {
label: string;
value: T;
}
export interface MicroagentContentResponse {
content: string;
path: string;
git_provider: Provider;
triggers: string[];
}
export type GetFilesResponse = string[];
export interface GetFileResponse {
@@ -35,12 +35,7 @@ export const isSkillReadyEvent = (event: unknown): event is SkillReadyEvent =>
export const createSkillReadyEvent = (
userEvent: MessageEvent,
): SkillReadyEvent => {
// Support both activated_skills and activated_microagents field names
const activatedSkills =
(userEvent as unknown as { activated_skills?: string[] })
.activated_skills ||
userEvent.activated_microagents ||
[];
const activatedSkills = userEvent.activated_skills || [];
const extendedContent = userEvent.extended_content || [];
@@ -55,14 +55,8 @@ interface EventMessageProps {
suppressThought?: boolean;
}
/**
* Extracts activated skills from a MessageEvent, supporting both
* activated_skills and activated_microagents field names.
*/
const getActivatedSkills = (event: MessageEvent): string[] =>
(event as unknown as { activated_skills?: string[] }).activated_skills ||
event.activated_microagents ||
[];
event.activated_skills || [];
/**
* Checks if extended content contains valid text content.
@@ -8,9 +8,6 @@ import { ThoughtEventMessage } from "./event-message-components/thought-event-me
import { useModelStore } from "#/stores/model-store";
import { ModelMessages } from "#/components/features/chat/model-messages";
import { useOptionalConversationId } from "#/hooks/use-conversation-id";
// TODO: Implement microagent functionality for V1 when APIs support V1 event IDs
// import { AgentState } from "#/types/agent-state";
// import MemoryIcon from "#/icons/memory_icon.svg?react";
interface MessagesProps {
messages: OpenHandsEvent[]; // UI events (actions replaced by observations)
+1 -1
View File
@@ -56,7 +56,7 @@ function createMessage(
role,
content: [{ type: "text", text }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
};
}
+1 -1
View File
@@ -37,7 +37,7 @@ function createTableDemoMessageEvent(
role,
content: [{ type: "text", text }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
};
}
+2 -2
View File
@@ -1,13 +1,12 @@
import { useState, useCallback, useEffect, useMemo, useRef } from "react";
import { useConversationSkills } from "#/hooks/query/use-conversation-skills";
import { SkillInfo } from "#/types/settings";
import { Microagent } from "#/api/open-hands.types";
import { BUILT_IN_COMMANDS, MODEL_COMMAND } from "#/utils/constants";
import { useActiveBackend } from "#/contexts/active-backend-context";
import { useLlmProfiles } from "#/hooks/query/use-llm-profiles";
import { formatModelNameForDisplay } from "#/utils/format-model-name";
export type SlashCommandSkill = SkillInfo | Microagent;
export type SlashCommandSkill = SkillInfo;
export interface SlashCommandItem {
skill: SlashCommandSkill;
@@ -88,6 +87,7 @@ export const useSlashCommand = (
skill: {
name: profile.name,
type: "agentskills",
source: null,
content: profile.model
? `Switch to ${formatModelNameForDisplay(profile.model)}`
: "Switch to this LLM profile",
-510
View File
@@ -390,142 +390,6 @@
"uk": "Як створити токен Azure DevOps",
"ca": "Com crear un token d'Azure DevOps"
},
"MICROAGENT$NO_REPOSITORY_FOUND": {
"en": "No repository found to launch microagent",
"ja": "マイクロエージェントを起動するためのリポジトリが見つかりません",
"zh-CN": "未找到启动微代理的存储库",
"zh-TW": "未找到啟動微代理的存儲庫",
"ko-KR": "마이크로에이전트를 시작할 저장소를 찾을 수 없습니다",
"no": "Ingen repository funnet for å starte mikroagent",
"it": "Nessun repository trovato per avviare il microagente",
"pt": "Nenhum repositório encontrado para iniciar o microagente",
"es": "No se encontró ningún repositorio para iniciar el microagente",
"ar": "لم يتم العثور على مستودع لإطلاق الوكيل المصغر",
"fr": "Aucun dépôt trouvé pour lancer le micro-agent",
"tr": "Mikro ajanı başlatmak için depo bulunamadı",
"de": "Kein Repository gefunden, um Microagent zu starten",
"uk": "Не знайдено репозиторій для запуску мікроагента",
"ca": "No s'ha trobat cap repositori per llançar el microagent"
},
"MICROAGENT$ADD_TO_MICROAGENT": {
"en": "Add to Microagent",
"ja": "マイクロエージェントに追加",
"zh-CN": "添加到微代理",
"zh-TW": "添加到微代理",
"ko-KR": "마이크로에이전트에 추가",
"no": "Legg til i mikroagent",
"it": "Aggiungi al microagente",
"pt": "Adicionar ao microagente",
"es": "Añadir al microagente",
"ar": "إضافة إلى الوكيل المصغر",
"fr": "Ajouter au micro-agent",
"tr": "Mikro ajana ekle",
"de": "Zum Microagent hinzufügen",
"uk": "Додати до мікроагента",
"ca": "Afegeix al Microagent"
},
"MICROAGENT$WHAT_TO_ADD": {
"en": "What would you like to add to the Microagent?",
"ja": "マイクロエージェントに何を追加しますか?",
"zh-CN": "您想添加什么到微代理?",
"zh-TW": "您想添加什麼到微代理?",
"ko-KR": "마이크로에이전트에 무엇을 추가하시겠습니까?",
"no": "Hva vil du legge til i mikroagenten?",
"it": "Cosa vorresti aggiungere al microagente?",
"pt": "O que você gostaria de adicionar ao microagente?",
"es": "¿Qué te gustaría añadir al microagente?",
"ar": "ماذا تريد أن تضيف إلى الوكيل المصغر؟",
"fr": "Que souhaitez-vous ajouter au micro-agent ?",
"tr": "Mikro ajana ne eklemek istersiniz?",
"de": "Was möchten Sie zum Microagent hinzufügen?",
"uk": "Що ви хочете додати до мікроагента?",
"ca": "Què vols afegir al Microagent?"
},
"MICROAGENT$WHERE_TO_PUT": {
"en": "Where should we put it?",
"ja": "どこに配置しますか?",
"zh-CN": "我们应该把它放在哪里?",
"zh-TW": "我們應該把它放在哪裡?",
"ko-KR": "어디에 넣을까요?",
"no": "Hvor skal vi plassere det?",
"it": "Dove dovremmo metterlo?",
"pt": "Onde devemos colocá-lo?",
"es": "¿Dónde deberíamos ponerlo?",
"ar": "أين يجب أن نضعه؟",
"fr": "Où devons-nous le mettre ?",
"tr": "Nereye koyalım?",
"de": "Wo sollen wir es platzieren?",
"uk": "Куди ми повинні його помістити?",
"ca": "On ho hem de posar?"
},
"MICROAGENT$ADD_TRIGGER": {
"en": "Add a trigger for the microagent",
"ja": "マイクロエージェントのトリガーを追加",
"zh-CN": "为微代理添加触发器",
"zh-TW": "為微代理添加觸發器",
"ko-KR": "마이크로에이전트의 트리거 추가",
"no": "Legg til en utløser for mikroagenten",
"it": "Aggiungi un trigger per il microagente",
"pt": "Adicionar um gatilho para o microagente",
"es": "Añadir un disparador para el microagente",
"ar": "إضافة مشغل للوكيل المصغر",
"fr": "Ajouter un déclencheur pour le micro-agent",
"tr": "Mikro ajan için bir tetikleyici ekleyin",
"de": "Fügen Sie einen Auslöser für den Microagent hinzu",
"uk": "Додати тригер для мікроагента",
"ca": "Afegeix un disparador per al microagent"
},
"MICROAGENT$WHAT_TO_REMEMBER": {
"en": "What would you like your microagent to remember?",
"ja": "マイクロエージェントに何を覚えさせたいですか?",
"zh-CN": "您希望您的微代理记住什么?",
"zh-TW": "您希望您的微代理記住什麼?",
"ko-KR": "마이크로에이전트가 무엇을 기억하기를 원하시나요?",
"no": "Hva vil du at mikroagenten din skal huske?",
"it": "Cosa vorresti che il tuo microagente ricordasse?",
"pt": "O que você gostaria que seu microagente lembrasse?",
"es": "¿Qué te gustaría que tu microagente recordara?",
"ar": "ماذا تريد أن يتذكر وكيلك المصغر؟",
"fr": "Que souhaitez-vous que votre micro-agent se souvienne ?",
"tr": "Mikro ajanınızın neyi hatırlamasını istersiniz?",
"de": "Was soll sich Ihr Microagent merken?",
"uk": "Що ви хочете, щоб ваш мікроагент запам'ятав?",
"ca": "Què vols que el teu microagent recordi?"
},
"MICROAGENT$ADD_TRIGGERS": {
"en": "Add triggers for the microagent",
"ja": "マイクロエージェントのトリガーを追加",
"zh-CN": "为微代理添加触发器",
"zh-TW": "為微代理添加觸發器",
"ko-KR": "마이크로에이전트의 트리거 추가",
"no": "Legg til utløsere for mikroagenten",
"it": "Aggiungi trigger per il microagente",
"pt": "Adicionar gatilhos para o microagente",
"es": "Añadir disparadores para el microagente",
"ar": "إضافة مشغلات للوكيل المصغر",
"fr": "Ajouter des déclencheurs pour le micro-agent",
"tr": "Mikro ajan için tetikleyiciler ekleyin",
"de": "Auslöser für den Microagent hinzufügen",
"uk": "Додати тригери для мікроагента",
"ca": "Afegeix disparadors per al microagent"
},
"MICROAGENT$WAIT_FOR_RUNTIME": {
"en": "Please wait for the runtime to be active.",
"ja": "ランタイムがアクティブになるまでお待ちください。",
"zh-CN": "请等待运行时激活。",
"zh-TW": "請等待運行時激活。",
"ko-KR": "런타임이 활성화될 때까지 기다려주세요.",
"no": "Vennligst vent til kjøretidsmiljøet er aktivt.",
"it": "Attendere che il runtime sia attivo.",
"pt": "Aguarde até que o tempo de execução esteja ativo.",
"es": "Por favor, espere a que el tiempo de ejecución esté activo.",
"ar": "يرجى الانتظار حتى يصبح وقت التشغيل نشطًا.",
"fr": "Veuillez attendre que le runtime soit actif.",
"tr": "Lütfen çalışma zamanının aktif olmasını bekleyin.",
"de": "Bitte warten Sie, bis die Laufzeitumgebung aktiv ist.",
"uk": "Будь ласка, зачекайте, поки середовище виконання стане активним.",
"ca": "Espereu que l'entorn d'execució estigui actiu."
},
"FORGEJO$TOKEN_LABEL": {
"en": "Forgejo Personal Access Token",
"ja": "Forgejo 個人用アクセス トークン",
@@ -560,244 +424,6 @@
"uk": "Хост Forgejo (домен)",
"ca": "Servidor de Forgejo (domini)"
},
"MICROAGENT$ADDING_CONTEXT": {
"en": "OpenHands is adding this new context to your respository. We'll let you know when the pull request is ready.",
"ja": "OpenHandsはこの新しいコンテキストをあなたのリポジトリに追加しています。プルリクエストの準備ができたらお知らせします。",
"zh-CN": "OpenHands正在将此新上下文添加到您的存储库中。拉取请求准备好后,我们会通知您。",
"zh-TW": "OpenHands正在將此新上下文添加到您的存儲庫中。拉取請求準備好後,我們會通知您。",
"ko-KR": "OpenHands가 이 새로운 컨텍스트를 저장소에 추가하고 있습니다. 풀 리퀘스트가 준비되면 알려드리겠습니다.",
"no": "OpenHands legger til denne nye konteksten i ditt repository. Vi gir deg beskjed når pull-forespørselen er klar.",
"it": "OpenHands sta aggiungendo questo nuovo contesto al tuo repository. Ti faremo sapere quando la pull request sarà pronta.",
"pt": "OpenHands está adicionando este novo contexto ao seu repositório. Avisaremos quando o pull request estiver pronto.",
"es": "OpenHands está añadiendo este nuevo contexto a tu repositorio. Te avisaremos cuando la solicitud de extracción esté lista.",
"ar": "يقوم OpenHands بإضافة هذا السياق الجديد إلى مستودعك. سنعلمك عندما يكون طلب السحب جاهزًا.",
"fr": "OpenHands ajoute ce nouveau contexte à votre dépôt. Nous vous informerons lorsque la pull request sera prête.",
"tr": "OpenHands bu yeni bağlamı deponuza ekliyor. Çekme isteği hazır olduğunda size haber vereceğiz.",
"de": "OpenHands fügt diesen neuen Kontext zu Ihrem Repository hinzu. Wir informieren Sie, wenn der Pull Request bereit ist.",
"uk": "OpenHands додає цей новий контекст до вашого репозиторію. Ми повідомимо вас, коли запит на витягування буде готовий.",
"ca": "OpenHands està afegint aquest nou context al vostre repositori. Us avisarem quan la sol·licitud de canvis estigui preparada."
},
"MICROAGENT$VIEW_CONVERSATION": {
"en": "View Conversation",
"ja": "会話を表示",
"zh-CN": "查看对话",
"zh-TW": "查看對話",
"ko-KR": "대화 보기",
"no": "Vis samtale",
"it": "Visualizza conversazione",
"pt": "Ver conversa",
"es": "Ver conversación",
"ar": "عرض المحادثة",
"fr": "Voir la conversation",
"tr": "Konuşmayı Görüntüle",
"de": "Konversation anzeigen",
"uk": "Переглянути розмову",
"ca": "Veure la conversa"
},
"MICROAGENT$SUCCESS_PR_READY": {
"en": "Success! Your microagent pull request is ready.",
"ja": "成功!マイクロエージェントのプルリクエストの準備ができました。",
"zh-CN": "成功!您的微代理拉取请求已准备就绪。",
"zh-TW": "成功!您的微代理拉取請求已準備就緒。",
"ko-KR": "성공! 마이크로에이전트 풀 리퀘스트가 준비되었습니다.",
"no": "Suksess! Din mikroagent pull request er klar.",
"it": "Successo! La tua pull request del microagente è pronta.",
"pt": "Sucesso! Seu pull request de microagente está pronto.",
"es": "¡Éxito! Tu solicitud de extracción de microagente está lista.",
"ar": "نجاح! طلب سحب الوكيل المصغر الخاص بك جاهز.",
"fr": "Succès ! Votre pull request de micro-agent est prête.",
"tr": "Başarılı! Mikro ajan çekme isteğiniz hazır.",
"de": "Erfolg! Ihr Microagent Pull Request ist bereit.",
"uk": "Успіх! Ваш запит на витягування мікроагента готовий.",
"ca": "Fet! La sol·licitud de canvis del microagent està preparada."
},
"MICROAGENT$STATUS_CREATING": {
"en": "Modifying microagent...",
"ja": "マイクロエージェントを変更中...",
"zh-CN": "正在修改微代理...",
"zh-TW": "正在修改微代理...",
"ko-KR": "마이크로에이전트 수정 중...",
"no": "Endrer mikroagent...",
"it": "Modifica del microagente in corso...",
"pt": "Modificando microagente...",
"es": "Modificando microagente...",
"ar": "تعديل الوكيل المصغر...",
"fr": "Modification du micro-agent en cours...",
"tr": "Mikro ajan değiştiriliyor...",
"de": "Microagent wird geändert...",
"uk": "Зміна мікроагента...",
"ca": "Modificant el microagent..."
},
"MICROAGENT$STATUS_OPENING_PR": {
"en": "Opening PR",
"ja": "PRを開いています",
"zh-CN": "正在打开PR",
"zh-TW": "正在打開PR",
"ko-KR": "PR 열는 중",
"no": "Åpner PR",
"it": "Apertura PR",
"pt": "Abrindo PR",
"es": "Abriendo PR",
"ar": "فتح PR",
"fr": "Ouverture de la PR",
"tr": "PR açılıyor",
"de": "PR wird geöffnet",
"uk": "Відкриття PR",
"ca": "Obrint la PR"
},
"MICROAGENT$STATUS_COMPLETED": {
"en": "View microagent update",
"ja": "マイクロエージェントの更新を表示",
"zh-CN": "查看微代理更新",
"zh-TW": "查看微代理更新",
"ko-KR": "마이크로에이전트 업데이트 보기",
"no": "Vis mikroagent oppdatering",
"it": "Visualizza aggiornamento microagente",
"pt": "Ver atualização do microagente",
"es": "Ver actualización del microagente",
"ar": "عرض تحديث الوكيل المصغر",
"fr": "Voir la mise à jour du micro-agent",
"tr": "Mikro ajan güncellemesini görüntüle",
"de": "Microagent-Update anzeigen",
"uk": "Переглянути оновлення мікроагента",
"ca": "Veure l'actualització del microagent"
},
"MICROAGENT$STATUS_ERROR": {
"en": "Microagent encountered an error",
"ja": "マイクロエージェントでエラーが発生しました",
"zh-CN": "微代理遇到错误",
"zh-TW": "微代理遇到錯誤",
"ko-KR": "마이크로에이전트에서 오류가 발생했습니다",
"no": "Mikroagent støtte på en feil",
"it": "Il microagente ha riscontrato un errore",
"pt": "Microagente encontrou um erro",
"es": "El microagente encontró un error",
"ar": "واجه الوكيل المصغر خطأ",
"fr": "Le micro-agent a rencontré une erreur",
"tr": "Mikro ajan bir hatayla karşılaştı",
"de": "Microagent ist auf einen Fehler gestoßen",
"uk": "Мікроагент зіткнувся з помилкою",
"ca": "El microagent ha trobat un error"
},
"MICROAGENT$VIEW_YOUR_PR": {
"en": "View your PR",
"ja": "PRを表示",
"zh-CN": "查看您的PR",
"zh-TW": "查看您的PR",
"ko-KR": "PR 보기",
"no": "Se din PR",
"it": "Visualizza la tua PR",
"pt": "Ver seu PR",
"es": "Ver tu PR",
"ar": "عرض طلب السحب الخاص بك",
"fr": "Voir votre PR",
"tr": "PR'ınızı görüntüleyin",
"de": "Ihre PR anzeigen",
"uk": "Переглянути ваш PR",
"ca": "Veure la teva PR"
},
"MICROAGENT$DESCRIBE_WHAT_TO_ADD": {
"en": "Describe what you want to add to the Microagent...",
"ja": "マイクロエージェントに追加したい内容を説明してください...",
"zh-CN": "描述您想添加到微代理的内容...",
"zh-TW": "描述您想添加到微代理的內容...",
"ko-KR": "마이크로에이전트에 추가하고 싶은 내용을 설명하세요...",
"no": "Beskriv hva du vil legge til i mikroagenten...",
"it": "Descrivi cosa vuoi aggiungere al microagente...",
"pt": "Descreva o que você deseja adicionar ao microagente...",
"es": "Describe lo que quieres añadir al microagente...",
"ar": "صف ما تريد إضافته إلى الوكيل المصغر...",
"fr": "Décrivez ce que vous souhaitez ajouter au micro-agent...",
"tr": "Mikro ajana eklemek istediğinizi açıklayın...",
"de": "Beschreiben Sie, was Sie zum Microagent hinzufügen möchten...",
"uk": "Опишіть, що ви хочете додати до мікроагента...",
"ca": "Descriu el que vols afegir al Microagent..."
},
"MICROAGENT$SELECT_FILE_OR_CUSTOM": {
"en": "Select a microagent file or enter a custom value",
"ja": "マイクロエージェントファイルを選択するか、カスタム値を入力してください",
"zh-CN": "选择微代理文件或输入自定义值",
"zh-TW": "選擇微代理文件或輸入自定義值",
"ko-KR": "마이크로에이전트 파일을 선택하거나 사용자 지정 값을 입력하세요",
"no": "Velg en mikroagent-fil eller skriv inn en egendefinert verdi",
"it": "Seleziona un file microagente o inserisci un valore personalizzato",
"pt": "Selecione um arquivo de microagente ou insira um valor personalizado",
"es": "Selecciona un archivo de microagente o introduce un valor personalizado",
"ar": "حدد ملف وكيل مصغر أو أدخل قيمة مخصصة",
"fr": "Sélectionnez un fichier micro-agent ou entrez une valeur personnalisée",
"tr": "Bir mikro ajan dosyası seçin veya özel bir değer girin",
"de": "Wählen Sie eine Microagent-Datei aus oder geben Sie einen benutzerdefinierten Wert ein",
"uk": "Виберіть файл мікроагента або введіть власне значення",
"ca": "Selecciona un fitxer de microagent o introdueix un valor personalitzat"
},
"MICROAGENT$TYPE_TRIGGER_SPACE": {
"en": "Type a trigger and press Space to add it",
"ja": "トリガーを入力し、スペースキーを押して追加してください",
"zh-CN": "输入触发器并按空格键添加",
"zh-TW": "輸入觸發器並按空格鍵添加",
"ko-KR": "트리거를 입력하고 스페이스바를 눌러 추가하세요",
"no": "Skriv inn en utløser og trykk mellomrom for å legge den til",
"it": "Digita un trigger e premi Spazio per aggiungerlo",
"pt": "Digite um gatilho e pressione Espaço para adicioná-lo",
"es": "Escribe un disparador y pulsa Espacio para añadirlo",
"ar": "اكتب مشغلًا واضغط على المسافة لإضافته",
"fr": "Tapez un déclencheur et appuyez sur Espace pour l'ajouter",
"tr": "Bir tetikleyici yazın ve eklemek için Boşluk tuşuna basın",
"de": "Geben Sie einen Auslöser ein und drücken Sie die Leertaste, um ihn hinzuzufügen",
"uk": "Введіть тригер і натисніть пробіл, щоб додати його",
"ca": "Escriu un disparador i prem Espai per afegir-lo"
},
"MICROAGENT$LOADING_PROMPT": {
"en": "Loading prompt...",
"ja": "プロンプトを読み込み中...",
"zh-CN": "加载提示中...",
"zh-TW": "加載提示中...",
"ko-KR": "프롬프트 로딩 중...",
"no": "Laster inn prompt...",
"it": "Caricamento prompt...",
"pt": "Carregando prompt...",
"es": "Cargando prompt...",
"ar": "جاري تحميل المطالبة...",
"fr": "Chargement du prompt...",
"tr": "İstem yükleniyor...",
"de": "Prompt wird geladen...",
"uk": "Завантаження підказки...",
"ca": "Carregant el missatge..."
},
"MICROAGENT$CANCEL": {
"en": "Cancel",
"ja": "キャンセル",
"zh-CN": "取消",
"zh-TW": "取消",
"ko-KR": "취소",
"no": "Avbryt",
"it": "Annulla",
"pt": "Cancelar",
"es": "Cancelar",
"ar": "إلغاء",
"fr": "Annuler",
"tr": "İptal",
"de": "Abbrechen",
"uk": "Скасувати",
"ca": "Cancel·la"
},
"MICROAGENT$LAUNCH": {
"en": "Launch",
"ja": "起動",
"zh-CN": "启动",
"zh-TW": "啟動",
"ko-KR": "시작",
"no": "Start",
"it": "Avvia",
"pt": "Iniciar",
"es": "Iniciar",
"ar": "إطلاق",
"fr": "Lancer",
"tr": "Başlat",
"de": "Starten",
"uk": "Запустити",
"ca": "Llança"
},
"STATUS$WEBSOCKET_CLOSED": {
"en": "The WebSocket connection was closed.",
"ja": "WebSocket接続が閉じられました。",
@@ -20603,23 +20229,6 @@
"uk": "Не вдалося отримати доступних мікроагентів",
"ca": "No s'han pogut obtenir els microagents disponibles"
},
"MICROAGENTS_MODAL$TITLE": {
"en": "Available Microagents",
"ja": "利用可能なマイクロエージェント",
"zh-CN": "可用微代理",
"zh-TW": "可用微代理",
"ko-KR": "사용 가능한 마이크로에이전트",
"no": "Tilgjengelige mikroagenter",
"ar": "الوكلاء المصغرين المتاحة",
"de": "Verfügbare Mikroagenten",
"fr": "Micro-agents disponibles",
"it": "Microagenti disponibili",
"pt": "Microagentes disponíveis",
"es": "Microagentes disponibles",
"tr": "Kullanılabilir mikro ajanlar",
"uk": "Доступні мікроагенти",
"ca": "Microagents disponibles"
},
"SKILLS_MODAL$WARNING": {
"en": "If you update the skills, you will need to stop the conversation and then click on the refresh button to see the changes.",
"ja": "スキルを更新する場合、会話を停止し、その後、更新ボタンをクリックして変更を反映させる必要があります。",
@@ -20654,40 +20263,6 @@
"uk": "Тригери",
"ca": "Disparadors"
},
"MICROAGENTS_MODAL$INPUTS": {
"en": "Inputs",
"ja": "入力",
"zh-CN": "输入",
"zh-TW": "輸入",
"ko-KR": "입력",
"no": "Inndata",
"ar": "المدخلات",
"de": "Eingaben",
"fr": "Entrées",
"it": "Input",
"pt": "Entradas",
"es": "Entradas",
"tr": "Girdiler",
"uk": "Вхідні дані",
"ca": "Entrades"
},
"MICROAGENTS_MODAL$TOOLS": {
"en": "Tools",
"ja": "ツール",
"zh-CN": "工具",
"zh-TW": "工具",
"ko-KR": "도구",
"no": "Verktøy",
"ar": "الأدوات",
"de": "Werkzeuge",
"fr": "Outils",
"it": "Strumenti",
"pt": "Ferramentas",
"es": "Herramientas",
"tr": "Araçlar",
"uk": "Інструменти",
"ca": "Eines"
},
"COMMON$PATH": {
"en": "Path:",
"ja": "パス:",
@@ -24054,57 +23629,6 @@
"uk": "A server with this URL already exists for the selected type",
"ca": "Les variables d'entorn han de seguir el format CLAU=valor"
},
"MICROAGENT$STATUS_WAITING": {
"en": "Waiting for runtime to start...",
"ja": "ランタイムの開始を待機中...",
"zh-CN": "等待运行时启动...",
"zh-TW": "等待運行時啟動...",
"ko-KR": "런타임 시작을 기다리는 중...",
"no": "Venter på at runtime skal starte...",
"it": "In attesa dell'avvio del runtime...",
"pt": "Aguardando o runtime iniciar...",
"es": "Esperando que inicie el runtime...",
"ar": "في انتظار بدء وقت التشغيل...",
"fr": "En attente du démarrage du runtime...",
"tr": "Çalışma zamanının başlaması bekleniyor...",
"de": "Warten auf den Start der Laufzeit...",
"uk": "Очікування запуску середовища виконання...",
"ca": "Esperant que l'entorn d'execució s'iniciï..."
},
"MICROAGENT$UNKNOWN_ERROR": {
"en": "Unknown error, please try again",
"ja": "不明なエラーです。もう一度お試しください",
"zh-CN": "未知错误,请重试",
"zh-TW": "未知錯誤,請重試",
"ko-KR": "알 수 없는 오류입니다. 다시 시도해 주세요",
"no": "Ukjent feil, vennligst prøv igjen",
"it": "Errore sconosciuto, riprova",
"pt": "Erro desconhecido, tente novamente",
"es": "Error desconocido, inténtalo de nuevo",
"ar": "خطأ غير معروف، يرجى المحاولة مرة أخرى",
"fr": "Erreur inconnue, veuillez réessayer",
"tr": "Bilinmeyen hata, lütfen tekrar deneyin",
"de": "Unbekannter Fehler, bitte versuchen Sie es erneut",
"uk": "Невідома помилка, спробуйте ще раз",
"ca": "Error desconegut, torneu-ho a intentar"
},
"MICROAGENT$CONVERSATION_STARTING": {
"en": "Starting conversation...",
"ja": "会話を開始しています...",
"zh-CN": "正在开始对话...",
"zh-TW": "正在開始對話...",
"ko-KR": "대화를 시작하는 중...",
"no": "Starter samtale...",
"it": "Avvio conversazione...",
"pt": "Iniciando conversa...",
"es": "Iniciando conversación...",
"ar": "بدء المحادثة...",
"fr": "Démarrage de la conversation...",
"tr": "Konuşma başlatılıyor...",
"de": "Gespräch wird gestartet...",
"uk": "Розпочинається розмова...",
"ca": "Iniciant la conversa..."
},
"SETTINGS$SECURITY_ANALYZER_LLM_DEFAULT": {
"en": "LLM Analyzer (Default)",
"ja": "LLMアナライザー(デフォルト)",
@@ -25839,40 +25363,6 @@
"uk": "Виводу термінала ще немає. Команди, які виконує агент, з’являться тут.",
"ca": "Encara no hi ha sortida de terminal. Les ordres executades per l'agent apareixeran aquí."
},
"MICROAGENT$DEFINITION": {
"en": "Microagents are specialized prompts that enhance OpenHands with domain-specific knowledge. They provide expert guidance, automate common tasks, and ensure consistent practices across projects.",
"ja": "マイクロエージェントは、OpenHandsにドメイン固有の知識を追加するための専門的なプロンプトです。専門的なガイダンスを提供し、一般的なタスクを自動化し、プロジェクト全体で一貫した実践を保証します。",
"zh-CN": "微代理是增强 OpenHands 领域知识的专用提示。它们提供专家指导,自动化常见任务,并确保项目中的一致实践。",
"zh-TW": "微代理是增強 OpenHands 領域知識的專用提示。它們提供專家指導,自動化常見任務,並確保專案中的一致實踐。",
"ko-KR": "마이크로에이전트는 OpenHands에 도메인별 지식을 추가하는 특화된 프롬프트입니다. 전문가의 안내를 제공하고, 일반적인 작업을 자동화하며, 프로젝트 전반에 걸쳐 일관된 관행을 보장합니다.",
"no": "Mikroagenter er spesialiserte prompt som forbedrer OpenHands med domenespesifikk kunnskap. De gir ekspertråd, automatiserer vanlige oppgaver og sikrer konsistente praksiser på tvers av prosjekter.",
"it": "I microagenti sono prompt specializzati che arricchiscono OpenHands con conoscenze specifiche di dominio. Forniscono guida esperta, automatizzano attività comuni e garantiscono pratiche coerenti tra i progetti.",
"pt": "Microagentes são prompts especializados que aprimoram o OpenHands com conhecimento específico de domínio. Eles fornecem orientação especializada, automatizam tarefas comuns e garantem práticas consistentes em todos os projetos.",
"es": "Los microagentes son prompts especializados que mejoran OpenHands con conocimientos específicos de dominio. Proporcionan orientación experta, automatizan tareas comunes y aseguran prácticas consistentes en los proyectos.",
"ar": "الميكرووكلاء هم مطالبات متخصصة تعزز OpenHands بمعرفة متخصصة في المجال. يقدمون إرشادات خبراء، ويؤتمتون المهام الشائعة، ويضمنون ممارسات متسقة عبر المشاريع.",
"fr": "Les microagents sont des invites spécialisées qui enrichissent OpenHands avec des connaissances spécifiques au domaine. Ils fournissent des conseils d'experts, automatisent les tâches courantes et garantissent des pratiques cohérentes dans les projets.",
"tr": "Mikro ajanlar, OpenHands'i alanına özgü bilgilerle geliştiren özel istemlerdir. Uzman rehberliği sağlar, yaygın görevleri otomatikleştirir ve projeler arasında tutarlı uygulamalar sunar.",
"de": "Microagents sind spezialisierte Prompts, die OpenHands mit domänenspezifischem Wissen erweitern. Sie bieten fachkundige Anleitung, automatisieren gängige Aufgaben und sorgen für konsistente Praktiken in Projekten.",
"uk": "Мікроагенти — це спеціалізовані підказки, які розширюють OpenHands галузевими знаннями. Вони надають експертні поради, автоматизують типові завдання та забезпечують послідовні практики у проєктах.",
"ca": "Els microagents són missatges especialitzats que milloren OpenHands amb coneixement específic del domini. Proporcionen orientació d'experts, automatitzen tasques habituals i garanteixen pràctiques coherents en tots els projectes."
},
"MICROAGENT$ADD_TO_MEMORY": {
"en": "Add to Microagent Memory",
"ja": "マイクロエージェントメモリに追加",
"zh-CN": "添加到微代理记忆",
"zh-TW": "加入微代理記憶體",
"ko-KR": "마이크로에이전트 메모리에 추가",
"no": "Legg til i mikroagentminne",
"it": "Aggiungi alla memoria del microagente",
"pt": "Adicionar à Memória do Microagente",
"es": "Agregar a la memoria del microagente",
"ar": "أضف إلى ذاكرة الميكرووكيل",
"fr": "Ajouter à la mémoire du microagent",
"tr": "Mikroajan Hafızasına Ekle",
"de": "Zur Microagent-Speicher hinzufügen",
"uk": "Додати до пам'яті мікроагента",
"ca": "Afegeix a la memòria del Microagent"
},
"COMMON$IN_PROGRESS": {
"en": "In Progress",
"ja": "進行中",
+1 -52
View File
@@ -5,7 +5,6 @@ import {
ExecutionStatus,
type OpenHandsEvent,
} from "#/types/agent-server/core";
import { GetMicroagentsResponse } from "#/api/open-hands.types";
import {
TABLE_DEMO_CONVERSATION_ID,
TABLE_DEMO_EVENTS,
@@ -141,7 +140,7 @@ function createPaginationEvent(
role: "assistant",
content: [{ type: "text", text: `${messagePrefix} ${index}` }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
};
}
@@ -476,54 +475,4 @@ export const CONVERSATION_HANDLERS = [
"/api/v1/conversations/:conversationId/pending-messages",
async () => HttpResponse.json({ id: "mock-pending-id", position: 0 }),
),
http.get("*/api/conversations/:conversationId/microagents", async () => {
const response: GetMicroagentsResponse = {
microagents: [
{
name: "init",
type: "agentskills",
content: "Initialize an AGENTS.md file for the repository",
triggers: ["/init"],
},
{
name: "releasenotes",
type: "agentskills",
content: "Generate a changelog from the most recent release",
triggers: ["/releasenotes"],
},
{
name: "test-runner",
type: "agentskills",
content: "Run the test suite and report results",
triggers: ["/test"],
},
{
name: "code-search",
type: "knowledge",
content: "Search the codebase semantically",
triggers: ["/search"],
},
{
name: "docker",
type: "agentskills",
content: "Docker usage guide for container environments",
triggers: ["docker", "container"],
},
{
name: "github",
type: "agentskills",
content: "GitHub API interaction guide",
triggers: ["github", "git"],
},
{
name: "work_hosts",
type: "repo",
content: "Available hosts for web applications",
triggers: [],
},
],
};
return HttpResponse.json(response);
}),
];
@@ -9,9 +9,9 @@ export interface MessageEvent extends BaseEvent {
llm_message: Message;
/**
* List of activated microagent names
* List of activated skill names
*/
activated_microagents: string[];
activated_skills: string[];
/**
* List of content added by agent context
+4
View File
@@ -50,6 +50,7 @@ export const BUILT_IN_COMMANDS: SlashCommandItem[] = [
skill: {
name: "new",
type: "agentskills",
source: null,
content: "Creates a new conversation using the same runtime",
triggers: ["/new"],
},
@@ -59,6 +60,7 @@ export const BUILT_IN_COMMANDS: SlashCommandItem[] = [
skill: {
name: "btw",
type: "agentskills",
source: null,
content: "Ask the agent a side question without derailing the main task",
triggers: [BTW_COMMAND],
},
@@ -68,6 +70,7 @@ export const BUILT_IN_COMMANDS: SlashCommandItem[] = [
skill: {
name: "model",
type: "agentskills",
source: null,
content:
"List saved LLM profiles, or switch the conversation LLM profile with /model <name>",
triggers: [MODEL_COMMAND],
@@ -78,6 +81,7 @@ export const BUILT_IN_COMMANDS: SlashCommandItem[] = [
skill: {
name: "goal",
type: "agentskills",
source: null,
content:
"Drive the agent toward an objective until a judge says it's done — /goal <objective> or /goal --max <n> <objective>",
triggers: [GOAL_COMMAND],
+1 -1
View File
@@ -209,7 +209,7 @@ const eventRendersReasoning = (event: OpenHandsEvent): boolean => {
// The final MessageEvent/FinishAction is authoritative for the turn's text. Drop
// the provisional streamed deltas and render the canonical final event instead,
// so the message is rendered exactly once (never holey or duplicated) and its
// metadata — critic_result, activated_microagents — renders too. Stream-only
// metadata — critic_result, activated_skills — renders too. Stream-only
// reasoning is preserved. Returns null when there is no streamed content to
// reconcile, leaving the caller to append the final event normally.
const finalizeStreamingDeltasInPlace = (
+4
View File
@@ -8,6 +8,10 @@ export const SKILL_SCOPE_ORDER: SkillScope[] = [
"public",
];
// `.openhands/microagents/` is the pre-rename skills directory. The SDK still
// loads skills from it for backward compatibility, so it keeps reporting those
// paths as a skill's `source` — this marker is what maps them to a scope.
// Dropping it would silently misfile legacy skills as "public".
const USER_SKILL_DIR_MARKERS = [
"/.agents/skills/",
"/.openhands/skills/",
+2 -2
View File
@@ -52,7 +52,7 @@ const userMessage: MessageEvent = {
role: "user",
content: [{ type: "text", text: "Please diagnose **the failure**." }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
};
@@ -64,7 +64,7 @@ const assistantMessage: MessageEvent = {
role: "assistant",
content: [{ type: "text", text: "The service is healthy now." }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
};
@@ -15,7 +15,7 @@ const makeMessage = (index: number): MessageEvent => ({
role: "user",
content: [{ type: "text", text: `Message ${index}` }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
});
-97
View File
@@ -308,75 +308,6 @@ export const constructPullRequestUrl = (
}
};
/**
* Construct the microagent URL for different providers
* @param gitProvider The git provider
* @param repositoryName The repository name in format "owner/repo"
* @param microagentPath The path to the microagent in the repository
* @returns The URL to the microagent file in the Git provider
*
* @example
* constructMicroagentUrl("github", "owner/repo", ".openhands/microagents/tell-me-a-joke.md")
* // "https://github.com/owner/repo/blob/main/.openhands/microagents/tell-me-a-joke.md"
* constructMicroagentUrl("gitlab", "owner/repo", "microagents/git-helper.md")
* // "https://gitlab.com/owner/repo/-/blob/main/microagents/git-helper.md"
* constructMicroagentUrl("bitbucket", "owner/repo", ".openhands/microagents/docker-helper.md")
* // "https://bitbucket.org/owner/repo/src/main/.openhands/microagents/docker-helper.md"
*/
export const constructMicroagentUrl = (
gitProvider: Provider,
repositoryName: string,
microagentPath: string,
host?: string | null,
): string => {
const baseUrl = getGitProviderBaseUrl(gitProvider, host);
switch (gitProvider) {
case "github":
return `${baseUrl}/${repositoryName}/blob/main/${microagentPath}`;
case "forgejo":
return `${baseUrl}/${repositoryName}/src/branch/main/${microagentPath}`;
case "gitlab":
return `${baseUrl}/${repositoryName}/-/blob/main/${microagentPath}`;
case "bitbucket":
return `${baseUrl}/${repositoryName}/src/main/${microagentPath}`;
case "bitbucket_data_center": {
const [project, repo] = repositoryName.split("/");
return `${baseUrl}/projects/${project}/repos/${repo}/browse/${microagentPath}?at=refs/heads/main`;
}
case "azure_devops": {
// Azure DevOps format: org/project/repo
const parts = repositoryName.split("/");
if (parts.length === 3) {
const [org, project, repo] = parts;
return `${baseUrl}/${org}/${project}/_git/${repo}?path=/${microagentPath}&version=GBmain`;
}
return "";
}
default:
return "";
}
};
/**
* Extract repository owner, repo name, and file path from repository and microagent data
* @param selectedRepository The selected repository object with full_name property
* @param microagent The microagent object with path property
* @returns Object containing owner, repo, and filePath
*
* @example
* const { owner, repo, filePath } = extractRepositoryInfo(selectedRepository, microagent);
*/
export const extractRepositoryInfo = (
selectedRepository: { full_name?: string } | null | undefined,
microagent: { path?: string } | null | undefined,
) => {
const [owner, repo] = selectedRepository?.full_name?.split("/") || [];
const filePath = microagent?.path || "";
return { owner, repo, filePath };
};
/**
* Construct the repository URL for different providers
* @param provider The git provider
@@ -555,34 +486,6 @@ export function getDisplayedTaskGroups(
return getLimitedTaskGroups(suggestedTasks, 3);
}
/**
* Get the repository markdown creation prompt with additional PR creation instructions
* @param gitProvider The git provider to use for generating provider-specific text
* @param query Optional custom query to use instead of the default prompt
* @returns The complete prompt for creating repository markdown and PR instructions
*/
export const getRepoMdCreatePrompt = (
gitProvider: Provider,
query?: string,
): string => {
const providerName = getProviderName(gitProvider);
const pr = getPR(gitProvider === "gitlab");
const prShort = getPRShort(gitProvider === "gitlab");
return `Please explore this repository. Create the file .openhands/microagents/repo.md with:
${
query
? `- ${query}`
: `- A description of the project
- An overview of the file structure
- Any information on how to run tests or other relevant commands
- Any other information that would be helpful to a brand new developer
Keep it short--just a few paragraphs will do.`
}
Please push the changes to your branch on ${providerName} and create a ${pr}. Please create a meaningful branch name that describes the changes. If a ${pr} template exists in the repository, please follow it when creating the ${prShort} description.`;
};
/**
* Get the label for a conversation status
* @param status The conversation status
+1 -1
View File
@@ -227,6 +227,6 @@ export const createUserMessageEvent = (id: string): MessageEvent => ({
role: "user",
content: [{ type: "text", text: "User message" }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
});
@@ -78,14 +78,12 @@ async function assertActivatedSkills(
const diag = items.map((item: unknown) => {
const e = item as Record<string, unknown>;
return `${String(e.source)}:${String(e.event_type)}(skills=${JSON.stringify(e.activated_skills ?? e.activated_microagents ?? [])})`;
return `${String(e.source)}:${String(e.event_type)}(skills=${JSON.stringify(e.activated_skills ?? [])})`;
});
const found = items.some((item: unknown) => {
const e = item as Record<string, unknown>;
const skills =
(e.activated_skills as string[] | undefined) ??
(e.activated_microagents as string[] | undefined);
const skills = e.activated_skills as string[] | undefined;
return Array.isArray(skills) && skills.length > 0;
});
@@ -158,7 +158,7 @@ function createCriticEvents(): CriticEvent[] {
role: "user",
content: [{ type: "text", text: "Please do the task." }],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
},
{
@@ -174,7 +174,7 @@ function createCriticEvents(): CriticEvent[] {
},
],
},
activated_microagents: [],
activated_skills: [],
extended_content: [],
critic_result: buildCriticResult(0.82, "critic-agent-message"),
},
@@ -236,9 +236,7 @@ test.describe("skill loading: project, user, and deletion", () => {
const body = (await resp.json()) as { items?: unknown[] };
for (const item of body.items ?? []) {
const e = item as Record<string, unknown>;
const skills =
(e.activated_skills as string[] | undefined) ??
(e.activated_microagents as string[] | undefined);
const skills = e.activated_skills as string[] | undefined;
if (skills?.includes(PROJECT_SKILL_NAME)) return "FOUND";
}
return "NOT_FOUND";
@@ -306,9 +304,7 @@ test.describe("skill loading: project, user, and deletion", () => {
const body = (await resp.json()) as { items?: unknown[] };
for (const item of body.items ?? []) {
const e = item as Record<string, unknown>;
const skills =
(e.activated_skills as string[] | undefined) ??
(e.activated_microagents as string[] | undefined);
const skills = e.activated_skills as string[] | undefined;
if (skills?.includes(USER_SKILL_NAME)) return "FOUND";
}
return "NOT_FOUND";
@@ -381,9 +377,7 @@ test.describe("skill loading: project, user, and deletion", () => {
for (const item of items) {
const e = item as Record<string, unknown>;
const skills =
(e.activated_skills as string[] | undefined) ??
(e.activated_microagents as string[] | undefined);
const skills = e.activated_skills as string[] | undefined;
if (skills?.includes(USER_SKILL_NAME))
return `UNEXPECTEDLY_FOUND`;
}