temporalio / vscode-debugger-extension

Visual Studio Code debugger plugin
https://marketplace.visualstudio.com/items?itemName=temporal-technologies.temporalio
MIT License
19 stars 7 forks source link

[Feature Request] Allow Custom Auto-populated Namespace #71

Open natdm opened 9 months ago

natdm commented 9 months ago

The debugger extension sets default as the namespace in case there are none populated.

In the event that there are many teams connecting to the same Temporal deployment, but in different namespaces, it could be a bit daunting to type out the namespace every time you debug. At least on my team, we use the debugger a lot.

It'd be nice to be able to set autopopulateNamespace to set something other than the default if requested (and the user can always set default explicitly to override).

I suggested autopopulateNamespace over defaultNamespace since a "default namespace" already exists.. default.

I gave it a try myself but I wanted to be able to show it in the panel (as Namespace: (<autopopulatedNamespace value, or default if the value is not set>), but I'm not familiar with Svelte at all.

bergundy commented 9 months ago

I think we could put a default namespace input in the settings form: https://github.com/temporalio/vscode-debugger-extension/blob/e3615959135cddb60658989df1d22e01a16ea3ed/webview/src/views/settings.svelte#L58.

Would that work for you?

Here's where it's stored:

https://github.com/temporalio/vscode-debugger-extension/blob/e3615959135cddb60658989df1d22e01a16ea3ed/extension/src/panel.ts#L228

And where it's loaded:

https://github.com/temporalio/vscode-debugger-extension/blob/e3615959135cddb60658989df1d22e01a16ea3ed/extension/src/panel.ts#L152