Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(site): add support for external agents in the UI and extend CodeExample#19288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kacpersaw merged 7 commits intomainfromkacpersaw/feat-coder-attach-ui
Aug 19, 2025

Conversation

kacpersaw
Copy link
Contributor

@kacpersawkacpersaw commentedAug 11, 2025
edited
Loading

This pull request introduces support for external workspace management, allowing users to register and manage workspaces that are provisioned and managed outside of the Coder.

  • Added a new component AgentExternal which shows instructions for connecting external agents.
  • Added redacted fields to CodeExample so you can now hide specific parts of the code instead of the full line
  • Hides workspace actions if workspace is using external agent.
image

@kacpersawkacpersaw changed the titlefeat: add support for external agents in the UI and extend CodeExamplefeat(site): add support for external agents in the UI and extend CodeExampleAug 11, 2025
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-ui branch fromd0f7fd7 to5ea333aCompareAugust 11, 2025 15:40
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-cli branch from1d9ad42 to2b42673CompareAugust 11, 2025 15:40
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-ui branch from5ea333a tobd266b3CompareAugust 12, 2025 12:10
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-cli branch from2b42673 to039892bCompareAugust 12, 2025 12:10
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-ui branch frombd266b3 tob91a963CompareAugust 12, 2025 12:44
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-cli branch 2 times, most recently frome1fd6e8 toe7e9376CompareAugust 12, 2025 13:13
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-ui branch 2 times, most recently fromb65b376 tod9d2161CompareAugust 13, 2025 09:30
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-cli branch 2 times, most recently fromd36771a tocec9a8dCompareAugust 13, 2025 10:06
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-ui branch fromd9d2161 to2177e0dCompareAugust 13, 2025 10:06
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-cli branch fromcec9a8d toac11687CompareAugust 13, 2025 10:42
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-ui branch from2177e0d to43a2123CompareAugust 13, 2025 10:42
@kacpersawkacpersaw marked this pull request as ready for reviewAugust 13, 2025 11:17
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-ui branch from43a2123 to9a26156CompareAugust 13, 2025 12:08
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-cli branch fromac11687 to515fd53CompareAugust 13, 2025 12:08
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-ui branch fromf12ed83 to64b9a7aCompareAugust 13, 2025 13:00
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-cli branch 2 times, most recently fromce5c3e0 tod5f8141CompareAugust 13, 2025 13:23
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-ui branch from64b9a7a to956e5fbCompareAugust 13, 2025 13:23
Copy link
Member

@aslilacaslilac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

a word of warning: if you implement your own react data fetching youwill implement it incorrectly. it is deceptively hard. please use react-query instead. tell your friends. 👻

Comment on lines 26 to 42
useEffect(()=>{
if(
isExternalAgent&&
(agent.status==="timeout"||agent.status==="connecting")
){
API.getWorkspaceAgentCredentials(workspace.id,agent.name)
.then((res)=>{
setExternalAgentToken(res.agent_token);
setCommand(res.command);
})
.catch((err)=>{
displayError(
getErrorMessage(err,"Failed to get external agent credentials"),
);
});
}
},[isExternalAgent,agent.status,workspace.id,agent.name]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

useuseQuery for this. you can look at plenty of examples in the api/queries/ folder.

);
const[command,setCommand]=useState<string|null>(null);

constorigin=isChromatic() ?"https://example.com" :window.location.origin;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

we should use the deployment config value here instead

const { deploymentConfig } = useDeploymentConfig();deploymentConfig.config.access_url

constshouldDisplayAgentApps=
(agent.status==="connected"&&hasAppsToDisplay)||
agent.status==="connecting";
(agent.status==="connecting"&&!isExternalAgent);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

why do we only hide them while connecting?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I hid the apps when connecting to have a clear view with external agent credentials. The apps would only be installed when the agent is connected, so having them visible doesn’t make sense imo.

imageimage

aslilac reacted with thumbs up emoji
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-ui branch frombf67f24 tod67eaceCompareAugust 18, 2025 12:52
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-cli branch fromd5f8141 toae3f780CompareAugust 18, 2025 12:52
Copy link
Member

@aslilacaslilac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

looks great now! thank you!

@kacpersawGraphite App
Copy link
ContributorAuthor

kacpersaw commentedAug 19, 2025
edited
Loading

Merge activity

  • Aug 19, 8:29 AM UTC: A user started a stack merge that includes this pull request viaGraphite.
  • Aug 19, 8:54 AM UTC:Graphite rebased this pull request as part of a merge.
  • Aug 19, 9:00 AM UTC:@kacpersaw merged this pull request withGraphite.

@kacpersawkacpersaw changed the base branch fromkacpersaw/feat-coder-attach-cli tographite-base/19288August 19, 2025 08:42
@kacpersawkacpersaw changed the base branch fromgraphite-base/19288 tomainAugust 19, 2025 08:52
@kacpersawkacpersawforce-pushed thekacpersaw/feat-coder-attach-ui branch from7b3c5d6 to044076aCompareAugust 19, 2025 08:53
@kacpersawkacpersaw merged commit7f72067 intomainAug 19, 2025
26 of 28 checks passed
@kacpersawkacpersaw deleted the kacpersaw/feat-coder-attach-ui branchAugust 19, 2025 09:00
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 19, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@aslilacaslilacaslilac approved these changes

@spikecurtisspikecurtisAwaiting requested review from spikecurtis

@johnstcnjohnstcnAwaiting requested review from johnstcn

Assignees

@kacpersawkacpersaw

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@kacpersaw@aslilac

[8]ページ先頭

©2009-2025 Movatter.jp