@agimon-ai/po-computer-use 0.0.0-alpha.226 → 0.0.0-alpha.227

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,9 +1,9 @@
1
1
  import { createApiClient, defineActivityGroup, defineChannelFile, defineFill, defineNativePlugin, defineSessionStore, defineSettingsPanel, defineToolRenderer, sessionApiAddress, t, useT } from "@agimon-ai/po-core/native";
2
- import { useCallback, useEffect, useRef, useState, useSyncExternalStore } from "react";
2
+ import { createElement, useCallback, useEffect, useRef, useState, useSyncExternalStore } from "react";
3
3
  import { AppState } from "react-native";
4
4
  import { View } from "react-native-unistyles/components/native/View";
5
5
  import { Text } from "react-native-unistyles/components/native/Text";
6
- import { Badge, Button, CheckIcon, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, Panel, fontOf, toolTone } from "@agimon-ai/po-native-components";
6
+ import { Badge, Button, CheckIcon, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, MonitorIcon, Panel, fontOf, toolTone } from "@agimon-ai/po-native-components";
7
7
  import { StyleSheet } from "react-native-unistyles";
8
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
9
  //#region src/types/computerUseApi.ts
@@ -470,6 +470,7 @@ var computer_use_native_default$1 = defineActivityGroup({
470
470
  label: (t) => t("computerUse.activityGroup.label", "Computer use"),
471
471
  name: "computer-use",
472
472
  keys: "c e",
473
+ icon: () => createElement(MonitorIcon),
473
474
  statusKey: COMPUTER_USE_STATUS_KEY,
474
475
  hideWhenEmpty: true,
475
476
  marksBackgroundWork: false
@@ -515,7 +516,7 @@ function ComputerUseView({ state, error, onCancel, onStop }) {
515
516
  const t = useT();
516
517
  const pending = state.phase === "awaiting_confirmation" || state.phase === "activating";
517
518
  const active = state.phase === "active" || state.phase === "stopping";
518
- const failure = error ?? state.failure?.message;
519
+ const failure = error ?? (state.failure ? t("computerUse.ui.controlFailed", "Computer control could not continue.") : void 0);
519
520
  const expiresAt = state.phase === "active" ? state.expiresAt : void 0;
520
521
  const [now, setNow] = useState(Date.now);
521
522
  useEffect(() => {
@@ -530,14 +531,6 @@ function ComputerUseView({ state, error, onCancel, onStop }) {
530
531
  return /* @__PURE__ */ jsxs(View, {
531
532
  style: styles$4.panel,
532
533
  children: [
533
- /* @__PURE__ */ jsx(View, {
534
- style: styles$4.header,
535
- children: /* @__PURE__ */ jsx(Text, {
536
- style: styles$4.title,
537
- accessibilityRole: "header",
538
- children: t("computerUse.ui.computerUseText", "Computer use")
539
- })
540
- }),
541
534
  failure ? /* @__PURE__ */ jsxs(View, {
542
535
  style: styles$4.failure,
543
536
  children: [/* @__PURE__ */ jsx(Text, {
@@ -564,7 +557,7 @@ function ComputerUseView({ state, error, onCancel, onStop }) {
564
557
  }) : null,
565
558
  state.artifact?.failure ? /* @__PURE__ */ jsx(Text, {
566
559
  style: styles$4.error,
567
- children: state.artifact.failure.message
560
+ children: t("computerUse.ui.recordingUnavailable", "The recording is unavailable.")
568
561
  }) : null,
569
562
  pending ? /* @__PURE__ */ jsxs(Fragment, { children: [
570
563
  /* @__PURE__ */ jsx(Text, {
@@ -614,11 +607,7 @@ function ComputerUseView({ state, error, onCancel, onStop }) {
614
607
  disabled: state.phase === "stopping",
615
608
  onPress: onStop,
616
609
  children: t("computerUse.ui.stopComputerUse", "Stop computer use")
617
- }),
618
- state.phase === "active" ? /* @__PURE__ */ jsx(Text, {
619
- style: styles$4.detail,
620
- children: t("computerUse.ui.stopShortcutHint", "On the Mac, you can also press Cmd+Shift+Esc.")
621
- }) : null
610
+ })
622
611
  ] }) : null
623
612
  ]
624
613
  });
@@ -674,23 +663,6 @@ const styles$4 = StyleSheet.create((theme) => ({
674
663
  gap: theme.spacing(1),
675
664
  uni__dependencies: [0]
676
665
  },
677
- header: {
678
- flexDirection: "row",
679
- alignItems: "center",
680
- gap: theme.spacing(2),
681
- paddingBottom: theme.spacing(2),
682
- borderBottomWidth: 1,
683
- borderBottomColor: theme.colors["border-soft"],
684
- uni__dependencies: [0]
685
- },
686
- title: {
687
- flex: 1,
688
- fontFamily: fontOf(theme.fontFamily.sans),
689
- fontSize: theme.fontSize.base,
690
- fontWeight: "600",
691
- color: theme.colors.hi,
692
- uni__dependencies: [0]
693
- },
694
666
  row: {
695
667
  flexDirection: "row",
696
668
  alignItems: "center",