Skip to content

Conversation

@ThureinOo
Copy link

@ThureinOo ThureinOo commented Dec 27, 2024

Added place holder for custom commands to be executed.

Description

Since it doesn't have implemented to insert custom commands to be executed, I made some changes to the UI and JS.

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

I tested it locally.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Added place holder for custom commands to be executed.
@ThureinOo ThureinOo marked this pull request as draft December 27, 2024 11:06
@ThureinOo ThureinOo marked this pull request as ready for review December 27, 2024 11:11
@deacon-mp deacon-mp requested a review from Copilot October 6, 2025 22:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a placeholder UI implementation for custom commands functionality in the human.vue component. The changes introduce interactive elements that allow users to add, remove, and clear custom commands through the interface.

  • Added methods for managing custom commands (add, remove, clear)
  • Implemented UI components with input fields and buttons for command management
  • Connected UI buttons to JavaScript methods using Vue event handlers

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +394 to +402
addCommand(){
this.commands.push("");
},
removeCommand(index){
this.commands.splice(index,1);
},
clearCommands(){
this.commands = [];
}
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

The commands array is being manipulated but is not defined in the component's data. This will cause runtime errors unless commands is declared in the data() method.

Copilot uses AI. Check for mistakes.
addCommand(){
this.commands.push("");
},
removeCommand(index){
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

Missing input validation for the index parameter. The method should validate that the index is within bounds before calling splice.

Suggested change
removeCommand(index){
removeCommand(index){
if (
typeof index !== "number" ||
!Number.isInteger(index) ||
index < 0 ||
index >= this.commands.length
) {
return;
}

Copilot uses AI. Check for mistakes.
this.commands.push("");
},
removeCommand(index){
this.commands.splice(index,1);
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

[nitpick] Missing space after comma in function arguments. Should be splice(index, 1) for consistent formatting.

Suggested change
this.commands.splice(index,1);
this.commands.splice(index, 1);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant