Skip to content

Commit d72789b

Browse files
committed
chore: remove chatActionsImpl
1 parent cfdb02a commit d72789b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2591
-1883
lines changed

packages/ai-chat/src/chat/ai-chat-components/web-components/components/table/cds-aichat-table.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ class TableElement extends LitElement {
349349
// throwing the error.
350350

351351
// throw new Error(
352-
// `${WA_CONSOLE_PREFIX} Number of cells in the table header does not match the number of cells in one or more of the table rows. In order to render a table there needs to be the same number of columns in the table header and all of the table rows.`,
352+
// `${CONSOLE_PREFIX} Number of cells in the table header does not match the number of cells in one or more of the table rows. In order to render a table there needs to be the same number of columns in the table header and all of the table rows.`,
353353
// );
354354
}
355355

packages/ai-chat/src/chat/components-legacy/input/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ function Input(props: InputProps, ref: Ref<InputFunctions>) {
514514
type: BusEventType.STOP_STREAMING,
515515
});
516516
// Also cancel the current message request to abort the signal
517-
await serviceManager.messageService.cancelCurrentMessageRequest();
517+
await serviceManager.messageOutboundService.cancelCurrentMessageRequest();
518518
}}
519519
/>
520520
)}

packages/ai-chat/src/chat/components-legacy/launcher/LauncherContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ function LauncherContainer() {
3636

3737
const onDoToggle = useCallback(() => {
3838
// Otherwise try to open the main window on launcher click.
39-
return serviceManager.actions.changeView(ViewType.MAIN_WINDOW, {
39+
return serviceManager.viewStateService.changeView(ViewType.MAIN_WINDOW, {
4040
mainWindowOpenReason: MainWindowOpenReason.DEFAULT_LAUNCHER,
4141
});
42-
}, [serviceManager.actions]);
42+
}, [serviceManager.viewStateService]);
4343

4444
useEffectDidUpdate(() => {
4545
// If the main window is closed, and the launcher is visible, then we should request focus on the

packages/ai-chat/src/chat/components-legacy/main/MainWindow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ class MainWindow
425425
const { serviceManager } = this.props;
426426

427427
// Fire the view:change and window:close events. If the view change is canceled then the main window will stay open.
428-
await serviceManager.actions.changeView(ViewType.LAUNCHER, {
428+
await serviceManager.viewStateService.changeView(ViewType.LAUNCHER, {
429429
mainWindowCloseReason: MainWindowCloseReason.DEFAULT_MINIMIZE,
430430
});
431431
}

packages/ai-chat/src/chat/components-legacy/responseTypes/buttonItem/ButtonItemPostBackComponent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { useServiceManager } from "../../../hooks/useServiceManager";
1616
import { selectInputState } from "../../../store/selectors";
1717
import { HasRequestFocus } from "../../../../types/utilities/HasRequestFocus";
1818
import { LocalMessageItem } from "../../../../types/messaging/LocalMessageItem";
19-
import { WA_CONSOLE_PREFIX } from "../../../utils/constants";
19+
import { CONSOLE_PREFIX } from "../../../utils/constants";
2020
import { createMessageRequestForButtonItemOption } from "../../../utils/messageUtils";
2121
import { consoleError } from "../../../utils/miscUtils";
2222
import actions from "../../../store/actions";
@@ -72,7 +72,7 @@ function ButtonItemPostBackComponent({
7272
);
7373
} else {
7474
consoleError(
75-
`${WA_CONSOLE_PREFIX} post_back button with label "${messageItem.label}" has no input message to send.`,
75+
`${CONSOLE_PREFIX} post_back button with label "${messageItem.label}" has no input message to send.`,
7676
);
7777
}
7878
}, [

packages/ai-chat/src/chat/components-legacy/responseTypes/custom/UserDefinedResponse.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ function UserDefinedResponse(props: UserDefinedResponseProps) {
5050
// The element that was previously created that we'll attach to this React component. The custom code should
5151
// already have attached its own element to this element that contains the custom rendering for the message.
5252
const userDefinedRegistryItem =
53-
serviceManager.actions.getOrCreateUserDefinedElement(props.localMessageID);
53+
serviceManager.userDefinedResponseService.getOrCreateUserDefinedElement(
54+
props.localMessageID,
55+
);
5456

5557
useCallbackOnChange(streamingState?.chunks, doAutoScroll);
5658

0 commit comments

Comments
 (0)