()
| 51 | |
| 52 | |
| 53 | def main(): |
| 54 | parser = argparse.ArgumentParser(description='记录 Skill 使用日志') |
| 55 | parser.add_argument('--skill', required=True, help='Skill 名称,如 x-post') |
| 56 | parser.add_argument('--scene', required=True, help='使用场景描述') |
| 57 | parser.add_argument('--satisfaction', required=True, type=int, choices=range(1, 6), |
| 58 | help='满意度 1-5') |
| 59 | parser.add_argument('--note', default='', help='备注(可选)') |
| 60 | args = parser.parse_args() |
| 61 | |
| 62 | record = append_log(args.skill, args.scene, args.satisfaction, args.note) |
| 63 | |
| 64 | print(f"✅ 已记录:{record['skill']}(满意度 {record['satisfaction']}/5)") |
| 65 | print(f" 场景:{record['scene']}") |
| 66 | if record['note']: |
| 67 | print(f" 备注:{record['note']}") |
| 68 | print(f" 写入:{LOG_FILE}") |
| 69 | |
| 70 | |
| 71 | if __name__ == '__main__': |
no test coverage detected