Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Closed
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: 0 additions & 1 deletion Composer/packages/client/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export enum ActionTypes {
DISPLAY_SKILL_MANIFEST_MODAL = 'DISPLAY_SKILL_MANIFEST_MODAL',
DISMISS_SKILL_MANIFEST_MODAL = 'DISMISS_SKILL_MANIFEST_MODAL',
SET_PUBLISH_TARGETS = 'SET_PUBLISH_TARGETS',
SET_RUNTIME_SETTINGS = 'SET_RUNTIME_SETTINGS',
SET_CUSTOM_RUNTIME_TOGGLE = 'SET_CUSTOM_RUNTIME_TOGGLE',
SET_RUNTIME_FIELD = 'SET_RUNTIME_FIELD',
}
Expand Down
4 changes: 0 additions & 4 deletions Composer/packages/client/src/store/action/eject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ActionCreator } from '../types';
import { ActionTypes } from '../../constants';

import httpClient from './../../utils/httpUtil';
import { setRuntimeSettings } from './setting';

export const getRuntimeTemplates: ActionCreator = async ({ dispatch }) => {
try {
Expand All @@ -30,9 +29,6 @@ export const ejectRuntime: ActionCreator = async (store, projectId, name) => {
type: ActionTypes.EJECT_SUCCESS,
payload: response.data,
});
if (response.data.settings?.path) {
setRuntimeSettings(store, projectId, response.data.settings.path, response.data.settings.startCommand);
}
} catch (err) {
dispatch({
type: ActionTypes.SET_ERROR,
Expand Down
11 changes: 0 additions & 11 deletions Composer/packages/client/src/store/action/setting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,6 @@ export const setPublishTargets: ActionCreator = async ({ dispatch }, publishTarg
});
};

export const setRuntimeSettings: ActionCreator = async ({ dispatch }, projectId: string, path, command) => {
dispatch({
type: ActionTypes.SET_RUNTIME_SETTINGS,
payload: {
projectId,
path,
command,
},
});
};

export const setCustomRuntime: ActionCreator = async ({ dispatch }, _, isOn) => {
dispatch({
type: ActionTypes.SET_CUSTOM_RUNTIME_TOGGLE,
Expand Down
7 changes: 0 additions & 7 deletions Composer/packages/client/src/store/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@ export const initialBotState: BotState = {
isEnvSettingUpdated: false,
settings: {},
publishVersions: {},
publishStatus: 'inactive',
lastPublishChange: null,
publishTypes: [],
publishTargets: [],
publishHistory: {},
botOpening: false,
};
Expand Down Expand Up @@ -117,10 +114,6 @@ const initialAppState: AppState = {
clipboardActions: [],
runtimeTemplates: [],
userSettings: getUserSettings(),
runtimeSettings: {
path: '',
startCommand: '',
},
announcement: undefined,
appUpdate: {
progressPercent: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const actionType2ChangeType = {
[ActionTypes.UPDATE_SKILL_MANIFEST]: { changeType: ChangeType.UPDATE, fileExtension: FileExtensions.Manifest },
[ActionTypes.SYNC_ENV_SETTING]: { changeType: ChangeType.UPDATE, fileExtension: FileExtensions.Setting },
[ActionTypes.SET_PUBLISH_TARGETS]: { changeType: ChangeType.UPDATE, fileExtension: FileExtensions.Setting },
[ActionTypes.SET_RUNTIME_SETTINGS]: { changeType: ChangeType.UPDATE, fileExtension: FileExtensions.Setting },
[ActionTypes.EJECT_SUCCESS]: { changeType: ChangeType.UPDATE, fileExtension: FileExtensions.Setting },
};

class FilePersistence {
Expand Down
20 changes: 8 additions & 12 deletions Composer/packages/client/src/store/reducer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,16 +448,7 @@ const syncEnvSetting: ReducerFunc = (state, { settings, projectId }) => {
};

const setPublishTargets: ReducerFunc = (state, { publishTarget }) => {
state.publishTargets = publishTarget;
return state;
};

const setRuntimeSettings: ReducerFunc = (state, { path, command }) => {
state.settings.runtime = {
customRuntime: true,
path,
command,
};
state.settings.publishTargets = publishTarget;
return state;
};

Expand Down Expand Up @@ -611,7 +602,13 @@ const setUserSettings: ReducerFunc<Partial<UserSettings>> = (state, settings) =>
};

const ejectSuccess: ReducerFunc = (state, payload) => {
state.runtimeSettings = payload.settings;
if (payload.settings?.path) {
state.settings.runtime = {
customRuntime: true,
path: payload.settings.path,
command: payload.settings.startCommand,
};
}
return state;
};

Expand Down Expand Up @@ -727,7 +724,6 @@ export const reducer = createReducer({
[ActionTypes.DISPLAY_SKILL_MANIFEST_MODAL]: displaySkillManifestModal,
[ActionTypes.DISMISS_SKILL_MANIFEST_MODAL]: dismissSkillManifestModal,
[ActionTypes.SET_PUBLISH_TARGETS]: setPublishTargets,
[ActionTypes.SET_RUNTIME_SETTINGS]: setRuntimeSettings,
[ActionTypes.SET_CUSTOM_RUNTIME_TOGGLE]: setCustomRuntimeToggle,
[ActionTypes.SET_RUNTIME_FIELD]: setRuntimeField,
});
8 changes: 0 additions & 8 deletions Composer/packages/client/src/store/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@ export interface BotState {
actionsSeed: any;

publishVersions: any;
publishStatus: any;
lastPublishChange: any;
publishTargets: any[];
publishTypes: PublishType[];
publishHistory: {
[key: string]: any[];
Expand Down Expand Up @@ -176,11 +173,6 @@ export type AppState = {

userSettings: UserSettings; // preferences for the editors

runtimeSettings: {
// custom runtime settings, used in ejection
path: string;
startCommand: string;
};
displaySkillManifest?: string;

// currently displayed error
Expand Down