调价后的新价格写入报价单;多段段前的货物带到各段,协同群不再把体积里的星号吃掉。海运字段齐了先核对再查价。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -14,7 +14,7 @@ if ROOT not in sys.path:
|
||||
sys.path.insert(0, ROOT)
|
||||
|
||||
from agent.channel.aibot import normalize_aibot_payload
|
||||
from agent.channel.aibot.reply import AibotReplyClient
|
||||
from agent.channel.aibot.reply import AibotReplyClient, protect_markdown_asterisks
|
||||
|
||||
|
||||
class AibotInboundNormalizeTests(unittest.TestCase):
|
||||
@@ -51,6 +51,14 @@ class AibotInboundNormalizeTests(unittest.TestCase):
|
||||
|
||||
|
||||
class AibotReplyTests(unittest.TestCase):
|
||||
def test_group_markdown_keeps_dimension_asterisks(self) -> None:
|
||||
raw = "体积(CBM)(必填):1.1*2.1*2.1\n箱型箱量:40HQ*1"
|
||||
shown = protect_markdown_asterisks(raw)
|
||||
self.assertEqual(
|
||||
shown,
|
||||
"体积(CBM)(必填):`1.1*2.1*2.1`\n箱型箱量:`40HQ*1`",
|
||||
)
|
||||
self.assertEqual(protect_markdown_asterisks(shown), shown)
|
||||
def test_empty_content_skips(self) -> None:
|
||||
client = AibotReplyClient("")
|
||||
out = client.send_group(chat_id="wr_1", content=" ")
|
||||
|
||||
Reference in New Issue
Block a user