Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncation in Call Arguments presented in TUI during script execution. #659

Open
sangee2004 opened this issue Jul 24, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@sangee2004
Copy link
Contributor

sangee2004 commented Jul 24, 2024

gptscript version v0.0.0-dev-671f0f02-dirty

Steps to reproduce the problem:

  1. Chat with cli-demo script - gptscript --disable-cache github.com/gptscript-ai/cli-demo
  2. Notice that when k8s commands that need to be executed exceed certain number of characters , there is truncation seen in the
    Call Arguments presented for the exec command:
Screenshot 2024-07-24 at 1 41 12 PM
@sangee2004
Copy link
Contributor Author

sangee2004 commented Aug 2, 2024

Tested with gptscript version v0.0.0-dev-c8cf3106-dirty

Truncation in callArguments is still present.

> can u update the rolling startergy to 30%?
  To update the rolling update strategy to 30%, I will modify the  maxSurge  and  maxUnavailable  values to 30% for the  mytestnginx  deployment.                            
                                                                                                                                                                             
  Shall I proceed with this update?                                                                                                                                          

> yes
    ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
    │ Call Arguments:                                                                                                                                          │
    │                                                                                                                                                          │
    │ exec {"command":"kubectl patch deployment mytestnginx -p '{\"spec\": {\"strategy\": {\"rollingUpdate\": {\"maxSurge\": \"30%\", \"maxUnavailable\": \"30 │
    └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
                                                                                                                                                                
Run "kubectl patch deployment mytestnginx -p '{"spec": {"strategy": {"rollingUpdate": {"maxSurge": "30%", "maxUnavailable": "30%"}}}}'" (or allow all "kubectl patch ..." commands)
Confirm (y/n/a)>  

@sangee2004
Copy link
Contributor Author

Tested with gptscript version - v0.0.0-dev-a7509b0d-dirty

We now see "..." presented in the exec calls when it is not able to present the entire call argument.

> y

    ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
    │ Call Arguments:                                                                                                                │
    │                                                                                                                                │
    │ exec {"command":"kubectl patch deployment mytestnginx -p '{\"spec\": {\"strategy\": {\"rollingUpdate\": {\"maxSurge\": ...(43) │
    └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
                                                                                                                                      
  Running  kubectl patch deployment mytestnginx -p '{"spec": {"strategy": {"rollingUpdate": {"maxSurge": "40%", "maxUnavailable": 
  "40%"}}}}'                                                                                                                      

    ┌─────────────────────────────────────┐
    │ deployment.apps/mytestnginx patched │
    └─────────────────────────────────────┘
                                           

But sometimes we stiill see the full call argument call missing

> list all deployments

    ┌────────────────────────────────┐
    │ Call Arguments:                │
    │                                │
    │ k8s {"task":"get deployments"} │
    └────────────────────────────────┘
                                      
    ┌─────────────────┐
    │ Call Arguments: │
    │                 │
    │ exec {          │
    └─────────────────┘
                       
  Running  kubectl get deployments                                                                                                

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant