mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore(coderd): introduce TaskAppID and deprecate AITaskSidebarAppID (#20336)
As we're moving away from the SidebarAppID nomenclature, this PR introduces a new `TaskAppID` field to `codersdk.WorkspaceBuild` and deprecates the `AITaskSidebarAppID` field. They both contain the same value.
This commit is contained in:
Generated
+4
@@ -6363,7 +6363,11 @@ export interface WorkspaceBuild {
|
||||
readonly matched_provisioners?: MatchedProvisioners;
|
||||
readonly template_version_preset_id: string | null;
|
||||
readonly has_ai_task?: boolean;
|
||||
/**
|
||||
* Deprecated: This field has been replaced with `TaskAppID`
|
||||
*/
|
||||
readonly ai_task_sidebar_app_id?: string;
|
||||
readonly task_app_id?: string;
|
||||
readonly has_external_agent?: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ export const TaskApps: FC<TaskAppsProps> = ({ task }) => {
|
||||
// The Chat UI app will be displayed in the sidebar, so we don't want to
|
||||
// show it as a web app.
|
||||
(app) =>
|
||||
app.id !== task.workspace.latest_build.ai_task_sidebar_app_id &&
|
||||
app.id !== task.workspace.latest_build.task_app_id &&
|
||||
app.health !== "disabled",
|
||||
);
|
||||
const [embeddedApps, externalApps] = splitEmbeddedAndExternalApps(apps);
|
||||
|
||||
@@ -190,7 +190,7 @@ export const SidebarAppNotFound: Story = {
|
||||
...workspace,
|
||||
latest_build: {
|
||||
...workspace.latest_build,
|
||||
ai_task_sidebar_app_id: "non-existent-app-id",
|
||||
task_app_id: "non-existent-app-id",
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -497,7 +497,7 @@ function mockTaskWorkspace(
|
||||
latest_build: {
|
||||
...MockWorkspace.latest_build,
|
||||
has_ai_task: true,
|
||||
ai_task_sidebar_app_id: sidebarApp.id,
|
||||
task_app_id: sidebarApp.id,
|
||||
resources: [
|
||||
{
|
||||
...MockWorkspaceResource,
|
||||
|
||||
@@ -143,7 +143,7 @@ const TaskPage = () => {
|
||||
content = <TaskStartingAgent agent={agent} />;
|
||||
} else {
|
||||
const chatApp = getTaskApps(task).find(
|
||||
(app) => app.id === task.workspace.latest_build.ai_task_sidebar_app_id,
|
||||
(app) => app.id === task.workspace.latest_build.task_app_id,
|
||||
);
|
||||
content = (
|
||||
<PanelGroup autoSaveId="task" direction="horizontal">
|
||||
|
||||
Reference in New Issue
Block a user