ubiquity / ubiquity-os-kernel

0 stars 11 forks source link

Accept commands that contain a carriage return #105

Closed gentlementlegen closed 2 weeks ago

gentlementlegen commented 2 weeks ago
          @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 https://github.com/ubiquity/devpool-directory-bounties/issues/27#issuecomment-2336533065

gentlementlegen commented 2 weeks ago

/start

ubiquity-os[bot] commented 2 weeks ago
! You have reached your max task limit
ubiquity-os[bot] commented 2 weeks ago
! You have reached your max task limit. Please close out some tasks before assigning new ones.
ubiquity-os[bot] commented 2 weeks ago

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

0x4007 commented 2 weeks ago

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

gentlementlegen commented 2 weeks ago

@0x4007 There is a pull-request on that regard: https://github.com/ubiquibot/command-start-stop/pull/35

gentlementlegen commented 2 weeks ago

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

gentlementlegen commented 2 weeks ago

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.

ubiquity-os[bot] commented 2 weeks ago

[ 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