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

Accept commands that contain a carriage return #105

Closed
gentlementlegen opened this issue Sep 8, 2024 · 9 comments · Fixed by ubiquity-os-marketplace/command-start-stop#44 or #109

Comments

@gentlementlegen
Copy link
Member

          @0x4007 It seems that when a carriage return is in the body, it gets stripped on display by GitHub but is not recognized as a command by the kernel. I my two commands above I used:
/start

and

/start

The latter one should be valid as well.

Originally posted by @gentlementlegen in ubiquity/devpool-directory-bounties#27 (comment)

@gentlementlegen
Copy link
Member Author

/start

Copy link
Contributor

ubiquity-os bot commented Sep 9, 2024

! You have reached your max task limit

Copy link
Contributor

ubiquity-os bot commented Sep 9, 2024

! You have reached your max task limit. Please close out some tasks before assigning new ones.

@gentlementlegen gentlementlegen self-assigned this Sep 9, 2024
Copy link
Contributor

ubiquity-os bot commented Sep 9, 2024

@gentlementlegen the deadline is at Mon, Sep 9, 12:06 PM UTC

@0x4007
Copy link
Member

0x4007 commented Sep 9, 2024

Two error messages doesn't look right. Can you address that?

@gentlementlegen
Copy link
Member Author

@0x4007 There is a pull-request on that regard: ubiquity-os-marketplace/command-start-stop#35

@gentlementlegen
Copy link
Member Author

After testing, it appears that this issue is specific to `command-start-stop1 The kernel properly sends the event properly.

@gentlementlegen
Copy link
Member Author

gentlementlegen commented Sep 9, 2024

The kernel properly understands and triggers the plugin correctly. The problem is that the command is wrongly extracted on command-start-stop afterwards: https://github.com/ubiquibot/command-start-stop/blob/c79b63fa8224012d90c36de488c6c1fed6e5ba77/src/handlers/user-start-stop.ts#L14


Edit: the problem was also partially from the Kernel because it used startsWith which works with trailing whitespace but not leading ones. Opened a PR on that regard as well.

Copy link
Contributor

ubiquity-os bot commented Sep 9, 2024

[ 77.62 WXDAI ]

@gentlementlegen
Contributions Overview
View Contribution Count Reward
Issue Task 1 50
Issue Specification 1 8.7
Issue Comment 3 18.92
Review Comment 1 0
Conversation Incentives
Comment Formatting Relevance Reward
@0x4007 It seems that when a carriage return is in the body, it …
8.7
content:
  p:
    symbols:
      \b\w+\b:
        count: 24
        multiplier: 0.1
    score: 1
  pre:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 5
  em:
    symbols:
      \b\w+\b:
        count: 16
        multiplier: 0.1
    score: 0
multiplier: 3
1 8.7
@0x4007 There is a pull-request on that regard: https://github.c…
3.6
content:
  p:
    symbols:
      \b\w+\b:
        count: 18
        multiplier: 0.2
    score: 1
multiplier: 1
0.7 2.52
After testing, it appears that this issue is specific to `co…
4
content:
  p:
    symbols:
      \b\w+\b:
        count: 20
        multiplier: 0.2
    score: 1
multiplier: 1
0.6 2.4
The kernel properly understands and triggers the plugin correctl…
14
content:
  h2:
    symbols:
      \b\w+\b:
        count: 39
        multiplier: 0.2
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.2
    score: 1
  p:
    symbols:
      \b\w+\b:
        count: 30
        multiplier: 0.2
    score: 1
multiplier: 1
1 14
Resolves https://github.com/ubiquity/ubiquibot-kernel/issues/105 …
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 19
        multiplier: 0
    score: 1
  ul:
    symbols:
      \b\w+\b:
        count: 45
        multiplier: 0
    score: 1
  li:
    symbols:
      \b\w+\b:
        count: 35
        multiplier: 0
    score: 1
multiplier: 0
0.3 -

[ 0.33 WXDAI ]

@0x4007
Contributions Overview
View Contribution Count Reward
Issue Comment 1 0.33
Conversation Incentives
Comment Formatting Relevance Reward
Two error messages doesn't look right. Can you address that?
1.1
content:
  p:
    symbols:
      \b\w+\b:
        count: 11
        multiplier: 0.1
    score: 1
multiplier: 1
0.3 0.33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment