gh-copilot icon indicating copy to clipboard operation
gh-copilot copied to clipboard

[FEAT]: Disable welcome header

Open umutbasal opened this issue 1 year ago • 10 comments

Describe the need

Header message with welcome version transparency info takes long space and its very bad dx. There should be option to disable. or it should be prompted on just help command, not suggest and explain.

Version

version 0.5.4-beta

Relevant terminal output

Welcome to GitHub Copilot in the CLI!
version 0.5.4-beta (2024-01-04)

I'm powered by AI, so surprises and mistakes are possible. Make sure to verify any generated code or suggestions, and share feedback so that we can learn and improve. For more information, see https://gh.io/gh-copilot-transparency

umutbasal avatar Feb 12 '24 03:02 umutbasal

Header message with welcome version transparency info takes long space and its very bad dx. There should be option to disable. or it should be prompted on just help command, not suggest and explain.

@umutbasal : While we understand this sentiment, however the disclaimer needs to be there.

Do you have suggestions how it might be redesigned to be more aesthetically pleasing?

Any mockups you'd like to suggest would be welcome ❤

I'm powered by AI, so surprises and mistakes are possible.
Make sure to verify any generated code or suggestions, and share feedback so that we can learn and improve.

For more information, see https://gh.io/gh-copilot-transparency

andyfeller avatar Mar 21 '24 13:03 andyfeller

IMO, any way would be just straight up annoying. It doesn't matter how it looks. Its just text that bloats the experienced. I do agree that this should be shown only once per version release though. or at the very least, once per shell session. So that it does not overflow the terminal with meaningless text

Especially since it takes up effectively half the terminal. image

mempler avatar Mar 21 '24 21:03 mempler

Its annoying to see the same message again and again.

droner-D avatar Mar 28 '24 05:03 droner-D

@mempler @droner-D @umutbasal : I sympathize with your feelings, that the need to remind users to exercise caution and thoughtfulness before acting upon suggestions seems unnecessary in your particular use cases.

In order to potentially affect anything, it sounds like the best suggestions are:

  1. Show once per shell session
  2. Show once per release version

While I'm always happy to advocate based on users, I don't want to give you any false sense this would go away as GitHub does have security obligations it takes seriously.

andyfeller avatar Mar 29 '24 02:03 andyfeller

I don't want to give you any false sense this would go away as GitHub does have security obligations it takes seriously.

By that logic, why does github copilot generated code never remind you that the code is AI generated? It effectively has even more dangerous potential than the one liner commands you run. (unless you run rm -rf / obviously)

As students who use copilot for coding love to implement security vulnerabilities through copilot since they dont know what they're doing.

I dont want to attack you or anything, Just want to say that your company has odd security measures where you enforce a security thing to one and not the other while being effectively the same.

mempler avatar Mar 29 '24 08:03 mempler

still exists in version 1.0.1 (2024-03-22) 🤦 annoying af

den-is avatar Apr 03 '24 14:04 den-is

If you want a hacky way to remove the welcome header, (really not great but at least something) you can search for the gh-copilot binary (mine was located at ~/.local/share/gh/extensions/gh-copilot) and replace the welcome string in there with non-printable characters. Be sure to replace the characters instead of removing them, otherwise the binary would break. To remove the annoying long line "I'm powered by AI..." for example, you can use this bash command (executed in the folder where you found the binary):

replace_this="I'm powered by AI, so surprises and mistakes are possible. Make sure to verify any generated code or suggestions, and share feedback so that we can learn and improve. For more information, see https://gh.io/gh-copilot-transparency"; replace_with=$(echo $replace_this | sed 's/./\x05/g'); sed -i "s|$replace_this|$replace_with|g" gh-copilot

This will replace every character of the welcome header line with the non-printable char \x05 (i.e. "Enquiry") which is (to my knowledge) not used anymore and (at least in my shell) doesn't get printed. This obviously has to be redone every time the binary gets updated and I do not generally recommend messing with binaries, but for those of you who just want a hacky way to get rid of it for now, here you go.

However, there are still a few empty lines printed that are still taking up space.

AremJames avatar Apr 03 '24 23:04 AremJames

@andyfeller I appreciate GitHub's commitment to security obligations, and I agree with @mempler that Copilot doesn’t prompt a message every time when completing code or answering questions. I don’t think there are different security concerns between VS Code Copilot and Copilot CLI.

If it’s about executing harmful commands, then I think it should be prompted when choosing execute command in the suggest option. These types of messages are commonly shown in the root command of CLI applications, and I would prefer it that way too.

@AremJames tried that but didn't worked for me I published my workaround here https://github.com/umutbasal/tty-override

umutbasal avatar Apr 03 '24 23:04 umutbasal

Is adding an environment var named something like GH_CLI_OMIT_COPILOT_WARNING an option? If it is set to 1, the warning is omitted. Otherwise, the warning is shown. So the user has to explicitly opt-out of that warning. "Advanced" users could just add export GH_CLI_OMIT_COPILOT_WARNING=1 to their rc file.

This would be similar to how the .NET CLI handles telemetry, where you have to set DOTNET_CLI_TELEMETRY_OPTOUT=1.

nikeee avatar Dec 04 '24 14:12 nikeee

Agree very annoying.

The explanation for the banner is: " ... security obligations ...", sure whatever. however, WE HAVE READ IT A THOUSAND TIMES ALREADY.

russeg avatar Feb 19 '25 09:02 russeg