@ciridae/ui-agent 0.3.9 → 0.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- /* eslint-disable max-lines, max-lines-per-function, react/jsx-max-depth */
3
2
  import { CheckIcon, ChevronsUpDownIcon } from "lucide-react";
4
3
  import * as React from "react";
5
4
  import { AttachmentList, useAttachments, } from "./attachments.js";
@@ -196,7 +196,7 @@ function createMermaidMarkdown(code, meta) {
196
196
  return `${fence}${info}\n${code}\n${fence}`;
197
197
  }
198
198
  function getCodeLanguage(className) {
199
- const language = className?.match(/language-([^\s]+)/)?.[1];
199
+ const language = className?.match(/language-(\S+)/)?.[1];
200
200
  if (language && isBundledLanguage(language))
201
201
  return language;
202
202
  return "tsx";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- /* eslint-disable max-lines, react-refresh/only-export-components */
2
+ /* eslint-disable react-refresh/only-export-components */
3
3
  import { ChevronsUpDownIcon } from "lucide-react";
4
4
  import * as React from "react";
5
5
  import { Button } from "@ciridae/ui/button";
@@ -7,7 +7,7 @@ import { Command, CommandEmpty, CommandInput, CommandItem, CommandList } from "@
7
7
  import { Popover, PopoverContent, PopoverTrigger } from "@ciridae/ui/popover";
8
8
  import { cn } from "@ciridae/ui/utils";
9
9
  import { useControllableState } from "./use-controllable-state.js";
10
- const deviceIdRegex = /\(([\da-fA-F]{4}:[\da-fA-F]{4})\)$/;
10
+ const deviceIdRegex = /\(([\da-f]{4}:[\da-f]{4})\)$/i;
11
11
  const MicSelectorContext = React.createContext(null);
12
12
  function MicSelector({ children, defaultOpen = false, defaultValue, mics, onOpenChange, onValueChange, open: openProp, value: valueProp, ...props }) {
13
13
  const [value, setValue] = useControllableState({
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /* eslint-disable max-lines, react-refresh/only-export-components */
2
+ /* eslint-disable react-refresh/only-export-components */
3
3
  import { ArrowUpIcon, SquareIcon } from "lucide-react";
4
4
  import * as React from "react";
5
5
  export { AttachmentActionAddFiles as PromptInputActionAddAttachments, AttachmentActionAddScreenshot as PromptInputActionAddScreenshot, } from "./attachments.js";
@@ -63,10 +63,17 @@ function parseStackFrames(stack) {
63
63
  }
64
64
  function parseStackLine(line) {
65
65
  const trimmed = line.trim().replace(/^at\s+/, "");
66
- const match = /^(?:(.+?)\s+\()?(.+):(\d+):(\d+)\)?$/.exec(trimmed);
67
- if (!match)
66
+ const location = /:(\d+):(\d+)\)?$/.exec(trimmed);
67
+ if (!location)
68
68
  return null;
69
- return { column: match[4], file: match[2], line: match[3], method: match[1] };
69
+ const locationPrefix = trimmed.slice(0, location.index);
70
+ const methodSeparator = locationPrefix.lastIndexOf(" (");
71
+ return {
72
+ column: location[2],
73
+ file: methodSeparator === -1 ? locationPrefix : locationPrefix.slice(methodSeparator + 2),
74
+ line: location[1],
75
+ method: methodSeparator === -1 ? undefined : locationPrefix.slice(0, methodSeparator),
76
+ };
70
77
  }
71
78
  function formatLocation(frame) {
72
79
  if (!frame.line)
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- /* eslint-disable max-lines, react-refresh/only-export-components */
2
+ /* eslint-disable react-refresh/only-export-components */
3
3
  import { CircleSmallIcon, MarsIcon, PauseIcon, PlayIcon, TransgenderIcon, VenusAndMarsIcon, VenusIcon, } from "lucide-react";
4
4
  import * as React from "react";
5
5
  import { Button } from "@ciridae/ui/button";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ciridae/ui-agent",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "repository": {