Skip to content

Commit d1e16e1

Browse files
committed
feat: add Kiro IDE to Open in editor picker
1 parent dcd2e5c commit d1e16e1

4 files changed

Lines changed: 45 additions & 2 deletions

File tree

apps/server/src/open.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ const LINE_COLUMN_SUFFIX_PATTERN = /:\d+(?::\d+)?$/;
4141

4242
function shouldUseGotoFlag(editorId: EditorId, target: string): boolean {
4343
return (
44-
(editorId === "cursor" || editorId === "vscode") && LINE_COLUMN_SUFFIX_PATTERN.test(target)
44+
(editorId === "cursor" || editorId === "vscode" || editorId === "kiro") &&
45+
LINE_COLUMN_SUFFIX_PATTERN.test(target)
4546
);
4647
}
4748

apps/web/src/components/Icons.tsx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,42 @@ export const Zed: Icon = (props) => {
137137
);
138138
};
139139

140+
export const KiroIcon: Icon = (props) => {
141+
const id = useId();
142+
const maskId = `${id}-kiro-mask`;
143+
144+
return (
145+
<svg {...props} viewBox="0 0 1200 1200" fill="none">
146+
<rect width="1200" height="1200" rx="260" fill="#9046FF" />
147+
<mask
148+
id={maskId}
149+
style={{ maskType: "luminance" }}
150+
maskUnits="userSpaceOnUse"
151+
x="272"
152+
y="202"
153+
width="655"
154+
height="796"
155+
>
156+
<path d="M926.578 202.793H272.637V997.857H926.578V202.793Z" fill="white" />
157+
</mask>
158+
<g mask={`url(#${maskId})`}>
159+
<path
160+
d="M398.554 818.914C316.315 1001.03 491.477 1046.74 620.672 940.156C658.687 1059.66 801.052 970.473 852.234 877.795C964.787 673.567 919.318 465.357 907.64 422.374C827.637 129.443 427.623 128.946 358.8 423.865C342.651 475.544 342.402 534.18 333.458 595.051C328.986 625.86 325.507 645.488 313.83 677.785C306.873 696.424 297.68 712.819 282.773 740.645C259.915 783.881 269.604 867.113 387.87 823.883L399.051 818.914H398.554Z"
161+
fill="white"
162+
/>
163+
<path
164+
d="M636.123 549.353C603.328 549.353 598.359 510.097 598.359 486.742C598.359 465.623 602.086 448.977 609.293 438.293C615.504 428.852 624.697 424.131 636.123 424.131C647.555 424.131 657.492 428.852 664.447 438.541C672.398 449.474 676.623 466.12 676.623 486.742C676.623 525.998 661.471 549.353 636.375 549.353H636.123Z"
165+
fill="#9046FF"
166+
/>
167+
<path
168+
d="M771.24 549.353C738.445 549.353 733.477 510.097 733.477 486.742C733.477 465.623 737.203 448.977 744.41 438.293C750.621 428.852 759.814 424.131 771.24 424.131C782.672 424.131 792.609 428.852 799.564 438.541C807.516 449.474 811.74 466.12 811.74 486.742C811.74 525.998 796.588 549.353 771.492 549.353H771.24Z"
169+
fill="#9046FF"
170+
/>
171+
</g>
172+
</svg>
173+
);
174+
};
175+
140176
export const OpenAI: Icon = (props) => (
141177
<svg {...props} preserveAspectRatio="xMidYMid" viewBox="0 0 256 260" fill="currentColor">
142178
<path d="M239.184 106.203a64.716 64.716 0 0 0-5.576-53.103C219.452 28.459 191 15.784 163.213 21.74A65.586 65.586 0 0 0 52.096 45.22a64.716 64.716 0 0 0-43.23 31.36c-14.31 24.602-11.061 55.634 8.033 76.74a64.665 64.665 0 0 0 5.525 53.102c14.174 24.65 42.644 37.324 70.446 31.36a64.72 64.72 0 0 0 48.754 21.744c28.481.025 53.714-18.361 62.414-45.481a64.767 64.767 0 0 0 43.229-31.36c14.137-24.558 10.875-55.423-8.083-76.483Zm-97.56 136.338a48.397 48.397 0 0 1-31.105-11.255l1.535-.87 51.67-29.825a8.595 8.595 0 0 0 4.247-7.367v-72.85l21.845 12.636c.218.111.37.32.409.563v60.367c-.056 26.818-21.783 48.545-48.601 48.601Zm-104.466-44.61a48.345 48.345 0 0 1-5.781-32.589l1.534.921 51.722 29.826a8.339 8.339 0 0 0 8.441 0l63.181-36.425v25.221a.87.87 0 0 1-.358.665l-52.335 30.184c-23.257 13.398-52.97 5.431-66.404-17.803ZM23.549 85.38a48.499 48.499 0 0 1 25.58-21.333v61.39a8.288 8.288 0 0 0 4.195 7.316l62.874 36.272-21.845 12.636a.819.819 0 0 1-.767 0L41.353 151.53c-23.211-13.454-31.171-43.144-17.804-66.405v.256Zm179.466 41.695-63.08-36.63L161.73 77.86a.819.819 0 0 1 .768 0l52.233 30.184a48.6 48.6 0 0 1-7.316 87.635v-61.391a8.544 8.544 0 0 0-4.4-7.213Zm21.742-32.69-1.535-.922-51.619-30.081a8.39 8.39 0 0 0-8.492 0L99.98 99.808V74.587a.716.716 0 0 1 .307-.665l52.233-30.133a48.652 48.652 0 0 1 72.236 50.391v.205ZM88.061 139.097l-21.845-12.585a.87.87 0 0 1-.41-.614V65.685a48.652 48.652 0 0 1 79.757-37.346l-1.535.87-51.67 29.825a8.595 8.595 0 0 0-4.246 7.367l-.051 72.697Zm11.868-25.58 28.138-16.217 28.188 16.218v32.434l-28.086 16.218-28.188-16.218-.052-32.434Z" />

apps/web/src/components/chat/OpenInPicker.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ChevronDownIcon, FolderClosedIcon } from "lucide-react";
66
import { Button } from "../ui/button";
77
import { Group, GroupSeparator } from "../ui/group";
88
import { Menu, MenuItem, MenuPopup, MenuShortcut, MenuTrigger } from "../ui/menu";
9-
import { CursorIcon, Icon, VisualStudioCode, Zed } from "../Icons";
9+
import { CursorIcon, Icon, KiroIcon, VisualStudioCode, Zed } from "../Icons";
1010
import { isMacPlatform, isWindowsPlatform } from "~/lib/utils";
1111
import { readNativeApi } from "~/nativeApi";
1212

@@ -22,6 +22,11 @@ const resolveOptions = (platform: string, availableEditors: ReadonlyArray<Editor
2222
Icon: VisualStudioCode,
2323
value: "vscode",
2424
},
25+
{
26+
label: "Kiro",
27+
Icon: KiroIcon,
28+
value: "kiro",
29+
},
2530
{
2631
label: "Zed",
2732
Icon: Zed,

packages/contracts/src/editor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { TrimmedNonEmptyString } from "./baseSchemas";
44
export const EDITORS = [
55
{ id: "cursor", label: "Cursor", command: "cursor" },
66
{ id: "vscode", label: "VS Code", command: "code" },
7+
{ id: "kiro", label: "Kiro", command: "kiro" },
78
{ id: "zed", label: "Zed", command: "zed" },
89
{ id: "file-manager", label: "File Manager", command: null },
910
] as const;

0 commit comments

Comments
 (0)