Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.

Improve action discoverability by adding Cody: prefix in Search Everywhere#1872

Merged
pkukielka merged 1 commit into
mainfrom
pkukielka/improve-action-discoverability
Jul 3, 2024
Merged

Improve action discoverability by adding Cody: prefix in Search Everywhere#1872
pkukielka merged 1 commit into
mainfrom
pkukielka/improve-action-discoverability

Conversation

@pkukielka

@pkukielka pkukielka commented Jul 3, 2024

Copy link
Copy Markdown
Contributor

Closes https://linear.app/sourcegraph/issue/CODY-2130/improve-how-actions-appear-in-shiftshift-menu

Changes

I moved action properties like text and description to plugin.xml.
It is just easier to edit and inspect this way.
To be honest, Geminit 1.5 did most of the work:

Given the following plugin.xml file and properties file, please modify plugin.xml so each action have additional propertes text and description with values from properties file.
Additionally for every action please add such tag: <override-text place="GoToAction" text="Cody: $TEXT"/> where $TEXT is taken from properties file as well.
For some actions like: <action id="Cody.Accounts.LogInToSourcegraphAction" class="com.sourcegraph.cody.config.LogInToSourcegraphAction"/> you may have to change them to form such as:

<action id="Cody.Accounts.LogInToSourcegraphAction" class="com.sourcegraph.cody.config.LogInToSourcegraphAction" text="Log In to Sourcegraph">
  <override-text place="GoToAction" text="Cody: Log In to Sourcegraph"/>
</action>

Please output whole content of the modified plugin.xml file.

Test plan

  1. Hit Shift shift
  2. Type 'Cody:'

image

@pkukielka pkukielka changed the title Improve action discoverability by adding Cody: prefix in Search Every… Improve action discoverability by adding Cody: prefix in Search Everywhere Jul 3, 2024
group.InternalsStatusBarActions.text=?? Internals

# Authentication Actions
action.Cody.Accounts.LogInToSourcegraphAction.text=Log In to Sourcegraph

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it is better to keep these strings in a properties file for the sake of internationalisation, but this is more of a theoretical concern.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe the i18n is not a good reason but keeping all user-facing strings in one place seems to be a rational objective.

@pkukielka pkukielka merged commit 22f24a7 into main Jul 3, 2024
@pkukielka pkukielka deleted the pkukielka/improve-action-discoverability branch July 3, 2024 13:55
steveyegge pushed a commit that referenced this pull request Jul 9, 2024
…where (#1872)

Closes
https://linear.app/sourcegraph/issue/CODY-2130/improve-how-actions-appear-in-shiftshift-menu

## Changes

I moved action properties like `text` and `description` to `plugin.xml`.
It is just easier to edit and inspect this way.
To be honest, Geminit 1.5 did most of the work:

> Given the following plugin.xml file and properties file, please modify
plugin.xml so each action have additional propertes `text` and
`description` with values from properties file.
> Additionally for every action please add such tag: `<override-text
place="GoToAction" text="Cody: $TEXT"/>` where `$TEXT` is taken from
properties file as well.
> For some actions like: `<action
id="Cody.Accounts.LogInToSourcegraphAction"
class="com.sourcegraph.cody.config.LogInToSourcegraphAction"/>` you may
have to change them to form such as:
> ```
> <action id="Cody.Accounts.LogInToSourcegraphAction"
class="com.sourcegraph.cody.config.LogInToSourcegraphAction" text="Log
In to Sourcegraph">
> <override-text place="GoToAction" text="Cody: Log In to Sourcegraph"/>
> </action>
>```
>
> Please output whole content of the modified plugin.xml file.


## Test plan

1. Hit `Shift shift`
2. Type 'Cody:'


![image](https://github.com/sourcegraph/jetbrains/assets/1519649/5ffd1d07-0088-4cb6-b5c8-3894b281bbe1)
mkondratek added a commit that referenced this pull request Jul 10, 2024
Rel: #1872

## The error

```
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key action.sourcegraph.disabled.description
	at java.base/java.util.ResourceBundle.getObject(ResourceBundle.java:564)
	at java.base/java.util.ResourceBundle.getString(ResourceBundle.java:521)
	at com.sourcegraph.common.CodyBundle.getString(CodyBundle.kt:29)
	at com.sourcegraph.cody.chat.actions.BaseChatAction.update(BaseChatAction.kt:31)
```

## Test plan

I am not sure. I was testing my own branch and I encountered the error.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants