Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "Nebenchat",
"23be753133ae6950": "Thread",
"0001ae5846061bb6": "Thread auf {machine}",
"2cf76789768b6dd2": "Rechner dieses Threads",
"eef7f4dacbc3c3f2": "Rechner",
"422ced5cda40580e": "Basis-Branch fetchen",
"47e6147265a28164": "Dateien auschecken",
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "Side chat",
"23be753133ae6950": "Thread",
"0001ae5846061bb6": "Thread on {machine}",
"2cf76789768b6dd2": "This thread's machine",
"eef7f4dacbc3c3f2": "Machine",
"422ced5cda40580e": "Fetch base branch",
"47e6147265a28164": "Check out files",
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "Chat lateral",
"23be753133ae6950": "Hilo",
"0001ae5846061bb6": "Hilo en {machine}",
"2cf76789768b6dd2": "Máquina de este hilo",
"eef7f4dacbc3c3f2": "Máquina",
"422ced5cda40580e": "Obtener la rama base",
"47e6147265a28164": "Hacer checkout de archivos",
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "Discussion annexe",
"23be753133ae6950": "Fil",
"0001ae5846061bb6": "Fil sur {machine}",
"2cf76789768b6dd2": "Machine de ce fil",
"eef7f4dacbc3c3f2": "Machine",
"422ced5cda40580e": "Récupérer la branche de base",
"47e6147265a28164": "Extraire les fichiers",
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "サイドチャット",
"23be753133ae6950": "スレッド",
"0001ae5846061bb6": "{machine} 上のスレッド",
"2cf76789768b6dd2": "このスレッドのマシン",
"eef7f4dacbc3c3f2": "マシン",
"422ced5cda40580e": "ベースブランチをフェッチ",
"47e6147265a28164": "ファイルをチェックアウト",
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "사이드 채팅",
"23be753133ae6950": "스레드",
"0001ae5846061bb6": "{machine}의 스레드",
"2cf76789768b6dd2": "이 스레드의 머신",
"eef7f4dacbc3c3f2": "머신",
"422ced5cda40580e": "기준 브랜치 가져오기",
"47e6147265a28164": "파일 체크아웃",
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "Chat paralelo",
"23be753133ae6950": "Thread",
"0001ae5846061bb6": "Thread em {machine}",
"2cf76789768b6dd2": "Máquina desta thread",
"eef7f4dacbc3c3f2": "Máquina",
"422ced5cda40580e": "Buscar o branch base",
"47e6147265a28164": "Fazer checkout dos arquivos",
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "Боковой чат",
"23be753133ae6950": "Тред",
"0001ae5846061bb6": "Тред на {machine}",
"2cf76789768b6dd2": "Машина этого треда",
"eef7f4dacbc3c3f2": "Машина",
"422ced5cda40580e": "Получение базовой ветки",
"47e6147265a28164": "Извлечение файлов",
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "Sidochatt",
"23be753133ae6950": "Tråd",
"0001ae5846061bb6": "Tråd på {machine}",
"2cf76789768b6dd2": "Den här trådens dator",
"eef7f4dacbc3c3f2": "Dator",
"422ced5cda40580e": "Hämta basgren",
"47e6147265a28164": "Checka ut filer",
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "侧聊",
"23be753133ae6950": "会话",
"0001ae5846061bb6": "{machine} 上的会话",
"2cf76789768b6dd2": "此会话的机器",
"eef7f4dacbc3c3f2": "机器",
"422ced5cda40580e": "获取基准分支",
"47e6147265a28164": "检出文件",
Expand Down
5 changes: 5 additions & 0 deletions apps/server/src/peer/PeerLinkRequests.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,11 @@ it.live("naming a machine that is already linked returns the link at once, with
// Not both: the address could name another machine than the id.
const both = yield* a.call({ environmentId: box.environmentId, url: b.url });
expect(errorOf(both)).toMatchObject({ code: "invalid_request" });

// A mention can name the machine the agent runs on, which has nothing to link.
const own = yield* a.call({ environmentId: laptop.environmentId });
expect(errorOf(own)).toMatchObject({ code: "invalid_request" });
expect(yield* cardOf(a)).toBeUndefined();
}),
),
);
Expand Down
6 changes: 6 additions & 0 deletions apps/server/src/peer/PeerLinkRequests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@ const make = Effect.gen(function* () {
"Pass either environmentId or url, not both. Pass neither to let the user pick the machine.",
});
}
if (input.environmentId === scope.environmentId) {
return yield* new OrchestratorMcpFailure({
code: "invalid_request",
message: "That is the machine you run on. Work here: it needs no link.",
});
}
// A machine already linked needs no card: the agent can use it now.
if (input.environmentId !== undefined) {
const linked = yield* usableLink(input.environmentId).pipe(
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "Nebenchat",
"23be753133ae6950": "Thread",
"0001ae5846061bb6": "Thread auf {machine}",
"2cf76789768b6dd2": "Rechner dieses Threads",
"eef7f4dacbc3c3f2": "Rechner",
"422ced5cda40580e": "Basis-Branch fetchen",
"47e6147265a28164": "Dateien auschecken",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "Side chat",
"23be753133ae6950": "Thread",
"0001ae5846061bb6": "Thread on {machine}",
"2cf76789768b6dd2": "This thread's machine",
"eef7f4dacbc3c3f2": "Machine",
"422ced5cda40580e": "Fetch base branch",
"47e6147265a28164": "Check out files",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "Chat lateral",
"23be753133ae6950": "Hilo",
"0001ae5846061bb6": "Hilo en {machine}",
"2cf76789768b6dd2": "Máquina de este hilo",
"eef7f4dacbc3c3f2": "Máquina",
"422ced5cda40580e": "Obtener la rama base",
"47e6147265a28164": "Hacer checkout de archivos",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "Discussion annexe",
"23be753133ae6950": "Fil",
"0001ae5846061bb6": "Fil sur {machine}",
"2cf76789768b6dd2": "Machine de ce fil",
"eef7f4dacbc3c3f2": "Machine",
"422ced5cda40580e": "Récupérer la branche de base",
"47e6147265a28164": "Extraire les fichiers",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "サイドチャット",
"23be753133ae6950": "スレッド",
"0001ae5846061bb6": "{machine} 上のスレッド",
"2cf76789768b6dd2": "このスレッドのマシン",
"eef7f4dacbc3c3f2": "マシン",
"422ced5cda40580e": "ベースブランチをフェッチ",
"47e6147265a28164": "ファイルをチェックアウト",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "사이드 채팅",
"23be753133ae6950": "스레드",
"0001ae5846061bb6": "{machine}의 스레드",
"2cf76789768b6dd2": "이 스레드의 머신",
"eef7f4dacbc3c3f2": "머신",
"422ced5cda40580e": "기준 브랜치 가져오기",
"47e6147265a28164": "파일 체크아웃",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "Chat paralelo",
"23be753133ae6950": "Thread",
"0001ae5846061bb6": "Thread em {machine}",
"2cf76789768b6dd2": "Máquina desta thread",
"eef7f4dacbc3c3f2": "Máquina",
"422ced5cda40580e": "Buscar o branch base",
"47e6147265a28164": "Fazer checkout dos arquivos",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "Боковой чат",
"23be753133ae6950": "Тред",
"0001ae5846061bb6": "Тред на {machine}",
"2cf76789768b6dd2": "Машина этого треда",
"eef7f4dacbc3c3f2": "Машина",
"422ced5cda40580e": "Получение базовой ветки",
"47e6147265a28164": "Извлечение файлов",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "Sidochatt",
"23be753133ae6950": "Tråd",
"0001ae5846061bb6": "Tråd på {machine}",
"2cf76789768b6dd2": "Den här trådens dator",
"eef7f4dacbc3c3f2": "Dator",
"422ced5cda40580e": "Hämta basgren",
"47e6147265a28164": "Checka ut filer",
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/i18n/translations/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"4bcfa3b976a421cf": "侧聊",
"23be753133ae6950": "会话",
"0001ae5846061bb6": "{machine} 上的会话",
"2cf76789768b6dd2": "此会话的机器",
"eef7f4dacbc3c3f2": "机器",
"422ced5cda40580e": "获取基准分支",
"47e6147265a28164": "检出文件",
Expand Down
13 changes: 11 additions & 2 deletions packages/client-runtime/src/composerThreadItems.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe("matchComposerEnvironmentItems", () => {
{ environmentId: EnvironmentId.make("env-mini"), label: "Mac mini", machine: "mac-mini" },
] as const;

it("offers the other machines matching the query, never the composer's own", () => {
it("offers the machines matching the query, naming the thread's own", () => {
expect(
matchComposerEnvironmentItems({
environments,
Expand All @@ -138,7 +138,16 @@ describe("matchComposerEnvironmentItems", () => {
environmentId: EnvironmentId.make("env-here"),
query: "lap",
}),
).toEqual([]);
).toEqual([
{
id: "environment:env-here",
type: "environment",
environmentId: "env-here",
machine: "laptop",
label: "Laptop",
description: "This thread's machine",
},
]);
expect(
matchComposerEnvironmentItems({
environments,
Expand Down
16 changes: 8 additions & 8 deletions packages/client-runtime/src/composerThreadItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ export interface ComposerEnvironmentItem {

/**
* The machines the `@` picker offers, so the agent can link or work there: the client's paired
* machines and those the composer's environment links to. The composer's own environment is
* left out. Like threads, they need a query: bare `@` stays a file picker.
* machines and those the composer's environment links to. That includes the thread's own
* machine, which the user may still want to name. Like threads, they need a query: bare `@`
* stays a file picker.
*/
export function matchComposerEnvironmentItems(
input: {
Expand All @@ -125,17 +126,16 @@ export function matchComposerEnvironmentItems(
machine: "server" as const,
})).filter((environment) => !paired.has(environment.environmentId));
return [...input.environments, ...linkedOnly]
.filter(
(environment) =>
environment.environmentId !== input.environmentId &&
environment.label.toLowerCase().includes(query),
)
.filter((environment) => environment.label.toLowerCase().includes(query))
.map((environment) => ({
id: `environment:${environment.environmentId}`,
type: "environment",
environmentId: environment.environmentId,
machine: environment.machine,
label: environment.label,
description: resolve(msg("Machine", { $context: "noun, search result type" })),
description:
environment.environmentId === input.environmentId
? resolve(msg("This thread's machine"))
: resolve(msg("Machine", { $context: "noun, search result type" })),
}));
}
2 changes: 1 addition & 1 deletion packages/shared/src/composerContextReferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ function formatComposerContextProviderPayload(record: KnownComposerContextRecord
return [
`label: ${record.label}`,
`environmentId: ${record.environmentId}`,
"The user means this machine. Not linked here yet: call t3_environment_link with this environmentId. Linked: pass it as environmentId, or target.environmentId for delegate_task.",
"The user means this machine. Not linked here yet: call t3_environment_link with this environmentId, which says so if it is the machine you run on. Linked: pass it as environmentId, or target.environmentId for delegate_task.",
].join("\n");
}
}
Expand Down
Loading