Git Product home page Git Product logo

botot2's People

Contributors

azrsh avatar azumabashi avatar dependabot[bot] avatar private-yusuke avatar renovate[bot] avatar rinsuki avatar sobadon avatar takonomura avatar u1-liquid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

botot2's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/main.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-node v4
.github/workflows/renovate-config-validator.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-node v4
.github/workflows/schema.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-node v4
npm
package.json
  • asciimath-to-latex ^0.5.0
  • graphviz 0.0.9
  • markov-ja ^1.0.10
  • mathjax-node ^2.1.1
  • moment ^2.29.2
  • node-cabocha 0.0.5
  • reconnecting-websocket ^4.2.0
  • request-promise-native ^1.0.8
  • svg2png ^4.1.1
  • timeout-as-promise ^1.0.0
  • typescript ^5.0.0
  • ws ^8.0.0
  • xml2js ^0.6.0
  • @types/node 20.11.17
  • @types/ws 8.5.10
  • @types/xml2js 0.4.14
  • eslint 8.56.0
  • eslint-config-prettier 9.1.0
  • eslint-config-standard 17.1.0
  • eslint-plugin-import 2.29.1
  • eslint-plugin-node 11.1.0
  • eslint-plugin-promise 6.1.1
  • eslint-plugin-standard 4.1.0
  • prettier 2.8.8
  • tslib 2.6.2
  • typescript-json-schema 0.55.0
  • node >=18.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

`/info` と `/help` コマンドを実行するとエラー

概要

/info/help コマンドを実行するとエラーが発生する。

影響範囲

少なくとも現在の master の最新のコミット 1934807 の時点でエラーが発生する

原因

const m = new M(ai);

ここで各モジュールのコンストラクタに渡している aiundefined になっている。

このため、/info, /help のそれぞれ以下の箇所で TypeError が発生している。

Modules: ${this.ai.modules.map((i) => `${i.name}(${i.priority})`).join(", ")}

this.ai.modules.forEach((v) => {

解決方法

#72 (comment) では、AdminModule の constructor には初期化された Ai のインスタンスへの参照を渡すことを想定していたようだった。

これをするためには、AdminModule よりも先に Ai のインスタンスを作成する必要がある。

そのために、現在 src/index.ts で行っているモジュールの初期化処理を Ai.init() 内で実行するように処理を引っ越して、AdminModule のインスタンスにはそのブロック内で this を渡すという方法を考えている。

エラー

/info を実行したときのエラー
/[REDACTED]/built/modules/admin.js:44
Modules: ${this.ai.modules.map((i) => `${i.name}(${i.priority})`).join(", ")}
                   ^

TypeError: Cannot read properties of undefined (reading 'modules')
    at AdminModule.<anonymous> (/[REDACTED]/built/modules/admin.js:44:20)
    at Generator.next (<anonymous>)
    at /[REDACTED]/built/modules/admin.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/[REDACTED]/built/modules/admin.js:4:12)
    at AdminModule.onCommand (/[REDACTED]/built/modules/admin.js:41:16)
    at Ai.<anonymous> (/[REDACTED]/built/ai.js:199:46)
    at Generator.next (<anonymous>)
    at fulfilled (/[REDACTED]/built/ai.js:5:58)
/help を実行したときのエラー
/[REDACTED]/built/modules/admin.js:59
                this.ai.modules.forEach((v) => {
                        ^

TypeError: Cannot read properties of undefined (reading 'modules')
    at AdminModule.<anonymous> (/[REDACTED]/built/modules/admin.js:59:25)
    at Generator.next (<anonymous>)
    at /[REDACTED]/built/modules/admin.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/[REDACTED]/built/modules/admin.js:4:12)
    at AdminModule.onCommand (/[REDACTED]/built/modules/admin.js:41:16)
    at Ai.<anonymous> (/[REDACTED]/built/ai.js:199:46)
    at Generator.next (<anonymous>)
    at fulfilled (/[REDACTED]/built/ai.js:5:58)

v13 のインスタンスで自動投稿が機能していない

概要

Misskey v13 が実行されているインスタンスに接続して動作させる際、Note の作成などが正常に完了しなくなっている。

原因

どうやら Content-Type: application/json を API リクエストに付与することで解決されるらしい?(要検証)

botot2 の Node.js 最低要求バージョンを v18 にして `node-fetch` を剥がす

Node.js v18 から fetch がグローバルで定義されて提供されるらしいので、botot2 の Node.js 最低要求バージョンを v18 にすることで node-fetch を剥がすという案を考えた(雑)
Node.js v18 のアクティブ LTS が 2022-10-25 から提供されるらしいので、そのタイミングで剥がすとかでもいいと思う。node-fetch の重要なバグ修正とセキュリティアップデートは引き続き v2 系でも提供されるらしいし、今急いで v3 系を入れる必要はあまり感じていない

Originally posted by @private-yusuke in #36 (comment)

config で `markovSpeaking.allowLearnCW` が false になっているのに CW 付き投稿を学習してしまう

背景

ユーザーが CW を付けて投稿するような内容については学習しない方がよいと考えられる。
そのため、CW が付いた投稿を学習するかどうかの設定ができるように config で設定できる項目として、markovSpeaking.allowLearnCW を用意している。これは真偽値を設定できるもので、true を設定すると CW 付きの投稿を学習し、false なら CW 付きの投稿を学習しなくなる。

実際の挙動

markovSpeaking.allowLearnCW が false に設定されていても CW 付きの投稿を学習してしまっている例を確認した。

WebSocket connection is unintentionally lost between server

reconnecting-websocket を使っているので、WebSocket の接続自体が途切れたことが TCP のレイヤーで検知されたら自動的に再接続が発生する。しかし、TCP コネクションとしては途切れていないように見える(?)のにサーバー側から一切データが送出されなくなることがある。
これの対処方として、アプリケーション層で生存確認をするのが良いと考えられる。

実装する際にはこれなどを参考にすると良さげ

Renovate による `@types/node` のアップデート頻度を落としたい

概要

Renovate によって @types/node のパッチバージョンが上がるたびに PR が作成されているが、これは頻度が高すぎるように感じている。

@types/node は型定義ファイルのみを持つパッケージであり、botot2 自体の動作には直接の影響を及ぼさない devDependencies のうちの 1 つであることから、頻度を落とすことによって生じる問題はほとんど無い・無視してよいものであると考えている。

そこで、暫定処置として Renovate には @types/node に限り隔週で PR を出してもらうようにしたい。

実現方法

ref: https://docs.renovatebot.com/key-concepts/scheduling/#schedule-when-to-update-specific-dependencies

以下のような項目を renovate.json に追加すればよいのではないかと考えている。

{
  "packageRules": [
    {
      "matchPackageNames": ["@types/node"],
      "schedule": ["every 2 weeks on monday"]
    }
  ]
}

マルコフ連鎖の文字化け

Windows10でマルコフ連鎖が文字化けしてしまいます
DMでも言っていますが、どちらかでご返事をお願いします。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.